Bukkit/Bukkit — pull request #870 by meiskam (2013-05-04 11:09:55+00:00)
Title: [B+C] Stores mob spawn reason inside the mob. Adds BUKKIT-2598

**The Issue**:

Currently, mob spawn reason is only available inside of a CreatureSpawnEvent.

**Justification for this PR**:

Multiple plugins save this data in maps for various reasons, which is usually lost after a server restart. This request centralizes the data to one location, and is persistant over restarts.

**PR Breakdown**:

On creature spawn, the reason is stored in an internal variable inside the living entity. On map save/load it is stored inside the mob's NBT tag Bukkit.spawnReason.

**Testing Results and Materials**:

On mob damage, their spawn reason is messaged to the damager. Plugin source is inside jar.
CraftBukkit: http://dropbox.meiskam.shininet.org/minecraft/bukkit/test/MobSpawnReason/craftbukkit-b2771-MobSpawnReason.jar
Plugin: http://dropbox.meiskam.shininet.org/minecraft/bukkit/test/MobSpawnReason/MobSpawnReasonTest.jar

**Relevant PR**:

**JIRA Ticket**:

BUKKIT-2598 - https://bukkit.atlassian.net/browse/BUKKIT-2598