Added max level lore
This commit is contained in:
@@ -363,6 +363,8 @@ class Pet(
|
||||
val level = player.getPetLevel(this)
|
||||
val isActive = player.activePet == this
|
||||
|
||||
val baseLoreLocation = if (level == this.maxLevel) "max-level-lore" else "lore"
|
||||
|
||||
return ItemStackBuilder(base)
|
||||
.setDisplayName(
|
||||
plugin.configYml.getFormattedString("gui.pet-icon.name")
|
||||
@@ -370,7 +372,7 @@ class Pet(
|
||||
.replace("%pet%", this.name)
|
||||
)
|
||||
.addLoreLines {
|
||||
injectPlaceholdersInto(plugin.configYml.getStrings("gui.pet-icon.lore"), player) +
|
||||
injectPlaceholdersInto(plugin.configYml.getStrings("gui.pet-icon.$baseLoreLocation"), player) +
|
||||
if (isActive) plugin.configYml.getStrings("gui.pet-icon.active-lore") else
|
||||
plugin.configYml.getStrings("gui.pet-icon.not-active-lore")
|
||||
}
|
||||
|
||||
@@ -81,6 +81,18 @@ gui:
|
||||
- "&8» &e%percentage_progress%%"
|
||||
- "&8» &e%current_xp%&8/&7%required_xp% &fXP"
|
||||
|
||||
# By default, the lore for the max level is the same,
|
||||
# but you can change this if you want.
|
||||
max-level-lore:
|
||||
- "%description%"
|
||||
- "&f"
|
||||
- "&fEffects:"
|
||||
- "%effects%"
|
||||
- ""
|
||||
- "&fProgress:"
|
||||
- "&8» &e%percentage_progress%%"
|
||||
- "&8» &e%current_xp%&8/&7%required_xp% &fXP"
|
||||
|
||||
active-lore:
|
||||
- ""
|
||||
- "&cThis pet is already active!"
|
||||
|
||||
Reference in New Issue
Block a user