migration to Paper API

This commit is contained in:
hyperdefined
2024-12-14 17:28:02 -05:00
parent 50b5823daf
commit 585e020baf
22 changed files with 224 additions and 341 deletions

View File

@@ -18,6 +18,7 @@
package lol.hyper.toolstats.events;
import lol.hyper.toolstats.ToolStats;
import net.kyori.adventure.text.Component;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
@@ -91,9 +92,9 @@ public class EntityDeath implements Listener {
if (mobName == null) {
mobName = entity.getName();
}
String newLine = toolStats.configTools.formatLore("dropped-by", "{name}", mobName);
List<String> newLore = toolStats.itemLore.addItemLore(meta, newLine);
meta.setLore(newLore);
Component newLine = toolStats.configTools.formatLore("dropped-by", "{name}", mobName);
List<Component> newLore = toolStats.itemLore.addItemLore(meta, newLine);
meta.lore(newLore);
}
newItem.setItemMeta(meta);
return newItem;