Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatibility with overriding RegisteredListener #624

Open
Janmm14 opened this issue Aug 9, 2023 · 1 comment
Open

Incompatibility with overriding RegisteredListener #624

Janmm14 opened this issue Aug 9, 2023 · 1 comment
Assignees
Labels
Bug This is a problem

Comments

@Janmm14
Copy link
Contributor

Janmm14 commented Aug 9, 2023

The purcharseable anticheat plugin Intave extends RegisteredListener.
The executor field is therefore not guaranteed to be filled, causing errors like

NullPointerException: Cannot invoke "org.bukkit.plugin.EventExecutor.execute(org.bukkit.event.Listener, org.bukkit.event.Event)" because "this.executor" is null
[02:09:57 ERROR]: Could not pass event PlayerMoveEvent to Intave v14.6.4
java.lang.NullPointerException: Cannot invoke "org.bukkit.plugin.EventExecutor.execute(org.bukkit.event.Listener, org.bukkit.event.Event)" because "this.executor" is null
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[purpur-api-1.20.1-R0.1-SNAPSHOT.jar:?]
        at com.volmit.react.api.event.NaughtyRegisteredListener.callEvent(NaughtyRegisteredListener.java:31) ~[React.jar:?]
        at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[purpur-1.20.1.jar:git-Purpur-2028]
        at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126) ~[purpur-1.20.1.jar:git-Purpur-2028]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:617) ~[purpur-api-1.20.1-R0.1-SNAPSHOT.jar:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.handleMovePlayer(ServerGamePacketListenerImpl.java:1707) ~[?:?]
        at net.minecraft.network.protocol.game.ServerboundMovePlayerPacket.handle(ServerboundMovePlayerPacket.java:29) ~[?:?]
        at net.minecraft.network.protocol.game.ServerboundMovePlayerPacket$Pos.handle(ServerboundMovePlayerPacket.java:66) ~[?:?]
        at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:51) ~[?:?]
        at net.minecraft.server.TickTask.run(TickTask.java:18) ~[purpur-1.20.1.jar:git-Purpur-2028]
        at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?]
        at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[?:?]
        at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1366) ~[purpur-1.20.1.jar:git-Purpur-2028]
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:197) ~[purpur-1.20.1.jar:git-Purpur-2028]
        at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?]
        at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1343) ~[purpur-1.20.1.jar:git-Purpur-2028]
        at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1336) ~[purpur-1.20.1.jar:git-Purpur-2028]
        at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?]
        at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1314) ~[purpur-1.20.1.jar:git-Purpur-2028]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1202) ~[purpur-1.20.1.jar:git-Purpur-2028]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:323) ~[purpur-1.20.1.jar:git-Purpur-2028]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]

In order to fix this issue, please save the entire RegisteredListener object in your NaughtyRegisteredListener and use its callEvent method.

@NextdoorPsycho NextdoorPsycho added the Bug This is a problem label Aug 9, 2023
@555vedant
Copy link

respected sir , i wanted to work with this code i wanted to fix it.

@VolmitSoftware VolmitSoftware deleted a comment from RePixelatedMC Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is a problem
Projects
None yet
Development

No branches or pull requests

4 participants