So, right now I have this piece of code: PHP: public function newParticlez(Player $player, Item $item){ if($item->getId() == 351){ $player->sendMessage("RED"); return true; } elseif($item->getId() == 35){ $player->sendMessage("BLUE"); return true; } elseif($item->getId() == 50){ $player->sendMessage("YELLOW"); return true; } elseif($item->getId() == 351){ $player->sendMessage("GREEN"); return true; } } You see, the different dyes have a different item id. Red dye has the Item ID of 351,1 while Green dye has the Item ID of 351,2 . However, the plugin does not recognize that, and only outputs "RED", even if you chose the Green dye or any other dye. Can someone help me get a fix for this? Thank you all so much in advance! ~Ethaniccc
PHP: if($item->getId() === ItemIds::DYE && $item->getDamage() === 1){ $player->sendMessage("RED"); return true; } elseif($item->getId() === ItemIds::WOOL){ $player->sendMessage("BLUE"); return true; } elseif($item->getId() === ItemIds::TORCH){ $player->sendMessage("YELLOW"); return true; } elseif($item->getId() === ItemIds::DYE && $item->getDamage() === 2){ $player->sendMessage("GREEN"); return true; }