This commit allows Spigot to support Minecraft clients both of versions 1.7.x and of 1.8.x.
*** It is imperative that backups be taken before installing this build on your server! ***
Please note that this commit is NOT a fully functioning 1.8 server and does not contain all aspects of 1.8 support.
Many months of time and effort have gone into ensuring that this patch is as complete, bug free and reliable as possible, however it is highly likely there will be as of yet undiscovered bugs and glitches.
Please report any such issues to the bug report forum, stating your client, server, and if applicable BungeeCord versions.
*** Any bug reports not running the very latest versions of these softwares will be ignored ***
Its a rare case but when loading a world from a modded server which added enchantments
CraftMetaItem would add a null enchantment into the enchantment map which causes
NullPointers later
The CraftBukkit code that auto repairs corrupted tile entities never was updated for Trapped Chest.
If a Trapped Chest gets its Tile Entity corrupted, it will crash the server every time the chunk is loaded.
This will now fix Trapped Chests too.
Instead of doing an unsafe cast, actually check if the HumanEntity supplied is a CraftHumanEntity. Plugins adding custom HumanEntities to the viewers of an inventory will end up crashing the server when the Chunk containing the block which contains the inventory unloads, since the original cast is unchecked here.
I'm not sure if there was a reason for casting to CraftHumanEntity, so I kept it, but HumanEntity, as I'm sure you know, has a closeInventory() method you could call instead of getting the CraftBukkit handle. There's probably a reason behind it, though.
I tried to follow the formatting conventions, but I may have missed something.
Tested the easily reproducible issue using this patch compiled, and it works fine; no crashes in sight.