Fixed several misc bugs
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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))
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user