Fixed /giverandombook not working

This commit is contained in:
Auxilor 2021-04-13 18:26:04 +01:00
parent 8443a6add2
commit f1ce2f4ce3

View File

@ -53,6 +53,8 @@ public class CommandGiverandombook extends AbstractCommand {
meta.addStoredEnchant(enchantment, level, true);
itemStack.setItemMeta(meta);
player.getInventory().addItem(itemStack);
String message = this.getPlugin().getLangYml().getMessage("gave-random-book");
message = message.replace("%enchantment%", EnchantmentCache.getEntry(enchantment).getName() + " " + NumberUtils.toNumeral(level) + "§r");
sender.sendMessage(message);