Enchantment API changes, understandable constant names

This commit is contained in:
Dylan K. Taylor
2017-05-03 12:07:38 +01:00
parent ecba80fd63
commit 3b7fc21839
3 changed files with 110 additions and 57 deletions

View File

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