Doclic / NoEncryption

Removes signatures from Minecraft chat messages
GNU General Public License v3.0
224 stars 18 forks source link

Could not pass event PlayerQuitEvent #71

Closed Whitebrim closed 1 year ago

Whitebrim commented 1 year ago

Are you using the latest version of NoEncryption?

Is there an existing issue for this?

NoEncryption Version

4.2

Minecraft Version

1.19.3

Server Type/Build

pufferfish 1.19.3 (#60)

Plugins in Use

[15:51:00 INFO]: Server Plugins (45):
[15:51:00 INFO]: Bukkit Plugins:
[15:51:00 INFO]:  - *AdvancedReplay, BungeeGuard, *BungeeTabListPlus, Chatty, Citizens, CommandForward, CustomDiscs, DecentHolograms, DeluxeHub, Denizen
[15:51:00 INFO]:  DoorCloser, DrMap, emotecraft, Essentials, EssentialsDiscord, EssentialsSpawn, F3NPerm, FastAsyncWorldEdit, GSit, HeadDatabase
[15:51:00 INFO]:  InvSeePlusPlus, InvSeePlusPlus_Clear, InvSeePlusPlus_Give, JukeBoxPlus, KeepChunks, LuckPerms, MyCommand, nLogin, NoEncryption, Parkour
[15:51:00 INFO]:  PlaceholderAPI, Plan, PrivateMessages, ProtocolLib, SkinsRestorer, spark, SuperVanish, SurvivalInvisiframes, UltimateAutoRestart, UltimatePlugin
[15:51:00 INFO]:  Vault, voicechat, WorldGuard, WorldGuardDisableCollisions, WorldGuardExtraFlags

Startup Logs

[15:48:36 ERROR]: Could not pass event PlayerQuitEvent to NoEncryption v4.2
java.lang.NullPointerException: Cannot invoke "io.netty.channel.Channel.eventLoop()" because "serverChannel" is null
    at me.doclic.noencryption.PlayerListener.onPlayerQuit(PlayerListener.java:107) ~[NoEncryption-1.19.3-4.2.jar:?]
    at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor398.execute(Unknown Source) ~[?:?]
    at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[pufferfish-api-1.19.3-R0.1-SNAPSHOT.jar:?]
    at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:76) ~[pufferfish-api-1.19.3-R0.1-SNAPSHOT.jar:git-Pufferfish-60]
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[pufferfish-api-1.19.3-R0.1-SNAPSHOT.jar:?]
    at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[pufferfish-1.19.3.jar:git-Pufferfish-60]
    at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126) ~[pufferfish-1.19.3.jar:git-Pufferfish-60]
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:617) ~[pufferfish-api-1.19.3-R0.1-SNAPSHOT.jar:?]
    at net.minecraft.server.players.PlayerList.remove(PlayerList.java:578) ~[pufferfish-1.19.3.jar:git-Pufferfish-60]
    at net.minecraft.server.players.PlayerList.remove(PlayerList.java:563) ~[pufferfish-1.19.3.jar:git-Pufferfish-60]
    at net.minecraft.server.network.ServerGamePacketListenerImpl.onDisconnect(ServerGamePacketListenerImpl.java:2120) ~[?:?]
    at net.minecraft.server.network.ServerGamePacketListenerImpl.onDisconnect(ServerGamePacketListenerImpl.java:2099) ~[?:?]
    at com.denizenscript.denizen.nms.v1_19.impl.network.handlers.AbstractListenerPlayInImpl.a(AbstractListenerPlayInImpl.java:109) ~[Denizen-1.2.6-b1782-REL.jar:?]
    at net.minecraft.network.Connection.handleDisconnection(Connection.java:777) ~[?:?]
    at net.minecraft.server.network.ServerConnectionListener.tick(ServerConnectionListener.java:253) ~[?:?]
    at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1567) ~[pufferfish-1.19.3.jar:git-Pufferfish-60]
    at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:450) ~[pufferfish-1.19.3.jar:git-Pufferfish-60]
    at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1399) ~[pufferfish-1.19.3.jar:git-Pufferfish-60]
    at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1175) ~[pufferfish-1.19.3.jar:git-Pufferfish-60]
    at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:318) ~[pufferfish-1.19.3.jar:git-Pufferfish-60]
    at java.lang.Thread.run(Thread.java:833) ~[?:?]

Reproducible Test

On every player disconnect

Anything else?

This is bungeecord's lobby. Let me know if you need anything else.

V1nc3ntWasTaken commented 1 year ago

I have never tested with pufferfish before, but I will test this out

Whitebrim commented 1 year ago

I have never tested with pufferfish before, but I will test this out

It worked well on 1.19.2 previous version. The cause might be Lib's Disguises that I installed recently.

V1nc3ntWasTaken commented 1 year ago

I can not seem to recreate this using Lib's Disguises Free v10.0.32. Perhaps you used /reload at some point?

The only way that the exception at that line is thrown is if NoEncryption was reloaded, which would wipe certain lists that the plugin has, or if the server is working too fast, and NoEncryption doesn't have time to remove the handler.

I can add something to check if the server channel still exists, preventing the error from being thrown.

Whitebrim commented 1 year ago

Perhaps you used /reload at some point?

No, I did not, reloading server is not helping with the problem.