Fixed the fix of the EntityTame event.

Dieser Commit ist enthalten in:
EvilSeph 2011-06-23 19:26:36 -04:00
Ursprung a5dd42adb9
Commit 0b92a51ba7

Datei anzeigen

@ -374,23 +374,18 @@ public class EntityWolf extends EntityAnimal {
} }
if (!this.world.isStatic) { if (!this.world.isStatic) {
// CraftBukkit start // CraftBukkit - added event call and isCancelled check.
if (this.random.nextInt(3) == 0) { if (this.random.nextInt(3) == 0 && !CraftEventFactory.callEntityTameEvent(this, entityhuman).isCancelled()) {
EntityTameEvent event = CraftEventFactory.callEntityTameEvent(this, entityhuman); this.d(true);
this.a((PathEntity) null);
if (!event.isCancelled()) { this.setSitting(true);
// CraftBukkit end this.health = 20;
this.d(true); this.a(entityhuman.name);
this.a((PathEntity) null); this.a(true);
this.setSitting(true); this.world.a(this, (byte) 7);
this.health = 20; } else {
this.a(entityhuman.name); this.a(false);
this.a(true); this.world.a(this, (byte) 6);
this.world.a(this, (byte) 7);
} else {
this.a(false);
this.world.a(this, (byte) 6);
}
} }
} }