Restrict having multiple items

Discussion in 'Archived: Plugin Requests' started by Superboop, Nov 26, 2012.

  1. Offline

    Superboop

    Plugin category: MECH

    Suggested name: ThereCanBeOnlyOne / OnlyOneItem

    What I want: So I'd like to be able to limit some items, so that a person can't have more than one of the item in their hotbar. To put it in context, say:

    - Limit to only having 1 diamond sword in your hotbar
    - Define a group (apple and eggs), allow only one item from group in your hotbar (apple and no egg, or vice versa)
    - etc.

    Any "multiple/disallowed" items in your hotbar should be moved into your 3 rows of inventory, so the player can still carry them around.

    The config should allow defining groups and limiting items.

    Ideas for commands: No commands needed for this plugin.

    Ideas for permissions: therecanbeonlyone.bypass - Bypass these limits. Defaults to OP?

    When I'd like it by: Yesterday.
     
  2. Offline

    Tehmaker

    I guess, if you want it, I shouldn't hate on it.... but... Isn't the whole point of minecraft health pots and swords, is to fight? Carry more, so you survive longer, not less? I do not see how it is a problem, but this is just my opinion.

    I will not say, it is your server, so do whatever, as it should be up to the major pvp'ing players. This is another one of those plugins that I hate, because 11 year olds are crying so they don't die.

    IT might be a good idea to limit something such as food, so players are forced to go to their base more often, and risk dying faster in pvp.

    I am gunna stay out oft he requests, because it makes me wanna puke.
     
    chakyl likes this.
  3. Offline

    Superboop

    You're right. What I'm trying to do with this plugin isn't to do with swords and such, but something quite different. I just put it into a general context, where everyone can understand.

    And just to let you know.. making 11 year olds cry is the objective in my server.
     
    chakyl and AndyMcB1 like this.
  4. Offline

    Tehmaker

    Hahaha, well, If no one does it, I can do it for you
     
  5. Offline

    Superboop

    Sure. The method I was thinking of was, if there are two of the same restricted items on the hotbar, then it gets moved to the "inventory screen" other than the hotbar. This way they can actually pickup items and carry them around without having it glitch and reject it or something.
     
  6. Offline

    Superboop

  7. Offline

    Superboop

    Another bump.

    So uh, anyone?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 30, 2016
  8. Offline

    Superboop

    So I guess nobody, then?
     
  9. Offline

    Superboop

    Another bump.
     
  10. Offline

    Superboop

    Well, this is getting sad.. I need this plugin though. It can't be that hard :confused:
    (In relation to some other major plugins)
     
  11. Offline

    Superboop

    Another bump.
     
  12. Offline

    Superboop

    A bump after 7 months. Is excessive bumping worthy of an infraction?

    Edited the OP to make it more clearer.

    Bump.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 30, 2016
  13. Offline

    Superboop

    Anyone?

    Bumping again.

    Bumping.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 30, 2016
  14. Offline

    ceoepts

    Lol! No-one really?!
    I feel your pain.... I can try doing this no promisses though

    Edit:
    I dont understand this though:
    - Define a group (apple and eggs), allow only one item from group in your hotbar (apple and no egg, or vice versa)
     
  15. Offline

    Superboop

    For example, if there's a group of wood sword, stone sword, and iron sword:

    I can put only one of the three items in my hotbar.

    If I have a wood sword in my hotbar I can't put a stone or iron sword in my hotbar.

    I can put the wood sword out of my hotbar, then I can put a stone sword or iron sword in my hotbar.
    Etc.

    Also, many thanks for your willingness to make this plugin :)
     
  16. Offline

    ceoepts

    I start out with no groups and add' em later im soon done with defining wich items you can only have one of. Btw if you have 2 of a item one of them will drop to block that players are having a full inventory and the diamond sword still is on the action bar

    Here is the first release this does not allow groups atm.
    https://dl.dropboxusercontent.com/u/42929866/ThereCanOnlyBeOne.jar
    cfg:
    Code:
    Items:
    - 276
    - 1
    The
    - 276 and 1 is item ids this does not allow you to have 2 stacks of stone in your hotbar at once and it does not allow you to have 2 stacks of diamond swords in your hotbar at once

    Release 2:
    GROUPS ADDED! :D
    DOWNLOAD:
    https://dl.dropboxusercontent.com/u/42929866/ThereCanOnlyBeOne.jar
    Here is the config:
    Code:
    swords:
    - 267
    - 268
    - 272
    - 276
    Groups:
    - swords
    
    This is how it works. If i want lets say to make the player only able to 1 stack of eggs or 1 stack of snowballs in the inventory at ones i do it like this.
    Step one add the group to the grouplist:
    To add a group to the grouplist i have to add it to the groups easy like this
    Code:
    Groups:
    - swords
    - throwables
    Step two defining group:
    Now i have to define what items the group contains to do that i have to add a brand new list to the config like this:
    Code:
    throwables:
    
    under the name of the group we have to write in the item ids with a "- " in the beginning like this:
    Code:
    - 344 //Eggs id
    - 332 //Snowballs id
    We are using data valuse you can see them here
    http://minecraft-ids.grahamedgecombe.com/
    Together it should now look like this
    Code:
    throwables:
    - 344 //Eggs id
    - 332 //Snowballs id
    Step three all together:
    Now were basically done with the configuration for our new group now everything should look like this:
    Code:
    swords:
    - 267
    - 268
    - 272
    - 276
     
    Groups:
    - swords
    - throwables
    Hope this plugin is what you wanted if you want please donate to my paypal Here:
    [​IMG]
    It buys me cookies! :)
    Sry for bad english. :p

    Sry for spamming but this is the last thing.
    Im done. Everything added now.
    now i have added op bypass and so if the inventory is not full the item gets moved to the inventory instead of dropping
    Download final:https://dl.dropboxusercontent.com/u/42929866/ThereCanOnlyBeOne.jar


    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 30, 2016
  17. Offline

    Jade

    Just an FYI, Superboop, bumps are one every 24 hours.
     
  18. Offline

    Superboop

    I cannot thank enough for the completion of this plugin request.
    If I can ask one question, though: Can this also support metadata? Such as names, enchantment, etc.
     
  19. Offline

    ceoepts

    I could add it but i dont think i wanna. Im sorry but i have my own things to develope. Im gonna open my own server. And np
    Edit:
    What do you mean? I think it should support it with the drop/move system but i wont add in the cfg
    Edit 2:
    Oh damnit! I just found it ill fix it :)

    Try this one.
    DOWNLOAD!
    Supports:
    Display Name
    Enchants
    Lore
    FireWorkEffect
    All that things that are configured by nbt-data

    Give me ip to server? That would be enough of a payment
    I still accept donations only 1$ gives me 30/8 more days for a fragnet server. Or 30/5 more days for a enjin webhosting :)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 30, 2016

Share This Page