aromaa/WorldGuardExtraFlags

Receiving NPE error com.earth2me.essentials.User.isGodModeEnabled() when moving to a new block coordinate in protected area

Closed this issue · 3 comments

Receiving the following error from WGEFP when walking around in my spawn. Every time my X or Z coordinate updates to a new whole number, the following error is thrown:

[06.07 21:39:00] [Server] [ERROR] Could not pass event PlayerMoveEvent to WorldGuard v7.0.8-SNAPSHOT+2201-6efdb10
[06.07 21:39:00] [Server] java.lang.NullPointerExceptionCannot invoke "com.earth2me.essentials.User.isGodModeEnabled()" because "user" is null
[06.07 21:39:00] [Server] 	at net.goldtreeservers.worldguardextraflags.wg.handlers.GodmodeFlagHandler.handleValue(GodmodeFlagHandler.java:87) ~[WorldGuardExtraFlags.jar:?]
[06.07 21:39:00] [Server] 	at net.goldtreeservers.worldguardextraflags.wg.handlers.GodmodeFlagHandler.onSetValue(GodmodeFlagHandler.java:55) ~[WorldGuardExtraFlags.jar:?]
[06.07 21:39:00] [Server] 	at net.goldtreeservers.worldguardextraflags.wg.handlers.GodmodeFlagHandler.onSetValue(GodmodeFlagHandler.java:22) ~[WorldGuardExtraFlags.jar:?]
[06.07 21:39:00] [Server] 	at com.sk89q.worldguard.session.handler.FlagValueChangeHandler.onCrossBoundary(FlagValueChangeHandler.java:61) ~[worldguard-bukkit-7.0.8-SNAPSHOT-dist.jar:?]
[06.07 21:39:00] [Server] 	at com.sk89q.worldguard.bukkit.session.TimedHandlerFactory$TimedHandler.onCrossBoundary(TimedHandlerFactory.java:107) ~[worldguard-bukkit-7.0.8-SNAPSHOT-dist.jar:?]
[06.07 21:39:00] [Server] 	at com.sk89q.worldguard.session.Session.testMoveTo(Session.java:220) ~[worldguard-bukkit-7.0.8-SNAPSHOT-dist.jar:?]
[06.07 21:39:00] [Server] 	at com.sk89q.worldguard.session.Session.testMoveTo(Session.java:180) ~[worldguard-bukkit-7.0.8-SNAPSHOT-dist.jar:?]
[06.07 21:39:00] [Server] 	at com.sk89q.worldguard.bukkit.listener.PlayerMoveListener.onPlayerMove(PlayerMoveListener.java:105) ~[worldguard-bukkit-7.0.8-SNAPSHOT-dist.jar:?]
[06.07 21:39:00] [Server] 	at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor176.execute(Unknown Source) ~[?:?]
[06.07 21:39:00] [Server] 	at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:75) ~[paper-api-1.19-R0.1-SNAPSHOT.jar:?]
[06.07 21:39:00] [Server] 	at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[paper-api-1.19-R0.1-SNAPSHOT.jar:git-Paper-52]
[06.07 21:39:00] [Server] 	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-api-1.19-R0.1-SNAPSHOT.jar:?]
[06.07 21:39:00] [Server] 	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:664) ~[paper-api-1.19-R0.1-SNAPSHOT.jar:?]
[06.07 21:39:00] [Server] 	at net.minecraft.server.network.ServerGamePacketListenerImpl.handleMovePlayer(ServerGamePacketListenerImpl.java:1535) ~[?:?]
[06.07 21:39:00] [Server] 	at net.minecraft.network.protocol.game.ServerboundMovePlayerPacket.handle(ServerboundMovePlayerPacket.java:29) ~[?:?]
[06.07 21:39:00] [Server] 	at net.minecraft.network.protocol.game.ServerboundMovePlayerPacket$PosRot.handle(ServerboundMovePlayerPacket.java:88) ~[?:?]
[06.07 21:39:00] [Server] 	at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$1(PacketUtils.java:51) ~[?:?]
[06.07 21:39:00] [Server] 	at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.19.jar:git-Paper-52]
[06.07 21:39:00] [Server] 	at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?]
[06.07 21:39:00] [Server] 	at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[?:?]
[06.07 21:39:00] [Server] 	at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1358) ~[paper-1.19.jar:git-Paper-52]
[06.07 21:39:00] [Server] 	at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:183) ~[paper-1.19.jar:git-Paper-52]
[06.07 21:39:00] [Server] 	at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?]
[06.07 21:39:00] [Server] 	at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1335) ~[paper-1.19.jar:git-Paper-52]
[06.07 21:39:00] [Server] 	at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1328) ~[paper-1.19.jar:git-Paper-52]
[06.07 21:39:00] [Server] 	at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?]
[06.07 21:39:00] [Server] 	at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1306) ~[paper-1.19.jar:git-Paper-52]
[06.07 21:39:00] [Server] 	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1191) ~[paper-1.19.jar:git-Paper-52]
[06.07 21:39:00] [Server] 	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:302) ~[paper-1.19.jar:git-Paper-52]
[06.07 21:39:00] [Server] 	at java.lang.Thread.run(Thread.java:833) ~[?:?]

