PaperMC / Paper

The most widely used, high performance Minecraft server that aims to fix gameplay and mechanics inconsistencies
https://papermc.io/
Other
9.67k stars 2.25k forks source link

NPE: Could not pass event PlayerTeleportEvent. #11137

Closed andrewkm closed 3 weeks ago

andrewkm commented 1 month ago

Expected behavior

No errors.

Observed/Actual behavior

Many of our plugins are shooting off the following:

[14:14:00] [Server thread/ERROR]: Could not pass event PlayerTeleportEvent to WorldGuard v7.0.11-SNAPSHOT+2284-c6fbfb8
java.lang.NullPointerException: null
    at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:903) ~[guava-32.1.2-jre.jar:?]
    at worldedit-bukkit-7.3.5-SNAPSHOT-dist.jar/com.sk89q.worldedit.bukkit.BukkitAdapter.adapt(BukkitAdapter.java:224) ~[worldedit-bukkit-7.3.5-SNAPSHOT-dist.jar:?]
    at worldguard-bukkit-7.0.11-SNAPSHOT-dist.jar/com.sk89q.worldguard.bukkit.listener.WorldGuardPlayerListener.onPlayerTeleport(WorldGuardPlayerListener.java:361) ~[worldguard-bukkit-7.0.11-SNAPSHOT-dist.jar:?]
    at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor104.execute(Unknown Source) ~[?:?]
    at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:?]
    at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:1.21-106-3a47518]
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:?]
    at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[paper-1.21.jar:1.21-106-3a47518]
    at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131) ~[paper-1.21.jar:1.21-106-3a47518]
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:628) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:?]
    at net.minecraft.server.level.ServerPlayer.changeDimension(ServerPlayer.java:1383) ~[paper-1.21.jar:1.21-106-3a47518]
    at net.minecraft.world.entity.Entity.handlePortal(Entity.java:3273) ~[paper-1.21.jar:1.21-106-3a47518]
    at net.minecraft.world.entity.Entity.baseTick(Entity.java:875) ~[paper-1.21.jar:1.21-106-3a47518]
    at net.minecraft.world.entity.LivingEntity.baseTick(LivingEntity.java:442) ~[paper-1.21.jar:1.21-106-3a47518]
    at net.minecraft.world.entity.Entity.tick(Entity.java:848) ~[paper-1.21.jar:1.21-106-3a47518]
    at net.minecraft.world.entity.LivingEntity.tick(LivingEntity.java:3132) ~[paper-1.21.jar:1.21-106-3a47518]
    at net.minecraft.world.entity.player.Player.tick(Player.java:288) ~[paper-1.21.jar:1.21-106-3a47518]
    at net.minecraft.server.level.ServerPlayer.doTick(ServerPlayer.java:835) ~[paper-1.21.jar:1.21-106-3a47518]
    at net.minecraft.server.network.ServerGamePacketListenerImpl.tick(ServerGamePacketListenerImpl.java:346) ~[paper-1.21.jar:1.21-106-3a47518]
    at net.minecraft.network.Connection.tick(Connection.java:638) ~[paper-1.21.jar:1.21-106-3a47518]
    at net.minecraft.server.network.ServerConnectionListener.tick(ServerConnectionListener.java:242) ~[paper-1.21.jar:1.21-106-3a47518]
    at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1822) ~[paper-1.21.jar:1.21-106-3a47518]
    at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:473) ~[paper-1.21.jar:1.21-106-3a47518]
    at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1597) ~[paper-1.21.jar:1.21-106-3a47518]
    at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1303) ~[paper-1.21.jar:1.21-106-3a47518]
    at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:330) ~[paper-1.21.jar:1.21-106-3a47518]
    at java.base/java.lang.Thread.run(Thread.java:1570) ~[?:?]

Example of many: https://pastebin.com/raw/jgPS3dKn

Steps/models to reproduce

Unable to reproduce. I have tried various things that I observed players attempting to do just prior to the errors. From what I was told this was fixed a while ago, however it seems it's happening again.

Plugin and Datapack List

On request via Discord

Paper version

This server is running Paper version 1.21-106-master@3a47518 (2024-07-21T02:47:23Z) (Implementing API version 1.21-R0.1-SNAPSHOT)

Other

No response

lynxplay commented 1 month ago

Do you have the nether or end dimension disabled?

andrewkm commented 1 month ago

Do you have the nether or end dimension disabled?

Yes, we have both allow-end: false via bukkit.yml allow-nether=false via server.properties.

We instead create those dimensions ourselves with https://github.com/Multiverse/Multiverse-Core and allow our players access to them via other means.

lynxplay commented 1 month ago

Okay yea, that would do it 👍 I'll have a look at how that was handled in previous versions.

andrewkm commented 1 month ago

Okay yea, that would do it 👍 I'll have a look at how that was handled in previous versions.

This one still has the awaiting response tag, wondering if you need anything else from me.

lynxplay commented 1 month ago

No thank you!