I was wondering if there was a way to check enchantments on an item along with checking the id.. If this is possible and someone could tell me how i would be very greatful
I suggest looking at the member functions in pocketmine\item\Item. You can use these two functions to get the ID and check if it has an enchantment. How you get the Item object is up to you. PHP: /** @var Item $item */ //Checks if Item is a Diamond Sword. if($item->getId() == Item::DIAMOND_SWORD) { //The item is a Diamond Sword. } //Checks if Item has enchantment ID 9 (Sharpness) if(!is_null($item->getEnchantment(9))) { //The item has the enchantment. }