Skip to content
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.

Enchantment Name Support - EnchantCommand #2009

Merged
merged 4 commits into from
Oct 1, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update EnchantCommand.php
  • Loading branch information
Jake authored Oct 1, 2016
commit e2cd73523f5c0b07d3fae121f52c58de9e26f7da
10 changes: 5 additions & 5 deletions src/pocketmine/command/defaults/EnchantCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ public function execute(CommandSender $sender, $currentAlias, array $args){

$enchantment = Enchantment::getEnchantment($enchantId);
if($enchantment->getId() === Enchantment::TYPE_INVALID){
$enchantment = Enchantment::getEnchantmentByName($enchantId);
if($enchantment->getId() === Enchantment::TYPE_INVALID){
$sender->sendMessage(new TranslationContainer("commands.enchant.notFound", [$enchantment->getId()]));
return true;
}
$enchantment = Enchantment::getEnchantmentByName($enchantId);
if($enchantment->getId() === Enchantment::TYPE_INVALID){
$sender->sendMessage(new TranslationContainer("commands.enchant.notFound", [$enchantment->getId()]));
return true;
}
}

$enchantment->setLevel($enchantLevel);
Expand Down