satoshinm / WebSandboxMC

Bukkit plugin providing a web-based interface with an interactive WebGL 3D preview or glimpse of your server 🕷⏳📦 ⛺
https://www.spigotmc.org/resources/websandboxmc.39415/
MIT License
19 stars 5 forks source link

Use Sign/BlockFace over deprecated getData(). Closes GH-66 #81

Closed satoshinm closed 7 years ago

satoshinm commented 7 years ago

https://github.com/satoshinm/WebSandboxMC/issues/66

satoshinm commented 7 years ago
18:30:32 [SEVERE] [WebSandboxMC] Error while executing GlowTask{id=15, plugin=WebSandboxMC v1.9.0, sync=true: io.github.satoshinm.WebSandboxMC.ws.WebSocketFrameHandler$1@47730a3}
java.lang.NullPointerException
    at org.bukkit.material.Sign.getFacing(Sign.java:147)
    at io.github.satoshinm.WebSandboxMC.bridge.BlockBridge.notifySignChange(BlockBridge.java:713)
    at io.github.satoshinm.WebSandboxMC.bridge.BlockBridge.setBlockUpdate(BlockBridge.java:306)
    at io.github.satoshinm.WebSandboxMC.bridge.BlockBridge.sendWorld(BlockBridge.java:135)
    at io.github.satoshinm.WebSandboxMC.ws.WebSocketServerThread.handleNewClient(WebSocketServerThread.java:175)
    at io.github.satoshinm.WebSandboxMC.ws.WebSocketServerThread.handle(WebSocketServerThread.java:189)
    at io.github.satoshinm.WebSandboxMC.ws.WebSocketFrameHandler$1.run(WebSocketFrameHandler.java:50)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at net.glowstone.scheduler.GlowTask.run(GlowTask.java:167)
    at net.glowstone.scheduler.GlowScheduler.pulse(GlowScheduler.java:152)
    at net.glowstone.scheduler.GlowScheduler.lambda$start$0(GlowScheduler.java:83)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:748)
satoshinm commented 7 years ago

Developed an isolated plugin to help test: https://github.com/satoshinm/SignTestPlugin Issues apparently in Glowstone/Glowkit: https://github.com/GlowstoneMC/Glowstone/pull/483 https://github.com/GlowstoneMC/Glowstone/issues/484 - but as these are NPE's I ought to be able to catch them in my plugin, too.