Crafting table keeps items

Discussion in 'Archived: Plugin Requests' started by DaziePants, Jun 26, 2014.

  1. Offline

    DaziePants

    I would like to know or if someone can make me a plugin that when you place items into a crafting table and then exit the crafting menu, the items stay in the crafting table instead of popping out
     
  2. Offline

    ThunderDragon32

    This isn't the correct format.
     
  3. Offline

    timtower Administrator Administrator Moderator

    The format is suggested, not required
     
    Alster551, Lionhard and Stealth2800 like this.
  4. Offline

    Stealth2800

    I can make this for you DaziePants, do you have a name in mind? I'm just using 'WorkbenchInventory' for now. Also, do you want any commands, permissions, and/or configuration options?

    EDIT: I just thought of a potential problem, what if two players use a crafting table? Should they see the same thing? Should crafting tables be blocked if they're in use? Should the items save for each player so they see the items THEY left in there?
     
  5. Offline

    DaziePants

    The name you're using is fine. If two players use a crafting table, I'd like them to see the same thing.
    Thanks, for doing this for me :)
     
  6. Offline

    Zupsub

    Just notice Stealth2800: if two players use the crafting table at the same moment and you dsiplay them both the itens and they both craft them, they have doubled items. So from original 2 sticks and 3 diamonds (f.e.) they could craft 2 pickaxes. If three players use the crafting table three pickaxes..
     
  7. Offline

    Onlineids

    Zupsub Not if he gets the Crafting Event and removes the items
     
  8. Offline

    Zupsub

    Onlineids of course, there several ways solving this, just wanted to mention that it has to be solved
     
  9. Offline

    Stealth2800

    DaziePants Okay, I'm not sure if I'll be able to pull off players seeing the same thing in a workbench. Currently, I'm experiencing the strangest bug when multiple players use a single workbench.
    1. Two players: Stealth2800 and KnownOne
    2. Stealth2800 opens workbench
    3. KnownOne opens workbench (places item in workbench, show up differently for Stealth2800)
    4. KnownOne places item in the bottom right slot, gets disconnected with ArrayIndexOutOfBoundsException: 9 (Stealth2800 has no problems)
    5. Stealth2800 leaves workbench and re-opens
    6. Now the items line up properly on both screens, but both players get the ArrayIndexOutOfBoundsException upon putting an item in the bottom right slot
    If anyone has any ideas, that'd be great so I could get this working properly. I'm getting this issue using the Bukkit API alone. I was trying another way with CraftBukkit/NMS code but I was getting issues with the bottom inventory being the same for both players in the crafting table (even though I thought I made sure to fix it).
    Anyway, it would be easier for me right now to just make it so only a single player can use any given workbench at a time. It'll always be possible to revise the plugin if a fix is found for the previously mentioned error.
     
  10. Offline

    DaziePants

    That's okay, just make it for a single player to use a workbench for now
     
  11. Offline

    Stealth2800

Share This Page