SpigotMC/Spigot — pull request #181 by eah2119 (2014-06-27 00:13:19+00:00)
Title: Do not allow tile entity worlds to be null

The crashes related to getOwner are due, in part, to the way MC handles tile entities and the implementation of getOwner in TileEntity by CB. Specifically, it's caused by referencing a tile entity's null world. Here, I've effectively made it so tile entity worlds can not be null. In certain instances, Mojang has made it so the assignment of a world is delayed until after iterating and ticking through tile entities (related to avoiding ConcurrentModificationException). I can't find any reason to delay the assignment, so this PR has made it so tile entities have a world right out of the oven. I think and I hope this fixes the getOwner crashes and avoids other crashes in the future.

I have yet to try this with a "corrupt" world file and since it's a rare occurrence, I'm asking anyone with said world to please send it my way (via spigot.org) so this can be tested.