Always Have An Item

Discussion in 'Archived: Plugin Requests' started by brayden1230, Jan 6, 2014.

  1. Offline

    brayden1230

    Plugin category: Miscellaneous

    Suggested name: AlwaysHave

    What I want: I'd like to have a plugin that allows you to always have a certain items always on the sevrer. But I want the item/items to only be allowed in certain worlds. Ex. Some servers have QuickWarp Compasses, and they have the compass in certain worlds.

    Ideas for commands: No commands needed for this plugin.

    Idea for config:
    Items:
    1.
    2.
    3.
    4.
    5.

    Worlds
    1.
    2.
    3.
    4.
    5.

    Ideas for permissions: item1.(world), item2.(world), ...

    When I'd like it by: ASAP


    If this could be done, I would like to give a big thank you to you.
     
  2. Offline

    dturner699

    brayden1230
    I'm thinking of how I can do this but I'm wondering if the quick warp compasses are a different plugin and if so does it have a command? You can also use multi-verse inventories (need multiverse) to keep each world's inventory separate or group certain ones...if the items (warp clocks, etc) are given by commands I could probably make this for you!
     
    brayden1230 likes this.
  3. Offline

    brayden1230


    The quick warp plugin i have is called, "ClickWarp" http://dev.bukkit.org/bukkit-plugins/clickwarp/ Yes, it does have commands, I would use multiverse inventories, but I think it would be easier to understand to have a plugin like this one. If you can make it, thanks so much!
     
  4. Offline

    dturner699

    brayden1230
    My question is how do they travel through your worlds; signs, plugins etc??? This will make it a lot easier for me (or else I would have to run a continuous loop to get their worlds which could use some cpu) but I'll start working with what I can now...I'm going to play around with the config file and see if I can get it to work..if not you will have to tell me everything you want unfortunately...we'll see.

    brayden1230
    Never mind that...I'm just going to do the loop thing it'll be easier...

    brayden1230
    I'm almost done, here's how it goes:
    Every second, it's going to check what world a player is in.
    If they are in one of the world's in the config,
    it will then go to the items list, if they have the permissions I made
    ah.<world#>.<item#>
    ah.1.1 means: AlwaysHave (plugin name), World 1, Item 1
    Which goes up to ah.5.5
    If they have the correct permission, it will check their inventory to
    see if they have the item and if not, give them the item, if so don't
    give it to them.
    I hope you like this set up!!

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 6, 2016
  5. Offline

    brayden1230

    I LOVE IT! THANK YOU SO MUCH! What permission will you use for it though?
     
  6. Offline

    techboy291

  7. Offline

    dturner699

    techboy291
    I never even knew that was an event...lol. Doesn't really matter though and plus, this is better because if they throw the item out of their inventory they will get it back.

    brayden1230
    You can use any permission plugin I'm pretty sure, if not I know for fact that essentials group manager works...

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

    techboy291

    PlayerDropItemEvent. Cancelling it will give them the item back, I believe. An infinite loop checking if they've dropped an item as frequently as it would is kind of impractical, compared to a method being called only when it's needed. I honestly don't know the side effects of loops, but I would guess that they do have some, and events just seem much, much better to me.
     
  9. Offline

    dturner699

    techboy291 brayden1230
    It's awaiting approval for me right now...
    http://dev.bukkit.org/bukkit-plugins/alwayshave/
    Once it's approved I'll add it to downloads and you can get it!
    Btw could I have a rank on your server and the ip?

    techboy291
    Yeah but the loop always works rather than me having to think of every event, player death event, player drop, maybe they go to a pvp arena in the same world and get their inventory cleared, my way is FAIL PROOF...

    And if he needs for them no to get items in a region in that world, he can just take the permissions I made away in that area...

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 6, 2016
  10. Offline

    dturner699

    brayden1230
    Since bukkit is taking over 2 days to accept my plugin here is a download link:
    <Edit by Moderator: Redacted mediafire url>
     
    Last edited by a moderator: Nov 4, 2016
  11. Offline

    brayden1230

    [quote uid=90817874 name="dturner699" post=2163811]brayden1230
    Since bukkit is taking over 2 days to accept my plugin here is a download link:
    <Edit by Moderator: Redacted mediafire url>

    ExpAsHealth?
     
    Last edited by a moderator: Nov 4, 2016
  12. Offline

    dturner699

    brayden1230
    CRAP sorry I gave you the wrong link here is the right one:
    <Edit by Moderator: Redacted mediafire url>
     
    Last edited by a moderator: Nov 4, 2016
  13. Offline

    brayden1230

    [quote uid=90817874 name="dturner699" post=2165890]brayden1230
    CRAP sorry I gave you the wrong link here is the right one:
    <Edit by Moderator: Redacted mediafire url>

    It would also be cool if you could name the item or give it a lore (description)! Just an idea.
     
    Last edited by a moderator: Nov 4, 2016
  14. Offline

    dturner699

    brayden1230
    ..."Thanks dturner699"
    lol jk I never used lores yet so I don't know if I will.
     

Share This Page