NavidK0 / Carbon

Carbon is a Spigot plugin which turns a spigot protocol hacked server (on 1.7.10) into a 1.8 server.
GNU Lesser General Public License v3.0
35 stars 19 forks source link

[Bug] Buttons above or below blocks throwing off error in LogBlock when the block is broken. #13

Closed mibby closed 10 years ago

mibby commented 10 years ago

Compiled source as of commit https://github.com/NavidK0/Carbon/commit/0da8f35147fc1efd4dec38482b1917617485f908

Breaking the block a button is on when the button is above or below the block causes an error to occur in the console.

[06:31:48] [Server thread/ERROR]: Could not pass event BlockBreakEvent to LogBlock v1.81
org.bukkit.event.EventException
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:302) ~[spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
    at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:509) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:494) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
    at net.minecraft.server.v1_7_R4.PlayerInteractManager.breakBlock(PlayerInteractManager.java:264) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
    at net.minecraft.server.v1_7_R4.PlayerInteractManager.dig(PlayerInteractManager.java:118) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
    at net.minecraft.server.v1_7_R4.PlayerConnection.a(PlayerConnection.java:552) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
    at net.minecraft.server.v1_7_R4.PacketPlayInBlockDig.a(PacketPlayInBlockDig.java:41) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
    at net.minecraft.server.v1_7_R4.PacketPlayInBlockDig.handle(PacketPlayInBlockDig.java:65) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
    at net.minecraft.server.v1_7_R4.NetworkManager.a(NetworkManager.java:186) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
    at net.minecraft.server.v1_7_R4.ServerConnection.c(ServerConnection.java:81) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
    at net.minecraft.server.v1_7_R4.MinecraftServer.v(MinecraftServer.java:734) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
    at net.minecraft.server.v1_7_R4.DedicatedServer.v(DedicatedServer.java:289) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
    at net.minecraft.server.v1_7_R4.MinecraftServer.u(MinecraftServer.java:584) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
    at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:490) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
    at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
Caused by: java.lang.NullPointerException
    at org.bukkit.craftbukkit.v1_7_R4.block.CraftBlock.getRelative(CraftBlock.java:179) ~[spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
    at org.bukkit.craftbukkit.v1_7_R4.block.CraftBlock.getRelative(CraftBlock.java:175) ~[spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
    at de.diddiz.util.LoggingUtil.smartLogBlockBreak(LoggingUtil.java:145) ~[?:?]
    at de.diddiz.LogBlock.listeners.BlockBreakLogging.onBlockBreak(BlockBreakLogging.java:49) ~[?:?]
    at sun.reflect.GeneratedMethodAccessor346.invoke(Unknown Source) ~[?:?]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_20]
    at java.lang.reflect.Method.invoke(Method.java:483) ~[?:1.8.0_20]
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:298) ~[spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
    ... 15 more
Shevchik commented 10 years ago

Probably logblock passed null blockface because it doesn't expect that buttons can be above or below the blocks. Can't do anything with that unfortunately.

NavidK0 commented 10 years ago

This cannot be solved, null block face given by button being on an invalid face in 1.7.10 . This issue doesn't occur on Prism, I don't think.