Important: go to your config and change the value

```yml
item-upgrading:
    name-suffix: '&f &e(+#lvl#)'
```
to
```yml
item-upgrading:
    name-suffix: ' &e(+#lvl#)'
```
(remove that `&f`, literally the cause of the upgrade suffix stacking bug)

Also removed the spammy debug messages that I accidentally left
This commit is contained in:
Gunging 2021-03-05 14:50:55 -06:00
parent 77fefa235c
commit b4d1d78b14
2 changed files with 9 additions and 9 deletions

View File

@ -35,10 +35,10 @@ public class DisplayName extends StringStat {
if (item.getMMOItem().hasUpgradeTemplate()) {
int upgradeLevel = item.getMMOItem().getUpgradeLevel();
String suffix = MMOItems.plugin.getConfig().getString("item-upgrading.name-suffix");
MMOItems.getConsole().sendMessage("Level " + upgradeLevel);
MMOItems.getConsole().sendMessage("Format " + format);
//MMOItems.getConsole().sendMessage("Level " + upgradeLevel);
//MMOItems.getConsole().sendMessage("Format " + format);
if (suffix != null) {
MMOItems.getConsole().sendMessage("Suffix " + suffix);
//MMOItems.getConsole().sendMessage("Suffix " + suffix);
// Bake old indices for removal
ArrayList<String> oldSuffixii = new ArrayList<>(); boolean negativity = false;
@ -49,17 +49,17 @@ public class DisplayName extends StringStat {
} else {
oldSuffixii.add(suffix.replace("#lvl#", String.valueOf(i))); }}
for (String str : oldSuffixii) {
MMOItems.getConsole().sendMessage("Found " + str);
//MMOItems.getConsole().sendMessage("Found " + str);
str = MythicLib.plugin.parseColors(str);
MMOItems.getConsole().sendMessage("Colored " + str);
//MMOItems.getConsole().sendMessage("Colored " + str);
format = format.replace(MythicLib.plugin.parseColors(str), "");
MMOItems.getConsole().sendMessage("Edited " + format);
//MMOItems.getConsole().sendMessage("Edited " + format);
}
String actSuffix = suffix.replace("#lvl#", String.valueOf(upgradeLevel));
MMOItems.getConsole().sendMessage("Current " + actSuffix);
//MMOItems.getConsole().sendMessage("Current " + actSuffix);
if (upgradeLevel != 0) { format = format + MythicLib.plugin.parseColors(actSuffix); }
MMOItems.getConsole().sendMessage("Final " + format);
//MMOItems.getConsole().sendMessage("Final " + format);
}
}

View File

@ -76,7 +76,7 @@ item-glow: true
item-upgrading:
# Display name suffix for upgraded items.
name-suffix: '&f &e(+#lvl#)'
name-suffix: ' &8(&e+#lvl#&8)'
# Whether to display in Item Name or Lore
# Disable if item renaming is available to players.