mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-04 00:59:51 +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();
|
$item = $player->getInventory()->getItemInHand();
|
||||||
|
|
||||||
if($item->getId() <= 0){
|
if($item->isNull()){
|
||||||
$sender->sendMessage(new TranslationContainer("commands.enchant.noItem"));
|
$sender->sendMessage(new TranslationContainer("commands.enchant.noItem"));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user