Examples of BrewingStand


Examples of org.bukkit.block.BrewingStand

        if (!UserManager.hasPlayerDataKey(event.getWhoClicked()) || !Permissions.secondaryAbilityEnabled(whoClicked, SecondaryAbility.CONCOCTIONS)) {
            return;
        }

        Player player = (Player) whoClicked;
        BrewingStand stand = (BrewingStand) holder;
        ItemStack clicked = event.getCurrentItem();
        ItemStack cursor = event.getCursor();

        if ((clicked != null && clicked.getType() == Material.POTION) || (cursor != null && cursor.getType() == Material.POTION)) {
            AlchemyPotionBrewer.scheduleCheck(player, stand);
View Full Code Here

Examples of org.bukkit.block.BrewingStand

        } else if (bl.getType() == Material.FURNACE || bl.getType() == Material.BURNING_FURNACE) {
            Furnace c = (Furnace) bl.getState();
            stack = c.getInventory().getResult();
            inv = c.getInventory();
        } else if (bl.getType() == Material.BREWING_STAND) {
            BrewingStand c = (BrewingStand) bl.getState();
            for (ItemStack it : c.getInventory().getContents()) {
                if (ItemUtil.isStackValid(it)) {
                    if (ItemUtil.areItemsIdentical(it, c.getInventory().getIngredient())) {
                        continue;
                    }
                    if(item == null || ItemUtil.areItemsIdentical(it, item)) {
                        stack = it;
                        inv = c.getInventory();
                        break;
                    }
                }
            }
        } else if (bl.getType() == Material.DISPENSER) {
            Dispenser c = (Dispenser) bl.getState();
            for (ItemStack it : c.getInventory().getContents()) {
                if (ItemUtil.isStackValid(it)) {
                    if(item == null || ItemUtil.areItemsIdentical(it, item)) {
                        stack = it;
                        inv = c.getInventory();
                        break;
                    }
                }
            }
        }
View Full Code Here

Examples of org.spout.vanilla.component.block.material.BrewingStand

    this.getDrops().NOT_CREATIVE.addFlags(ToolTypeFlags.PICKAXE);
  }

  @Override
  public boolean onDestroy(Block block, Cause<?> cause) {
    BrewingStand brewingStand = block.get(BrewingStand.class);
    // Drop items
    Inventory inventory = brewingStand.getInventory();
    Point position = block.getPosition();
    for (ItemStack item : inventory) {
      if (item == null) {
        continue;
      }
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.