Use 'enchanting' terminology

'enchant' just didn't feel right, being a verb.
All these things pertain to the act of enchanting.

This is now also consistent with CraftingTransaction etc. The ship already sailed on EnchantInventory, which will have to be renamed at a later datte. However, that was already inconsistent with 'enchanting table', so that's the odd one out here.
This commit is contained in:
Dylan K. Taylor
2023-08-23 16:14:17 +01:00
parent bf668c0f6c
commit 1504fdca24
10 changed files with 44 additions and 44 deletions

View File

@ -25,7 +25,7 @@ namespace pocketmine\command\defaults;
use pocketmine\command\CommandSender;
use pocketmine\command\utils\InvalidCommandSyntaxException;
use pocketmine\item\enchantment\EnchantHelper;
use pocketmine\item\enchantment\EnchantingHelper;
use pocketmine\item\enchantment\EnchantmentInstance;
use pocketmine\item\enchantment\StringToEnchantmentParser;
use pocketmine\lang\KnownTranslationFactory;
@ -78,7 +78,7 @@ class EnchantCommand extends VanillaCommand{
}
//this is necessary to deal with enchanted books, which are a different item type than regular books
$enchantedItem = EnchantHelper::enchantItem($item, [new EnchantmentInstance($enchantment, $level)]);
$enchantedItem = EnchantingHelper::enchantItem($item, [new EnchantmentInstance($enchantment, $level)]);
$player->getInventory()->setItemInHand($enchantedItem);
self::broadcastCommandMessage($sender, KnownTranslationFactory::commands_enchant_success($player->getName()));