The spawn has the following attributes:

[06.07 21:42:46] [Multicraft] Console ran command: region info spawn -w SpawnWorld
[06.07 21:42:46] [Server] [INFO] ----------------- Region Info -----------------
[06.07 21:42:46] [Server] Regionspawn (type=cuboid, priority=0)
[06.07 21:42:46] [Server] Flagsother-explosion: DENY, invincible: ALLOW, leaf-decay: DENY, coral-fade: DENY, keep-inventory: true, mob-damage: DENY, ravager-grief: DENY, nether-portals: DENY, mushroom-growth: DENY, lightning: DENY, enderman-grief: DENY, pvp: DENY, vine-growth: DENY, damage-animals: DENY, snow-melt: DENY, tnt: DENY, greeting-title: Welcome to Spawn!, frosted-ice-form: DENY, mycelium-spread: DENY, block-trampling: DENY, ice-melt: DENY, chest-access: DENY, fire-spread: DENY, sleep: DENY, keep-exp: true, entity-painting-destroy: DENY, lighter: DENY, use-dripleaf: ALLOW, pistons: DENY, frostwalker: DENY, soil-dry: DENY, fall-damage: DENY, item-frame-rotation: DENY, potion-splash: DENY, grass-growth: DENY, lava-fire: DENY, use: ALLOW, snow-fall: DENY, firework-damage: DENY, use-anvil: DENY, respawn-anchors: DENY, wither-damage: DENY, ice-form: DENY, mob-spawning: ALLOW, crop-growth: DENY, natural-hunger-drain: DENY, creeper-explosion: DENY, item-durability: DENY, ghast-fireball: DENY, entity-item-frame-destroy: DENY, farewell-title: See you later!, vehicle-destroy: DENY, ride: DENY, vehicle-place: DENY, snowman-trails: DENY, godmode: ALLOW, frosted-ice-melt: DENY
[06.07 21:42:46] [Server] Owners(none)
[06.07 21:42:46] [Server] Members(none)
[06.07 21:42:46] [Server] Bounds(-213, 47, -151) -> (73, 319, 161)
[06.07 21:42:46] [Server] Any names suffixed by * are 'last seen names' and may not be up to date.

I'm guessing this has to do with the Godmode flag being enabled, but that's an intentional choice to protect players in Spawn. This is occurring with version 4.2.0 of the plugin available on Spigot.

Was fixed in dc6613f

The fix isn't included in the release currently available on Spigot. Is this slated for the next release instead?

Yeah, this effects relatively small group of people and doesn't necessarily require a hot fix. Next release is coming in the upcoming weeks.