Use the result of EntityPortalExitEvent. Fixes BUKKIT-3559.
Always use the set exit location for portal events. Fixes BUKKIT-3555.
Fix players spawning above portals. Fixes BUKKIT-3542.

Vanilla does not check for blocks in which the player could
suffocate when changing dimension, so portals will happily spawn
players in blocks when using a portal under certain
circumstances. However, we currently check for these instances
and move the player up until they will not suffocate. This means
that players can sometimes be taken to above the target portal,
making it seem as if a portal was not created. Instead, we now
disable this suffocation check when moveToWorld is called from
changeDimension, mirroring vanilla behavior more accurately.
Always return a TravelAgent; Fixes BUKKIT-3541

Recent changes caused PlayerPortalEvent to suddenly return null
unexpectedly and could end up in NPEs resulting that did not before.
This commit addresses that situation by always ensuring a TravelAgent
instance is returned.

The TravelAgent for world 0 is returned arbitrarily in an effort to
compensate for plugins that are implementation dependent and expect some
form of a TravelAgent to be accessible in the event at all times.
POM Changes.
Spigot changes.
Address BUKKIT-3286 by firing the inventory close event when a secondary container is closed due to the player entity being destroyed. This covers all edge cases such as server stop / player kick / player quit.
Update item merge logic
Include NibbleArray from mc-dev for diff visibility
Implement 'lightening' of NibbleArrays - only allocate buffers when non-trivial value Saving from 40-45% of memory use by chunk section data.

Finish up NibbleArray lightening work - use for Snapshots, reduce copies

Fix nibble handling with NBT - arrays aren't copied by NBTByteArray
Return LOHS to full operation.
Update timeout time to new default value.
Per world view distance.
Fix various crop growth modifier formula issues
Add OldChunkLoader from mc-dev for diff visibility
Fix mcRegion-to-Anvil conversion
Update versioning check to correctly resolve api version.
Optimize packet used to unload chunks for the client

At the moment telling a client to unload a chunk involves calling the entire chunk from memory, deflating it and then sending it through the pipes even though the client ignores it and based on the bitmap simply unloads the chunk, and to add the cherry on top, this is done on the main server thread.
Skip entity.move() if we are not moving anywhere.
Alternate, sync-free-but-safe chunk reference cache