diff --git a/src/pocketmine/command/defaults/EnchantCommand.php b/src/pocketmine/command/defaults/EnchantCommand.php index f9adc0b09..0a82f02f6 100644 --- a/src/pocketmine/command/defaults/EnchantCommand.php +++ b/src/pocketmine/command/defaults/EnchantCommand.php @@ -59,7 +59,7 @@ class EnchantCommand extends VanillaCommand{ $item = $player->getInventory()->getItemInHand(); - if($item->getId() <= 0){ + if($item->isNull()){ $sender->sendMessage(new TranslationContainer("commands.enchant.noItem")); return true; }