You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
1.2 KiB
28 lines
1.2 KiB
--- ../src-base/minecraft/net/minecraft/item/ItemShears.java |
|
+++ ../src-work/minecraft/net/minecraft/item/ItemShears.java |
|
@@ -3,6 +3,8 @@ |
|
import java.util.ArrayList; |
|
import java.util.Random; |
|
|
|
+import org.bukkit.event.player.PlayerShearEntityEvent; |
|
+ |
|
import net.minecraft.block.Block; |
|
import net.minecraft.block.material.Material; |
|
import net.minecraft.creativetab.CreativeTabs; |
|
@@ -61,6 +63,16 @@ |
|
IShearable target = (IShearable)entity; |
|
if (target.isShearable(itemstack, entity.worldObj, (int)entity.posX, (int)entity.posY, (int)entity.posZ)) |
|
{ |
|
+ // Cauldron start |
|
+ PlayerShearEntityEvent event = new PlayerShearEntityEvent((org.bukkit.entity.Player) player.getBukkitEntity(), entity.getBukkitEntity()); |
|
+ player.worldObj.getServer().getPluginManager().callEvent(event); |
|
+ |
|
+ if (event.isCancelled()) |
|
+ { |
|
+ return false; |
|
+ } |
|
+ |
|
+ // Cauldron end |
|
ArrayList<ItemStack> drops = target.onSheared(itemstack, entity.worldObj, (int)entity.posX, (int)entity.posY, (int)entity.posZ, |
|
EnchantmentHelper.getEnchantmentLevel(Enchantment.fortune.effectId, itemstack)); |
|
|
|
|