Examples of canCraft()


Examples of com.flansmod.common.CraftingInstance.canCraft()

    }
   
    ItemStack resultStack = new ItemStack(entryPicked.armours[piece].item);
   
    CraftingInstance crafting = new CraftingInstance(inventory, entryPicked.requiredStacks[piece], resultStack);
    if(crafting.canCraft())
    {
      crafting.craft(inventory.player);
    }
  }
 
View Full Code Here

Examples of org.mctourney.autoreferee.AutoRefMatch.canCraft()

    BlockData recipeTarget = BlockData.fromItemStack(event.getRecipe().getResult());
    if (team != null && !team.canCraft(recipeTarget)) event.setCancelled(true);

    // if this is on the blacklist, cancel
    if (!match.canCraft(recipeTarget)) event.setCancelled(true);
  }

  @EventHandler(priority=EventPriority.MONITOR, ignoreCancelled=true)
  public void itemCraftMonitor(CraftItemEvent event)
  {
View Full Code Here

Examples of org.mctourney.autoreferee.AutoRefTeam.canCraft()

    if (!(event.getWhoClicked() instanceof Player)) return;
    AutoRefTeam team = plugin.getTeam((Player) event.getWhoClicked());

    BlockData recipeTarget = BlockData.fromItemStack(event.getRecipe().getResult());
    if (team != null && !team.canCraft(recipeTarget)) event.setCancelled(true);

    // if this is on the blacklist, cancel
    if (!match.canCraft(recipeTarget)) event.setCancelled(true);
  }
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.