DiscordSRV

DiscordSRV

86.8k Downloads

v1.19.1 on Paper 1.12.2 - org.bukkit.event.EventException: null

TomLewis opened this issue ยท 6 comments

commented

Discord SRV 1.19.1 on Paper 1.12.2 always spams this for players;

2020-08-18 13:58:12 | [ERROR] Could not pass event PlayerJoinEvent to DiscordSRV v1.19.1
2020-08-18 13:58:12 | [RAW] org.bukkit.event.EventException: null
2020-08-18 13:58:12 | [RAW] 	at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:72) ~[patched_1.12.2.jar:git-Paper-1617]
2020-08-18 13:58:12 | [RAW] 	at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:78) ~[patched_1.12.2.jar:git-Paper-1617]
2020-08-18 13:58:12 | [RAW] 	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[patched_1.12.2.jar:git-Paper-1617]
2020-08-18 13:58:12 | [RAW] 	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:513) ~[patched_1.12.2.jar:git-Paper-1617]
2020-08-18 13:58:12 | [RAW] 	at net.minecraft.server.v1_12_R1.PlayerList.onPlayerJoin(PlayerList.java:370) ~[patched_1.12.2.jar:git-Paper-1617]
2020-08-18 13:58:12 | [RAW] 	at net.minecraft.server.v1_12_R1.PlayerList.a(PlayerList.java:183) ~[patched_1.12.2.jar:git-Paper-1617]
2020-08-18 13:58:12 | [RAW] 	at net.minecraft.server.v1_12_R1.LoginListener.b(LoginListener.java:178) ~[patched_1.12.2.jar:git-Paper-1617]
2020-08-18 13:58:12 | [RAW] 	at net.minecraft.server.v1_12_R1.LoginListener.e(LoginListener.java:68) ~[patched_1.12.2.jar:git-Paper-1617]
2020-08-18 13:58:12 | [RAW] 	at net.minecraft.server.v1_12_R1.NetworkManager.a(NetworkManager.java:273) ~[patched_1.12.2.jar:git-Paper-1617]
2020-08-18 13:58:12 | [RAW] 	at net.minecraft.server.v1_12_R1.ServerConnection.c(ServerConnection.java:150) ~[patched_1.12.2.jar:git-Paper-1617]
2020-08-18 13:58:12 | [RAW] 	at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:948) ~[patched_1.12.2.jar:git-Paper-1617]
2020-08-18 13:58:12 | [RAW] 	at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:423) ~[patched_1.12.2.jar:git-Paper-1617]
2020-08-18 13:58:12 | [RAW] 	at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:774) ~[patched_1.12.2.jar:git-Paper-1617]
2020-08-18 13:58:12 | [RAW] 	at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:666) ~[patched_1.12.2.jar:git-Paper-1617]
2020-08-18 13:58:12 | [RAW] 	at java.lang.Thread.run(Thread.java:834) [?:?]
2020-08-18 13:58:12 | [RAW] Caused by: github.scarsz.discordsrv.dependencies.jda.api.exceptions.InsufficientPermissionException: Cannot perform action due to a lack of Permission. Missing permission: BAN_MEMBERS
2020-08-18 13:58:12 | [RAW] 	at github.scarsz.discordsrv.dependencies.jda.internal.entities.GuildImpl.retrieveBanById(GuildImpl.java:594) ~[?:?]
2020-08-18 13:58:12 | [RAW] 	at github.scarsz.discordsrv.listeners.PlayerBanListener.onPlayerJoin(PlayerBanListener.java:64) ~[?:?]
2020-08-18 13:58:12 | [RAW] 	at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor583.execute(Unknown Source) ~[?:?]
2020-08-18 13:58:12 | [RAW] 	at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:70) ~[patched_1.12.2.jar:git-Paper-1617]
2020-08-18 13:58:12 | [RAW] 	... 14 more
commented

The bot tries to ban someone from the Discord server but lacks permission to do so.

commented

Thanks, I missed that line!
Edit: holy crap its triyng to ban 85 people in the space of like 1 hour. This definitely does not work as I expected it too, disabling this asap.

commented

What?

commented

If banning minecraft -> discord is enabled, and a player joins, it checks to see if that player is linked. If they are it checks to see if they were banned on discord and unbans them. That error showed up because it failed to check to see if a player has been banned on discord since it didn't have the ability to see banned discord users.
https://github.com/DiscordSRV/DiscordSRV/blob/master/src/main/java/github/scarsz/discordsrv/listeners/PlayerBanListener.java#L54-L70

commented

Phew, so its just done it 85 times as 85 people logged in and its just checked it has permissions, gotcha!

commented

What?

Sorry, I scanned my logs for Cannot perform action due to a lack of Permission. Missing permission: BAN_MEMBERS after I was shown it, and I saw it had 85 tries in the space of about an hour.

Does this mean that its going through a backlog of bans? I assumed it only banned them when they were banned in-game.

I use BanManager if this makes any difference.