diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/boosters/commands/CommandGive.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/boosters/commands/CommandGive.kt index 6cf6e61..4469b96 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/boosters/commands/CommandGive.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/boosters/commands/CommandGive.kt @@ -57,7 +57,7 @@ class CommandGive(plugin: EcoPlugin) : sender.sendMessage( plugin.langYml.getMessage("gave-booster", StringUtils.FormatOption.WITHOUT_PLACEHOLDERS) .replace("%player%", player.name ?: return@runAsync) - .replace("%booster%", booster.id) + .replace("%booster%", booster.name) .replace("%amount%", amount.toString()) ) } @@ -86,7 +86,7 @@ class CommandGive(plugin: EcoPlugin) : if (args.size == 3) { StringUtil.copyPartialMatches( - args[1], + args[2], listOf( "1", "2", diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/boosters/gui/BoosterGUI.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/boosters/gui/BoosterGUI.kt index 3373c5c..4d7854f 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/boosters/gui/BoosterGUI.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/boosters/gui/BoosterGUI.kt @@ -67,8 +67,12 @@ object BoosterGUI { slot( { player, _ -> booster.getGuiItem(player) } ) { - setUpdater { player, _, _ -> - booster.getGuiItem(player) + setUpdater { player, _, prev -> + val newItem = booster.getGuiItem(player) + prev.itemMeta = newItem.itemMeta + prev.type = newItem.type + prev.itemMeta?.lore?.forEach { println(it) } + prev } onLeftClick(makeHandler(booster, plugin)) } diff --git a/eco-core/core-plugin/src/main/resources/lang.yml b/eco-core/core-plugin/src/main/resources/lang.yml index 51b379d..066e7b0 100644 --- a/eco-core/core-plugin/src/main/resources/lang.yml +++ b/eco-core/core-plugin/src/main/resources/lang.yml @@ -8,7 +8,7 @@ messages: invalid-player: "&cInvalid player!" requires-booster: "&cYou must specify a booster!" invalid-booster: "&cInvalid booster!" - gave-booster: "Gave %player% %booster%!" + gave-booster: "Gave %player% %booster% &fx%amount%!" already-active: "&cA booster is already active!" dont-have: "&cYou don't have any of these boosters! Get some at &astore.ecomc.net" on-cooldown: "&cThis effect is on cooldown! &fTime left: &a%seconds% seconds"