Development Assistance Is it possible

Discussion in 'Plugin Help/Development/Requests' started by DreamGamer, Oct 28, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    DreamGamer

    Hey :)

    I have a problem and i dont know it's possible.

    I use Cauldron and Bukkit for a ModServer Bukkit to use Plugins cauldron to use Mods.

    And i try to block crafting i know how it work in Vanilla but not how can work with mods.

    In Vanilla i can use this

    Code:
    @EventHandler
        public void craftItem(PrepareItemCraftEvent e) {
            Material itemType = e.getRecipe().getResult().getType();
            if(itemType == Material.ANVIL) {
                e.getInventory().setResult(new ItemStack(Material.AIR));
                for(HumanEntity he:e.getViewers()) {
                    if(he instanceof Player) {
                        ((Player)he).sendMessage(ChatColor.RED+"Das hättest du wohl gerne");
                    }
                }
            }
        }
    And how i can block mod items ? it is possible or not ?







    ( Sry for my bad English :D #ImGerman )
     
  2. Offline

    timtower Administrator Administrator Moderator

    @DreamGamer Probably need to work with itemID's then, not sure, I keep my modding and Bukkit separated most of the time.
     
  3. Offline

    DreamGamer

    @timtower How i can change this to id ?

    if(itemType == Material.ANVIL)
     
  4. Offline

    timtower Administrator Administrator Moderator

  5. Offline

    DreamGamer

    Thanks :D its work :D
     
Thread Status:
Not open for further replies.

Share This Page