3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-16 21:10:17 +01:00

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,12 +374,8 @@ public class EntityWolf extends EntityAnimal {
}
if (!this.world.isStatic) {
// CraftBukkit start
if (this.random.nextInt(3) == 0) {
EntityTameEvent event = CraftEventFactory.callEntityTameEvent(this, entityhuman);
if (!event.isCancelled()) {
// CraftBukkit end
// CraftBukkit - added event call and isCancelled check.
if (this.random.nextInt(3) == 0 && !CraftEventFactory.callEntityTameEvent(this, entityhuman).isCancelled()) {
this.d(true);
this.a((PathEntity) null);
this.setSitting(true);
@ -392,7 +388,6 @@ public class EntityWolf extends EntityAnimal {
this.world.a(this, (byte) 6);
}
}
}
return true;
}