SPIGOT-7814: Call PlayerShearEntityEvent for Bogged
By: Doc <nachito94@msn.com>
This commit is contained in:
parent
3c20906a6b
commit
76326aa5f8
1 changed files with 15 additions and 0 deletions
|
@ -0,0 +1,15 @@
|
||||||
|
--- a/net/minecraft/world/entity/monster/Bogged.java
|
||||||
|
+++ b/net/minecraft/world/entity/monster/Bogged.java
|
||||||
|
@@ -79,6 +79,12 @@
|
||||||
|
ItemStack itemstack = entityhuman.getItemInHand(enumhand);
|
||||||
|
|
||||||
|
if (itemstack.is(Items.SHEARS) && this.readyForShearing()) {
|
||||||
|
+ // CraftBukkit start
|
||||||
|
+ if (!org.bukkit.craftbukkit.event.CraftEventFactory.handlePlayerShearEntityEvent(entityhuman, this, itemstack, enumhand)) {
|
||||||
|
+ this.getEntityData().markDirty(Bogged.DATA_SHEARED); // CraftBukkit - mark dirty to restore sheared state to clients
|
||||||
|
+ return EnumInteractionResult.PASS;
|
||||||
|
+ }
|
||||||
|
+ // CraftBukkit end
|
||||||
|
this.shear(SoundCategory.PLAYERS);
|
||||||
|
this.gameEvent(GameEvent.SHEAR, entityhuman);
|
||||||
|
if (!this.level().isClientSide) {
|
Loading…
Add table
Add a link
Reference in a new issue