Visual-Illusions / Realms

Realms - Minecraft Server Mod (Canary/Bukkit) Plugin for Area Protections
http://wiki.visualillusionsent.net/view/Realms
1 stars 0 forks source link

[Bukkit] Realms can't detect default group ? #40

Closed TISNF closed 10 years ago

TISNF commented 10 years ago

If a player does not belong to any groups that are above the "default" group the console will begin spamming this generic statement upon the player's actions:

[Realms] An unexpected exception occured @ PLAYER_MOVE. Caused by: java.lang.NullPointerException

It is not just limited to moving but to any interaction such BLOCK_PLACE, BLOCK_BREAK, etc.

**The player will also be able to ignore permissions related to the interactions thus allowing them to build and destroy anywhere.

darkdiplomat commented 10 years ago

I need to know more about the exception, could you enable debugging and stacktraces in the config and post the trace here?

TISNF commented 10 years ago

Unfortunately that is all I get when stacktraces and debugging is enabled in the Realms configuration file. I don't get the actual trace only that there's a null pointer exception @ the player's action. When the player moves about you see the console being spammed by the same message I have in the first comment.

darkdiplomat commented 10 years ago

I am not getting any exceptions but there does appear to be an issue with the logger not outputting things like it should so I could very well be missing something

darkdiplomat commented 10 years ago

committed a fix for the logger, should be able to see the trace now Also, if you have debug.all on, be aware that it will spam every little action Realms tracks

TISNF commented 10 years ago

Alrighty... this is what I got:

[01:45:29] [Server thread/ERROR]: [Realms] An unexpected exception occurred @ PLAYER_MOVE. Caused by: java.lang.NullPointerException [01:45:29] [Server thread/ERROR]: [Realms] [[REALMS-DEBUG-STACKTRACE]] java.lang.NullPointerException at net.milkbowl.vault.permission.plugins.Permission_PermissionsBukkit.playerInGroup(Permission_PermissionsBukkit.java:158) ~[Vault.jar:?] at net.milkbowl.vault.permission.Permission.playerInGroup(Permission.java:486) ~[Vault.jar:?] at net.visualillusionsent.realms.bukkit.Bukkit_User.isInGroup(Bukkit_User.java:91) ~[Realms.jar:jnks26] at net.visualillusionsent.realms.zones.permission.Permission.applicableToPlayer(Permission.java:80) ~[Realms.jar:jnks26] at net.visualillusionsent.realms.zones.permission.Permission.applicable(Permission.java:101) ~[Realms.jar:jnks26] at net.visualillusionsent.realms.zones.Zone.permissionCheck(Zone.java:894) ~[Realms.jar:jnks26] at net.visualillusionsent.realms.bukkit.Realms_BukkitListener.onPlayerMove(Realms_BukkitListener.java:728) [Realms.jar:jnks26] at sun.reflect.GeneratedMethodAccessor171.invoke(Unknown Source) ~[?:?] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_45] at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_45] at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:318) [spigot.jar:git-Spigot-1322] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) [spigot.jar:git-Spigot-1322] at org.bukkit.plugin.TimedRegisteredListener.callEvent(TimedRegisteredListener.java:30) [spigot.jar:git-Spigot-1322] at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:487) [spigot.jar:git-Spigot-1322] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:472) [spigot.jar:git-Spigot-1322] at net.minecraft.server.v1_7_R1.PlayerConnection.a(PlayerConnection.java:235) [spigot.jar:git-Spigot-1322] at net.minecraft.server.v1_7_R1.PacketPlayInFlying.a(SourceFile:137) [spigot.jar:git-Spigot-1322] at net.minecraft.server.v1_7_R1.PacketPlayInLook.handle(SourceFile:98) [spigot.jar:git-Spigot-1322] at net.minecraft.server.v1_7_R1.NetworkManager.a(NetworkManager.java:147) [spigot.jar:git-Spigot-1322] at net.minecraft.server.v1_7_R1.ServerConnection.c(ServerConnection.java:77) [spigot.jar:git-Spigot-1322] at net.minecraft.server.v1_7_R1.MinecraftServer.u(MinecraftServer.java:700) [spigot.jar:git-Spigot-1322] at net.minecraft.server.v1_7_R1.DedicatedServer.u(DedicatedServer.java:273) [spigot.jar:git-Spigot-1322] at net.minecraft.server.v1_7_R1.MinecraftServer.t(MinecraftServer.java:562) [spigot.jar:git-Spigot-1322] at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java:469) [spigot.jar:git-Spigot-1322] at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:617) [spigot.jar:git-Spigot-1322]

darkdiplomat commented 10 years ago

This ends up out side Realms, https://github.com/MilkBowl/Vault/blob/master/src/net/milkbowl/vault/permission/plugins/Permission_PermissionsBukkit.java#L158 Appears to be that perms.getPlayerInfo(player) is the exact point of the null pointer.

I have wrote in a try catch to handle the issue forcing it to default to a isOp check on the user

TISNF commented 10 years ago

LOL... your song and dance around the NPE corrected the issue... thanks!