@@ -29,19 +29,18 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -109,6 +113,15 @@
|
||||
ItemStack itemstack = entityhuman.b(enumhand);
|
||||
@@ -110,6 +114,14 @@
|
||||
|
||||
if (itemstack.getItem() == Items.SHEARS && this.hasPumpkin() && !this.world.isClientSide) {
|
||||
+ // CraftBukkit start
|
||||
+ PlayerShearEntityEvent event = new PlayerShearEntityEvent((org.bukkit.entity.Player) entityhuman.getBukkitEntity(), this.getBukkitEntity());
|
||||
+ this.world.getServer().getPluginManager().callEvent(event);
|
||||
if (itemstack.getItem() == Items.SHEARS && this.hasPumpkin()) {
|
||||
if (!this.world.isClientSide) {
|
||||
+ // CraftBukkit start
|
||||
+ PlayerShearEntityEvent event = new PlayerShearEntityEvent((org.bukkit.entity.Player) entityhuman.getBukkitEntity(), this.getBukkitEntity());
|
||||
+ this.world.getServer().getPluginManager().callEvent(event);
|
||||
+
|
||||
+ if (event.isCancelled()) {
|
||||
+ return false;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
this.setHasPumpkin(false);
|
||||
itemstack.damage(1, entityhuman, (entityhuman1) -> {
|
||||
entityhuman1.d(enumhand);
|
||||
+ if (event.isCancelled()) {
|
||||
+ return false;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
this.setHasPumpkin(false);
|
||||
itemstack.damage(1, entityhuman, (entityhuman1) -> {
|
||||
entityhuman1.d(enumhand);
|
||||
|
||||
Reference in New Issue
Block a user