DiscordSRV

DiscordSRV

86.8k Downloads

DiscordSRV throws errors using VanishNoPacket, very often.

ryantheleach opened this issue ยท 4 comments

commented
[01:40:19 WARN]: java.lang.NullPointerException
[01:40:19 WARN]: 	at github.scarsz.discordsrv.hooks.vanish.VanishNoPacketHook.isVanished(VanishNoPacketHook.java:34)
[01:40:19 WARN]: 	at github.scarsz.discordsrv.util.PlayerUtil.isVanished(PlayerUtil.java:128)
[01:40:19 WARN]: 	at github.scarsz.discordsrv.listeners.PlayerJoinLeaveListener.PlayerQuitEvent(PlayerJoinLeaveListener.java:138)
[01:40:19 WARN]: 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[01:40:19 WARN]: 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[01:40:19 WARN]: 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[01:40:19 WARN]: 	at java.lang.reflect.Method.invoke(Unknown Source)
[01:40:19 WARN]: 	at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:315)
[01:40:19 WARN]: 	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70)
[01:40:19 WARN]: 	at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:589)
[01:40:19 WARN]: 	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:576)
[01:40:19 WARN]: 	at net.minecraft.server.v1_16_R2.PlayerList.disconnect(PlayerList.java:417)
[01:40:19 WARN]: 	at net.minecraft.server.v1_16_R2.PlayerConnection.a(PlayerConnection.java:1411)
[01:40:19 WARN]: 	at net.minecraft.server.v1_16_R2.NetworkManager.handleDisconnection(NetworkManager.java:323)
[01:40:19 WARN]: 	at net.minecraft.server.v1_16_R2.ServerConnection.c(ServerConnection.java:150)
[01:40:19 WARN]: 	at net.minecraft.server.v1_16_R2.MinecraftServer.b(MinecraftServer.java:1126)
[01:40:19 WARN]: 	at net.minecraft.server.v1_16_R2.DedicatedServer.b(DedicatedServer.java:352)
[01:40:19 WARN]: 	at net.minecraft.server.v1_16_R2.MinecraftServer.a(MinecraftServer.java:1007)
[01:40:19 WARN]: 	at net.minecraft.server.v1_16_R2.MinecraftServer.w(MinecraftServer.java:846)
[01:40:19 WARN]: 	at net.minecraft.server.v1_16_R2.MinecraftServer.lambda$0(MinecraftServer.java:164)
[01:40:19 WARN]: 	at java.lang.Thread.run(Unknown Source)

Server:

[03:48:55 INFO]: This server is running CraftBukkit version git-Spigot-d65430a-bad55db (MC: 1.16.2) (Implementing API version 1.16.2-R0.1-SNAPSHOT)
[03:48:55 INFO]: Checking version, please wait...
[03:48:56 INFO]: You are 4 version(s) behind

DiscordSRV:

[03:48:58 INFO]: DiscordSRV version 1.19.1
[03:48:58 INFO]: The most powerful, configurable, open-source Discord bridge plugin out there.
[03:48:58 INFO]: Website: https://github.com/DiscordSRV/DiscordSRV
[03:48:58 INFO]: Authors: Scarsz, Androkai and Vankka

VanishNoPacket:

[03:49:20 INFO]: VanishNoPacket version 3.20
[03:49:20 INFO]: Vanish for the distinguished admin
[03:49:20 INFO]: Website: http://kitteh.org
[03:49:20 INFO]: Author: mbaxter
commented

Thanks for the detailed info along with the report.

I have to ask, why do you use reflection, when VanishNP provides static-access API?

In the past, with how plugin hooks were loaded, if a class wasn't available, it would error and kill the plugin initialization. Using reflection was easy way to avoid that happening. Nowadays though, I don't think it's necessary for plugin hooks to avoid using direct plugin classes because ClassNotFoundException is handled when loading hooks. Maybe can take a look at refactoring that stuff later on.

I have to ask, why do you use reflection, when VanishNP provides static-access API?

VanishNoPacket's static API is completely deprecated. Just a minor detail, the non-static API is still fine to use.

We're not able to reproduce the issue. Can you reliably reproduce this in an environment with just DiscordSRV & the latest VNP? I don't really see how this error would be possible, only short of the VNP plugin not enabling properly causing the vanish manager to not exist. Maybe you can attach your log and we'll see if there was an issue initializing VNP?

commented

I'll attempt to recreate this clean room. And get back to you with my configuration at least

commented

Closing for inactivity, message here if you can reproduce this on standard builds