Examples of toItemStack()


Examples of com.gmail.nossr50.datatypes.skills.alchemy.AlchemyPotion.toItemStack()

            AlchemyPotion output = PotionConfig.getInstance().getPotion(input.getChildDataValue(ingredient));

            inputList.add(input);

            if (output != null) {
                inventory.setItem(i, output.toItemStack(item.getAmount()).clone());
            }
        }

        FakeBrewEvent event = new FakeBrewEvent(brewingStand.getBlock(), inventory);
        mcMMO.p.getServer().getPluginManager().callEvent(event);
View Full Code Here

Examples of org.bukkit.material.Dye.toItemStack()

                try {
                    Dye dye = new Dye();
                    dye.setColor(DyeColor.valueOf(color.toUpperCase().trim()));

                    item = dye.toItemStack(amount);
                }
                catch (IllegalArgumentException ex) {
                    reason.add("Invalid Dye_Color: " + color);
                }
            }
View Full Code Here

Examples of org.bukkit.material.MaterialData.toItemStack()

          s.setAmount(stackSize + room);
          result -= room;
        }
      } else {
        MaterialData materialData = new MaterialData(material, data);
        ItemStack newone = materialData.toItemStack(curAmount);
        result -= curAmount;
        inventory.setItem(sI, newone);
      }
    }
    return result;
View Full Code Here

Examples of org.bukkit.material.MaterialData.toItemStack()

  @Override
  protected boolean init(final @Nullable Class<? extends Enderman> c, final @Nullable Enderman e) {
    if (e != null) {
      final MaterialData m = e.getCarriedMaterial();
      if (m != null) {
        final ItemStack i = m.toItemStack(1);
        if (i == null)
          return false;
        hand = new ItemType[] {new ItemType(i)};
      }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.