NBT-API

NBT-API

98.9k Downloads

Update bStats

leonardo-dgs opened this issue ยท 2 comments

commented

NBT-API uses an old version of bStats.
Updating it would increase the compatibility with Folia, since using a plugin with NBT-API shaded in it, I have encountered an error related to the NBT-API class of Metrics, that doesn't show with an updated version of bStats.
Here is the error:

[Timer-0/WARN]: Exception in thread "Timer-0" java.lang.UnsupportedOperationException
[Timer-0/WARN]: 	at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftScheduler.handle(CraftScheduler.java:536)
[Timer-0/WARN]: 	at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftScheduler.runTaskTimer(CraftScheduler.java:236)
[Timer-0/WARN]: 	at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftScheduler.runTaskTimer(CraftScheduler.java:212)
[Timer-0/WARN]: 	at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftScheduler.runTaskLater(CraftScheduler.java:176)
[Timer-0/WARN]: 	at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftScheduler.runTask(CraftScheduler.java:145)
[Timer-0/WARN]: 	at InteractiveBooks.jar//net.leonardo_dgs.interactivebooks.lib.nbtapi.utils.ApiMetricsLite$1.run(ApiMetricsLite.java:190)
[Timer-0/WARN]: 	at java.base/java.util.TimerThread.mainLoop(Timer.java:566)
[Timer-0/WARN]: 	at java.base/java.util.TimerThread.run(Timer.java:516)
commented

I was testing Folia with the current setup, and from my understanding Folia always uses Mojmap, which nbtapi currently doesn't support yet. Folia support is on the todo, but not here yet. If bStats turns out to need an upgrade, it will get it as part of making it compatible.
(it's not an issue when bStats fails, this exception just gets caught and printed, nothing breaks just because of that)

commented

This is on the todo next, will have to check what I had to modify on bStats to get it running in this "headless" mode, and then transfer this to a more recent version.