mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-28 13:36:16 +01:00
Fixed the fix of the EntityTame event.
This commit is contained in:
parent
a5dd42adb9
commit
0b92a51ba7
@ -374,12 +374,8 @@ 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);
|
|
||||||
|
|
||||||
if (!event.isCancelled()) {
|
|
||||||
// CraftBukkit end
|
|
||||||
this.d(true);
|
this.d(true);
|
||||||
this.a((PathEntity) null);
|
this.a((PathEntity) null);
|
||||||
this.setSitting(true);
|
this.setSitting(true);
|
||||||
@ -392,7 +388,6 @@ public class EntityWolf extends EntityAnimal {
|
|||||||
this.world.a(this, (byte) 6);
|
this.world.a(this, (byte) 6);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user