mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Enchantment API changes, understandable constant names
This commit is contained in:
@ -60,7 +60,7 @@ class EnchantCommand extends VanillaCommand{
|
||||
$enchantLevel = isset($args[2]) ? (int) $args[2] : 1;
|
||||
|
||||
$enchantment = Enchantment::getEnchantment($enchantId);
|
||||
if($enchantment->getId() === Enchantment::TYPE_INVALID){
|
||||
if(!($enchantment instanceof Enchantment)){
|
||||
$sender->sendMessage(new TranslationContainer("commands.enchant.notFound", [$enchantId]));
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user