EnchantCommand: use Item->isNull() instead of maths on ID

This commit is contained in:
Dylan K. Taylor 2018-05-28 19:45:37 +01:00
parent b003295d01
commit ad15ab5b42

View File

@ -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;
}