Give Every player an Unlimited Amount of a Certain Item

Discussion in 'Archived: Plugin Requests' started by CoolOppo, Jun 15, 2011.

  1. Offline

    CoolOppo

    I would like a plugin that makes sure my users always have one sign (or a full stack, configurable how many) on them. You should also be able to set it for other stuff too, like torches, to encourage users to help out and light it up outside. I do not want to have any commands in-game, and I know the Essentials already has a command to let users place infinite amounts of an item, except I'm not always online, and it's a pain in the butt to do. I would really appreciate if somebody did this or pointed me towards something that did!
    Cheers.
     
    Liam Allan likes this.
  2. Offline

    Liam Allan

    I can do it! :D
     
    CoolOppo likes this.
  3. Offline

    CoolOppo

    Awesome! If you do, please post on this thread when you are done so that I can know that you did.
    :D
     
  4. Offline

    tips48

    You mean onJoin they get this? Or they always have a sign?
     
  5. Offline

    Liam Allan

    OnJoinEvent (JoinEvent event) {
    Blah Blah Blah
     
  6. Offline

    tips48

    So, player x joins, player x gets an item? Oh, thats easy.
     
  7. Offline

    CoolOppo

    You always have a configurable amount the item specified in the configuration.
    No, not on join, you always have a configurable amount the item specified in the configuration.
     
    Liam Allan likes this.
  8. Offline

    tips48

    Oh. So player x will never have less than x item?
     
  9. Offline

    CoolOppo

    Exactly!
     
  10. Offline

    tips48

    Hmm... That would be somewhat memory intensive. Would you check if the player has item on PLAYER_INTERACT or PLAYER_MOVE?

    Sorry to hijack @Liam Allan 's answer, but im pretty much done, i just need to add a quick config parser. Is it ok if i give it to you in, say, 20 minutes? Also, i need to know weither to use PLAYER_INTERACT or PLAYER_MOVE.. I'm using PLAYER_MOVE as it will update more, but PLAYER_INTERACT will probably use less memory

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

    Liam Allan

    OK, Thats saves me time, I can go work on my plugin :D Thanks @tips48 !
     
  12. Offline

    tips48

    Any time :D Sorry, alta is working on a Herobrine plugin with me, but he's working on a huge update, so i have nothing to do until he finishes :p
     
  13. Offline

    Liam Allan

    Oh, Ok. :D If you want something todo sometime, Let me know. I'm sure I have lots of things to be done :D
     
  14. Offline

    tips48

    ok xD
    @CoolOppo i have pretty much finished, the only bug is say you want to give the player 3 lava. When the player places lava, it goes down to 2. It only goes back up to 3 when the player is out of lava. I'll work on fixing it real quick...

    Done with the one glitch i said above. If thats a problem tell me and i'll figure out a solution.
    Download
    Will auto-create a configuration file. Change it to id:ammount. E.x to make it give you 30 stone and 20 wood:
    Code:
    1:30,17:20
    Enjoy :D
    (also, the config creation is bugged a little it adds / here and there, just delete the / and ignore them xD)

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

    Liam Allan

    Well done! :D

    Can we have source code? <3 :D

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

    tips48

    Thanks :D About the source code, i wasn't planning on making a git repo for it, but since you asked nicely... :D
    one sec
    EDIT: ugly but done :p https://github.com/tips48/AlwaysHave
     
  17. Offline

    Liam Allan

    Just upload tp pastebin.com save time :D <3
     
  18. Offline

    tips48

    meh, github ftw
     
  19. Offline

    Liam Allan

    Ok, let me know when you have done :D
     
  20. Offline

    tips48

  21. Offline

    Liam Allan

    That could of been my plugin! i'm sueing! :p Jokes <3

    Can I help by adding permissions support?

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

    tips48

    :D
    watch me get banned by EvilSeph because he didn't see Jokes :p
    And you can add permissions support, but im already pretty much done, so theres no work to do :D
     
  23. Offline

    Liam Allan

    Ok, Ill edit the source of there :p
     
  24. Offline

    tips48

    to slow! jk xD No, ill just be like "who the hell is editing my source?" and disregard it :p lets race xD

    I win(done)

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

    CoolOppo

    Thanks!
     
  26. Offline

    tips48

    mhmm :D
     

Share This Page