示例#1
0
 @Override
 public boolean isEquipment(org.bukkit.inventory.ItemStack itemStack) {
   {
     ItemStack itemstack = CraftItemStack.asNMSCopy(itemStack);
     int slot = EntityInsentient.d(itemstack).c();
     if (slot == 0) {
       if (itemstack.getItem() instanceof ItemSword) {
         return true;
       } else if (itemstack.getItem() instanceof ItemAxe) {
         return true;
       } else if (itemstack.getItem() instanceof ItemSpade) {
         return true;
       } else if (itemstack.getItem() instanceof ItemHoe) {
         return true;
       } else if (itemstack.getItem() instanceof ItemPickaxe) {
         return true;
       } else if (itemstack.getItem() instanceof ItemBow) {
         return true;
       }
       return false;
     }
     return true;
   }
 }
示例#2
0
 public ItemStack asNmsItemStack(org.bukkit.inventory.ItemStack itemStack) {
   return CraftItemStack.asNMSCopy(itemStack);
 }
示例#3
0
 public org.bukkit.inventory.ItemStack asBukkitItemStack(ItemStack itemStack) {
   return CraftItemStack.asBukkitCopy(itemStack);
 }
示例#4
0
 @Override
 public org.bukkit.inventory.ItemStack compundToItemStack(TagCompound compound) {
   return CraftItemStack.asBukkitCopy(ItemStackNBTConverter.compundToItemStack(compound));
 }