Don't call duplicate interact air events. Fixes BUKKIT-5359

Previously we attempted to call interact events in cases that were missing
by modifying the arm swing logic. This, however, was too broad and started
triggering events in cases we already covered leading to duplicates. Since
the only case we can handle cleanly and the primary point of the previous
fix was fluids we now instead simply treat fluids as air for this check.
This also ensures we do not get duplicate events when the player is in a
fluid and hits a normal block, unlike the previous change.

This reverts commit 68b702f7 and replaces it with a better fix.
Allow AsynchronousExecutor.getSkipQueue() to pull tasks from the queue
Load all already generated chunks via async chunk system

Currently we use the async chunk loading system only when players trigger
chunk loading. If a chunk is loaded for any other reason it goes through
a separate codepath. This means if a player has trigged a chunk load and
before the chunk loads something else wants the same chunk we will load it
twice and throw away the second result. With this change we instead use
the sync processing feature of the AsynchronousExecutor to load the chunk
which will pull it out of the queue if it was already queued to load. This
means we only ever load a chunk once. Because chunk generation is not
thread safe we still fallback to the vanilla chunk loading system if the
chunk does not currently exist.
[Bleeding] Handle players disconnecting during respawn. Fixes BUKKIT-4327

Prior to this commit, a player disconnected during a respawn event would
remain in memory. This causes a ghosting issue of players in the slot
count and player list, as well as a reference leak.

This commit avoids re-adding the player to the player list (and world) if
they are disconnected. This ensures that the remainder of the respawn
logic is completed as well as ensuring a duplicate player is not left on
the server.

This commit also saves the player's file at the end of the method if they
have been disconnected to ensure that their next login is accurate to the
respawn event's actions. A player that was revived and disconnected will
reconnect as revived.
Implement SpawnReason.NETHER_PORTAL and DISPENSE_EGG. Fixes BUKKIT-3148

Previously any entities spawned through dispensers (monster eggs) or
by nether portals were given the incorrect SpawnReason of SPAWNER_EGG.
This made it impossible to distinguish what exactly happened in regards
to the creature being spawned.

A method in ItemMonsterEgg has been added to further fine tune reasons
for spawning creatures. This permits the DISPENSE_EGG reason to be used
correctly and accuratly as well as the NETHER_PORTAL reason due to how
BlockPortal spawns the mobs.

The redirected method, a(World, int, double, double, double), is still
called by the ItemMonsterEgg itself and therefore uses the default reason
of SPAWNER_EGG. This does not change previous behaviour.
Update clients when ItemFrame direction is set. Fixes BUKKIT-3371

Hanging entities are placed into the entity tracker and updates are sent
out to clients for the initial placement. Thereafter data watchers are
configured to monitor the item inside the frame. However, if the
direction the ItemFrame facing changes the entity tracker will not send
out updates.

This commit removes and recreates the ItemFrame entity in the same way
that was already done for Painting entities. This causes clients to
be updated appropriately.
Spigot
mc-dev import fixes
EmpireCraft POM Changes
Misc EMC Changes

Only spawn 1 ocelot ever from eggs.
Load custom permissions before plugins
Unload plugins after everything else
Color name tags to match list
Make Durability enchant scale 0-80% reduction on Armor damage (up to level 5)
Zombies break down doors on normal
Update inventory on block place/interact cancellation
Anti Dupe

Remove CraftBukkit "Feature" of ItemStack's having infinite use if less than 0 stack size.
Blocks most cases of < 0 itemstack dupe bugs
Mob Spawning Events

Add 2 events for better control of mob spawning (Natural and Spawners) This allows us a much more powerful control over spawning and improve performance
PlayerUseItem Event

This lets us control when an item is consumed and change the item.
EMC Anvil Tweaks

Make Items not have a repair cost increase due to Anvil usage.
Renaming is only 5 levels, combines include free renames.
Hidden Item Meta

This adds the ability to store hidden metadata in item lore.

Simply set a line to "&&::META" and every blank line before, that line, and every line after will be hidden from view on the client.

for example, you can set &&::META on line 20, and there will not be 19 blank lines before it.
Then you can store Data on 21+

Also adds a &&::SHINY tag to send a fake enchantment aura if it does not exists.
Must be set before META
Persistent Meta API

This adds an API for getting and setting PERSISTENT Metadata
Meta data can be stored on Worlds, Entities, Chunks and at a Block level.
Meta is is provided in a simple Map/List setup and does not expose raw NBT access.
Chunk Save Reattempt

We commonly have "Stream Closed" errors on chunk saving, so this code should re-try to save the chunk in the event of failure and hopefully prevent rollbacks.
Keep certain items on death API

This adds a getItemsToKeep to PlayerDeathEvent that can be modified for what item a player should keep upon death.

This can be used for never-to-be-dropped items.
Anvil Event

Fire an event for anvil usage
ArrowHitBlock Event