Set the Crafting Result to air

Discussion in 'Plugin Development' started by -JHB-, May 3, 2011.

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


    So basicly what i'm looking for is a way to prevent somebody from crafting some item.
    I'm now stuck at the IInventory class.
    I just need a simple way to keep the server from creating the new item stack and removing the used items.
         ItemStack[] result = ((containerBench.a.getContents()));
                if (this.plugin.getPlayerListener().lookup(result[0].id,craftPlayer, this.plugin.getPlayerListener().lookPermissions(craftPlayer)) == false ){
                    containerBench.b.a(0, 0);
                    else {kill();
    the lookup functions just look if he git the right to place it.

    I hope sobody can help me :]
  2. Offline


  3. Offline


    But he wants to prevent a specific player from crafting something, doesn't he?

    I recently tried to do the same thing. I edited the file to call a new event called PLAYER_CRAFT and check, if it's been cancelled or not. If it has been cancelled, the server just doesn't send the SetSlot packet so the player does not get the crafted item.
  4. Offline


    Oooh... Specific person... Didn't think of that XD
  5. Offline


    Can't say any solution ATM, but it's a feature that BukkitContrib will have soon.
    (Sorry normal people, only plugin developers and mods can see the link contents. ;) )
  6. Offline


    can you dropbox it or something :]

    would be nice to have a look at.

    can you give me a date since i can't get onto the site? ^^
  7. Offline


    Not sure, but possibly a test release this weekend.
  8. Offline


    ok i freeze my plug till then... =/
    thanks :)
Thread Status:
Not open for further replies.

Share This Page