Added EntityTame event. Fixes BUKKIT-1109

This commit is contained in:
EvilSeph committed 2012-03-09 22:26:21 -05:00
1 parent e625999f24
commit fce3386aa0
2 files changed
+4 -2

No files matched your search

@@ -115,7 +115,8 @@ public class EntityOcelot extends EntityTameableAnimal {
}
if (!this.world.isStatic) {
if (this.random.nextInt(3) == 0) {
// CraftBukkit - added event call and isCancelled check.
if (this.random.nextInt(3) == 0 && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityTameEvent(this, entityhuman).isCancelled()) {
this.setTamed(true);
this.setCatType(1 + this.world.random.nextInt(3));
this.setOwnerName(entityhuman.name);