CoreProtect

CoreProtect

1M Downloads

Deprecated event listener, "Server performance will be affected"

bigfinfrank opened this issue ยท 4 comments

commented

Getting the following nag on startup:

[Server thread/WARN]: [CoreProtect] "CoreProtect v22.4" has registered a listener for org.bukkit.event.player.PlayerPickupItemEvent on method "protected void net.coreprotect.listener.player.PlayerPickupArrowListener.onPlayerPickupArrowEvent(org.bukkit.event.player.PlayerPickupArrowEvent)", but the event is Deprecated. "Server performance will be affected"; please notify the authors [Intelli].
org.bukkit.plugin.AuthorNagException: null
	at io.papermc.paper.plugin.manager.PaperEventManager.createRegisteredListeners(PaperEventManager.java:180) ~[purpur-1.21.jar:1.21-2256-de2e7a7]
	at io.papermc.paper.plugin.manager.PaperEventManager.registerEvents(PaperEventManager.java:83) ~[purpur-1.21.jar:1.21-2256-de2e7a7]
	at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.registerEvents(PaperPluginManagerImpl.java:136) ~[purpur-1.21.jar:1.21-2256-de2e7a7]
	at org.bukkit.plugin.SimplePluginManager.registerEvents(SimplePluginManager.java:683) ~[paper-mojangapi-1.21-R0.1-SNAPSHOT.jar:?]
	at CoreProtect-22.4.jar/net.coreprotect.listener.ListenerHandler.<init>(ListenerHandler.java:130) ~[CoreProtect-22.4.jar:?]
	at CoreProtect-22.4.jar/net.coreprotect.CoreProtect.onEnable(CoreProtect.java:63) ~[CoreProtect-22.4.jar:?]
	at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:288) ~[paper-mojangapi-1.21-R0.1-SNAPSHOT.jar:?]
	at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:202) ~[purpur-1.21.jar:1.21-2256-de2e7a7]
	at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:109) ~[purpur-1.21.jar:1.21-2256-de2e7a7]
	at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:520) ~[paper-mojangapi-1.21-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.craftbukkit.CraftServer.enablePlugin(CraftServer.java:643) ~[purpur-1.21.jar:1.21-2256-de2e7a7]
	at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:592) ~[purpur-1.21.jar:1.21-2256-de2e7a7]
	at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:755) ~[purpur-1.21.jar:1.21-2256-de2e7a7]
	at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:517) ~[purpur-1.21.jar:1.21-2256-de2e7a7]
	at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:361) ~[purpur-1.21.jar:1.21-2256-de2e7a7]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1233) ~[purpur-1.21.jar:1.21-2256-de2e7a7]
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:332) ~[purpur-1.21.jar:1.21-2256-de2e7a7]
	at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]

Version info:
All are latest at time of reporting, however Purpur is an experimental build as there aren't any stable 1.21 builds yet.

> about
[15:55:35 INFO]: Current Purpur Version: 1.21-2256-de2e7a7 (MC: 1.21)*
> co status
[15:56:22 INFO]: ----- CoreProtect -----
[15:56:22 INFO]: Version: CoreProtect v22.4.
[15:56:22 INFO]: License: Valid donation key. (9FEC33E5)
[15:56:22 INFO]: Database: Using SQLite. (Initial DB: 22.4)
[15:56:22 INFO]: Consumer: 0 items in queue.
[15:56:22 INFO]: Discord: www.coreprotect.net/discord/
[15:56:22 INFO]: Patreon: www.patreon.com/coreprotect/
commented

Unable to replicate this on CoreProtect v22.4 with Purpur 1.21-2256.

Can you please try updating to Purpur 1.21-2257 and see if this error still occurs on startup for you?

commented

Can confirm it still happens on both 2257 and 2258, I also just tested upstream with a fresh build of Spigot and fresh download of CoreProtect, note that you need setings.deprecated-verbose: true in bukkit.yml to see deprecation warnings (in my spigot test that was the only configuration change from default). You can see latest.log from my spigot test here.
If you check the Spigot docs, PlayerPickupItemEvent has a replacement, EntityPickupItemEvent that can be used instead.

commented

Ah, that's your issue. That value should be set to "default", not "true".

CoreProtect doesn't use the PlayerPickupItemEvent. Your warning is being thrown on the PlayerPickupArrowEvent, which is not deprecated.

commented

Ah alright.