Fixed several misc bugs

This commit is contained in:
Auxilor
2022-02-11 09:37:53 +00:00
parent 1ae47f0fd6
commit 1f22a2590b
3 changed files with 9 additions and 5 deletions

View File

@@ -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",

View File

@@ -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))
}

View File

@@ -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"