9
0
mirror of https://github.com/Auxilor/Reforges.git synced 2026-01-06 15:51:32 +00:00

Updated more config getters

This commit is contained in:
Auxilor
2022-01-06 18:39:39 +00:00
parent 7452ee41ad
commit b779057db8

View File

@@ -64,8 +64,8 @@ object ReforgeGUI {
previous.type = Material.getMaterial(
plugin.configYml.getString("gui.invalid-item.material").uppercase()
)!!
meta.setDisplayName(plugin.configYml.getString("gui.invalid-item.name"))
meta.lore = plugin.configYml.getStrings("gui.invalid-item.lore").map {
meta.setDisplayName(plugin.configYml.getFormattedString("gui.invalid-item.name"))
meta.lore = plugin.configYml.getFormattedStrings("gui.invalid-item.lore").map {
it.replace("%cost%", NumberUtils.format(cost))
.replace("%xpcost%", NumberUtils.format(xpCost.toDouble()))
}
@@ -74,8 +74,8 @@ object ReforgeGUI {
previous.type = Material.getMaterial(
plugin.configYml.getString("gui.allow.material").uppercase()
)!!
meta.setDisplayName(plugin.configYml.getString("gui.allow.name"))
meta.lore = plugin.configYml.getStrings("gui.allow.lore").map {
meta.setDisplayName(plugin.configYml.getFormattedString("gui.allow.name"))
meta.lore = plugin.configYml.getFormattedStrings("gui.allow.lore").map {
it.replace("%cost%", NumberUtils.format(cost))
.replace("%xpcost%", NumberUtils.format(xpCost.toDouble()))
}
@@ -84,8 +84,8 @@ object ReforgeGUI {
previous.type = Material.getMaterial(
plugin.configYml.getString("gui.allow-stone.material").uppercase()
)!!
meta.setDisplayName(plugin.configYml.getString("gui.allow-stone.name"))
meta.lore = plugin.configYml.getStrings("gui.allow-stone.lore").map {
meta.setDisplayName(plugin.configYml.getFormattedString("gui.allow-stone.name"))
meta.lore = plugin.configYml.getFormattedStrings("gui.allow-stone.lore").map {
it.replace("%cost%", NumberUtils.format(cost))
.replace("%xpcost%", NumberUtils.format(xpCost.toDouble()))
.replace("%stone%", ReforgeUtils.getReforgeStone(menu.getCaptiveItems(player)[1]).name)
@@ -95,8 +95,8 @@ object ReforgeGUI {
previous.type = Material.getMaterial(
plugin.configYml.getString("gui.no-item.material").uppercase()
)!!
meta.setDisplayName(plugin.configYml.getString("gui.no-item.name"))
meta.lore = plugin.configYml.getStrings("gui.no-item.lore").map {
meta.setDisplayName(plugin.configYml.getFormattedString("gui.no-item.name"))
meta.lore = plugin.configYml.getFormattedStrings("gui.no-item.lore").map {
it.replace("%cost%", NumberUtils.format(cost))
.replace("%xpcost%", NumberUtils.format(xpCost.toDouble()))
}
@@ -173,7 +173,7 @@ object ReforgeGUI {
plugin.configYml.getInt("gui.close.location.column"),
Slot.builder(
ItemStackBuilder(closeMaterial)
.setDisplayName(plugin.langYml.getString("menu.close"))
.setDisplayName(plugin.langYml.getFormattedString("menu.close"))
.build()
).onLeftClick { event, _, _ ->
event.whoClicked.closeInventory()