DiscordSRV

DiscordSRV

86.8k Downloads

NPE on MetricsManager

nathan130200 opened this issue · 3 comments

commented

When enabling discordsvr on a bukkit server 1.7.10 i receive on log NullPointerException on MetricsManager

[05:51:03] [Server thread/ERROR]: Could not load 'plugins/DiscordSRV-Build-1.16.3.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: java.lang.NullPointerException
	at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:149) ~[JavaPluginLoader.class:1.7.10-1614.57]
	at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:334) ~[SimplePluginManager.class:1.7.10-1614.57]
	at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:256) [SimplePluginManager.class:1.7.10-1614.57]
	at org.bukkit.craftbukkit.v1_7_R4.CraftServer.loadPlugins(CraftServer.java:343) [CraftServer.class:1.7.10-1614.57]
	at net.minecraft.world.storage.SaveHandler.initBukkitData(SaveHandler.java:462) [ayq.class:?]
	at net.minecraft.world.storage.SaveHandler.func_75757_d(SaveHandler.java:138) [ayq.class:?]
	at net.minecraft.world.World.<init>(World.java:374) [ahb.class:?]
	at net.minecraft.world.WorldServer.<init>(WorldServer.java:162) [mt.class:?]
	at net.minecraft.server.MinecraftServer.func_71247_a(MinecraftServer.java:375) [MinecraftServer.class:?]
	at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:337) [lt.class:?]
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:643) [MinecraftServer.class:?]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_171]
Caused by: java.lang.NullPointerException
	at github.scarsz.discordsrv.objects.managers.MetricsManager.<init>(MetricsManager.java:48) ~[?:?]
	at github.scarsz.discordsrv.DiscordSRV.<init>(DiscordSRV.java:92) ~[?:?]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_171]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_171]
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_171]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_171]
	at java.lang.Class.newInstance(Class.java:442) ~[?:1.8.0_171]
	at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:201) ~[PluginClassLoader.class:1.7.10-1614.57]
	at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:145) ~[JavaPluginLoader.class:1.7.10-1614.57]
	... 11 more
commented

delete metrics.json in plugins/DiscordSRV & restart server

commented

Ok, i will try!

I will implement my self discord bridge since remove metrics.json not solved.

commented

metrics.json is the exact reason for the error. If deleting the file didn’t fix it, you didn’t delete it.