mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 00:33:59 +00:00
EnchantCommand: use Item->isNull() instead of maths on ID
This commit is contained in:
parent
b003295d01
commit
ad15ab5b42
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user