Hello, I trying to check if entity has nametag c2c or c1c or c3c, but my code is not working. Please help PHP: /** var Entity $ent */$a = array("1", "2", "3");elseif ($ent->getNameTag() == "c". print_r(array_values($a)) . "c"){ echo "debug"; }}
That of course would not work. I believe this is what you were trying to do. PHP: /** var Entity $ent */$a = array("1", "2", "3");foreach ($a as $number){ if ($ent->getNameTag() == "c". $number . "c"){ echo "debug"; }}