Wallets that can only hold certain items

Discussion in 'Archived: Plugin Requests' started by chilbree, Nov 13, 2013.

  1. Offline

    chilbree

    Plugin category: General

    Suggested name: Wallets

    What I want: The player types /wallet to open their wallet, and only certain items can be put in (for example emeralds). This would be useful for holding arrows, money items, and others. The items able to be put in the wallet can be set in the config, and the spaces in the backpack. When the player dies 10% of the items in the wallet are dropped.

    Ideas for commands: /wallet, /walletsreload

    Ideas for permissions: wallets.wallet (allows players to open their wallet) wallets.reload (name says all)

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

    Monkeyboystein

    I could try this
     
  3. Offline

    Gopaintman

    Let me take a shot at this. Seems simple enough.
    However the 10% dropped could be an issue
     
  4. Offline

    jacklin213

    how many slots does the wallet need to have?
     
  5. Offline

    chilbree

    The same as a small chest :)


    Thanks. The dropped part isn't vital. There could be an option for if the wallet items drop on death :)
     
  6. Offline

    jacklin213

    I nearly have wallet part done, just need to code the saving wallet part
     
  7. Offline

    Gopaintman

    Last edited by a moderator: Nov 4, 2016
  8. Offline

    jacklin213

  9. Offline

    Gopaintman

    Potion effects?
    Also, I examined your source a bit (Hope you don't mind) and you're using a configmanager class? Why not just use Bukkit's inbuilt getConfig() methods?
    Also when grabbing integers its not necessary to grab it as a string from the config and then parse it. Last, this is just preference to me, however why make a new inventory whenever someone joins? If its a big server that gets a lot of people that only stay for a minute, that inventory is a waste of space. I just made it so when they type /wallet it creates it (if they don't already have one) and then opens the wallet.
    Just again just my thoughts, don't mean to be offensive.
     
  10. Offline

    chilbree

    [quote uid=90801385 name="Gopaintman" post=1999867]Wait till the project gets accepted and you'll be on your way!
    http://dev.bukkit.org/bukkit-plugins/wallet/

    EDIT:
    <Edit by Moderator: Redacted mediafire url>
    Use that for now[/quote]

    Thanks!

    [quote uid=103857 name="jacklin213" post=2000083]heres my version, supports Potion effects on items which ^ does not cover, Added number of slots configuration as well :d

    @Gopaintman not trying to copy, just wanted to put my version out there if thats alright with you

    https://www.dropbox.com/s/1lthjix02sft6gk/Wallets.jar

    Plugin page for mine: http://dev.bukkit.org/bukkit-plugins/wallets/[/quote]

    Thanks!
     
    Last edited by a moderator: Nov 4, 2016
  11. Offline

    jacklin213

    Yeh I also looked through your source and I was surprised that you did it all in one class, and the code was very efficient, for my confighandler class as you see contains a lot of stuff, if I had that in my main class it would be ugly. For geting the integer from config I don't even remember why I used that way lol. Btw Ive never seen that way of capitalizing before, it's so efficient. Is there a page about it? Also I think I removed the onJoin event, I might have forgotten to update it in drop box

    Np, do you will want the drop 10% items on death? And what would happen if that person only had 1 item in their inventoy, drop that?
     
  12. Offline

    Gopaintman


    http://commons.apache.org/proper/commons-lang/apidocs/org/apache/commons/lang3/text/WordUtils.html
    I just use it because its there and it works. Don't know if it causes more overhead.
     
  13. Offline

    jacklin213

Share This Page