mirror of
https://github.com/PaperMC/Paper.git
synced 2026-11-25 10:29:41 -05:00
Added EntityTame event. Fixes BUKKIT-1109
This commit is contained in:
1 parent
e625999f24
commit
fce3386aa0
2 files changed
+4
-2
No files matched your search
@@ -186,7 +186,8 @@ public class EntityWolf 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.setPathEntity((PathEntity) null);
|
||||
this.b((EntityLiving) null);
|
||||
|
||||
Reference in new issue
Block a user