mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-11-22 15:05:18 +01:00
Fixed /giverandombook not working
This commit is contained in:
parent
8443a6add2
commit
f1ce2f4ce3
@ -53,6 +53,8 @@ public class CommandGiverandombook extends AbstractCommand {
|
|||||||
meta.addStoredEnchant(enchantment, level, true);
|
meta.addStoredEnchant(enchantment, level, true);
|
||||||
itemStack.setItemMeta(meta);
|
itemStack.setItemMeta(meta);
|
||||||
|
|
||||||
|
player.getInventory().addItem(itemStack);
|
||||||
|
|
||||||
String message = this.getPlugin().getLangYml().getMessage("gave-random-book");
|
String message = this.getPlugin().getLangYml().getMessage("gave-random-book");
|
||||||
message = message.replace("%enchantment%", EnchantmentCache.getEntry(enchantment).getName() + " " + NumberUtils.toNumeral(level) + "§r");
|
message = message.replace("%enchantment%", EnchantmentCache.getEntry(enchantment).getName() + " " + NumberUtils.toNumeral(level) + "§r");
|
||||||
sender.sendMessage(message);
|
sender.sendMessage(message);
|
||||||
|
Loading…
Reference in New Issue
Block a user