redo lore replacement

Instead of partially matching the old lore, build the old lore and match it instead.
This commit is contained in:
hyperdefined
2024-09-06 17:47:07 -04:00
parent 6d1f0fe561
commit b596310bfe
14 changed files with 269 additions and 312 deletions

View File

@@ -86,7 +86,8 @@ public class EntityDeath implements Listener {
container.set(toolStats.originType, PersistentDataType.INTEGER, 1);
if (toolStats.config.getBoolean("enabled.dropped-by")) {
List<String> newLore = toolStats.itemLore.addItemLore(meta, "{name}", mob, "dropped-by");
String newLine = toolStats.configTools.formatLore("dropped-by", "{name}", mob);
List<String> newLore = toolStats.itemLore.addItemLore(meta, newLine);
meta.setLore(newLore);
}
newItem.setItemMeta(meta);