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,12 +257,13 @@ object Tablet extends Callable[TabletWrapper] with RemovalListener[String, Table
def onRemoval(e: RemovalNotification[String, TabletWrapper]) {
val tablet = e.getValue
tablet.stop()
if (tablet.node != null) {
// Server.
tablet.stop()
tablet.node.remove()
}
tablet.writeToNBT()
}
}
@ForgeSubscribe
def onWorldUnload(e: WorldEvent.Unload) {