Should fix NPE in tablets, closes #427.

This commit is contained in:
Florian Nücke 2014-07-23 13:56:32 +02:00
parent 6bf9423f35
commit 52006b3bfd

View File

@ -257,11 +257,12 @@ object Tablet extends Callable[TabletWrapper] with RemovalListener[String, Table
def onRemoval(e: RemovalNotification[String, TabletWrapper]) { def onRemoval(e: RemovalNotification[String, TabletWrapper]) {
val tablet = e.getValue val tablet = e.getValue
tablet.stop()
if (tablet.node != null) { if (tablet.node != null) {
// Server.
tablet.stop()
tablet.node.remove() tablet.node.remove()
tablet.writeToNBT()
} }
tablet.writeToNBT()
} }
@ForgeSubscribe @ForgeSubscribe