[INACTIVE][ECON/FUN] BuyAbilities v0.8.9 - Purchase Abilities [740]

Discussion in 'Inactive/Unsupported Plugins' started by rcjrrjcr, Mar 31, 2011.

  1. Offline

    rcjrrjcr

    NEW THREAD

    BuyAbilities - Purchase Abilities:
    Version: v0.8.9

    BuyPermissions is a plugin that allows your players to purchase abilities or permissions with iConomy/EssentialsEco/BOSEconomy money! This way, players can finally have a long-term investment for their virtual money, instead of spending it on items. Also, the time-based and use-based rent systems allow temporary access to permissions.

    Abilities are groups of related permission nodes, which are granted to the player upon purchase. Abilities are also grouped into categories, which the server admins can deny or allow access to via permissions.

    Original Suggestion Thread
    Purchasable Permissions/Abilities

    Features:
    • Rent abilities for a specified duration
    • Purchase uses of an ability and its associated commands
    • Purchase abilities permanently and retain its benefits forever (theoretically:p)
    Download


    Help

    Source Code

    Requirements:
    • An economy plugin (iConomy 4, EssentialsEco, BOSEconomy)
    • A permissions plugin (Permissions 2.7, GroupManager)
    Usage Instructions:

    • Plugin commands are "/bab" and "/buyab". Each can be used instead of the other.
    • From player's chat:
      • "/bab categories" returns all accessible categories.
      • "/bab category <categoryname>" returns all abilities in the category.
      • "/bab page" lists all accessible abilities.
      • "/bab current" lists all active abilities.
      • "/bab buy <abilityname>" buys an ability.
      • "/bab rent <abilityname>" rents an ability for a period of time.
      • "/bab rentuse <abilityname>" purchases uses of an ability.
      • "/bab info <abilityname>" returns information about that ability.
      • "/bab help <abilityname>" returns the help text about that ability.
    • From server console:
      • "/bab listall" prints out a list of all active abilities for all players.
      • "/bab status" prints out the current status of the hooks into the permissions and economy plugins.
    • For admins:
      • To allow usage of the /bab command, grant the permission "buyabilities.use".
      • To allow access to a category, grant the permission "buyabilities.abilities.<categoryname>" where <categoryname> is the name of the category, with periods replacing spaces.
      • NOTE: A user can access an ability if he can access any single one of its categories. It does not matter if he can access its other categories, just one.
    • NOTE: If an ability or category name is misspelled, this plugin will provide suggestions for the correct spelling of the name.
    Changelog:
    Version 0.8.9
    • Fixes ability removal bug. Iterators finally get a use.
    Show Spoiler
    Show Spoiler


    Version 0.8.8
    • Update for CB 740.
    Version 0.8.7
    • ?
    Version 0.8.6
    • Fixed regex matching whole string bug
    Version 0.8.5

    • Fixed bugs because of Permissions caching old permissions.
    Version 0.8.4

    • Fixed NPE when saving player data
    • Fixed permissions bug
    • Added BOSEconomy support.
    Version 0.8.3

    • Fixed data.yml not being created.
    Version 0.8.2

    • Removed interfering code from another git branch.
    Version 0.8.1

    • Fixed cost data not loading.
    Version 0.8

    • Auto-loading and auto-saving of player data during join/quit events.
    Version 0.7.3


    • General fixes.
    Version 0.7.2


    • Recompile for CB 617.
    Version 0.7.1


    • Recompile for CB 602.
    Version 0.7


    • Added suggestions for ability/category names in case it is misspelled.
    Version 0.6


    • Added usage counters.
    Version 0.5.6


    • Changed package names to conform to Java's naming conventions.
    Version 0.5.5


    • Minor optimisations.
    Version 0.5.4


    • Abilities can belong to multiple categories.
    Version 0.5.3


    • Fixed another NPE due to FakePermissions confusing the plugin.
    • Added permissions to use /bab.
    • Changed category permission format.
    Version 0.5.2


    • Fixed actual cause behind NPE.
    Version 0.5.1


    • Fixed NPE bug when hooking into economy.
    Version 0.5


    • First release. Permissions unsupported though.
    Version 0.01


    • First announced version. Not working yet.



    TODO
    1. FIX ALL BUGS
    2. Better and easier implementation of ranks
      • Add requirements for rank advances
    3. Graphical editor for costs.yml
    4. Scripts for activation/deactivation.
    Suggestions and ideas are welcome!


    Credits:

    I would like to credit the people whose code I used:

    Report bugs by enclosing the exception's stack trace, your costs.yml and data.yml in spoilers.
     
  2. Offline

    BioRage

    @rcjrrjcr Awesome, thank you I'll test that in bit,
     
  3. Offline

    rcjrrjcr

    Version 0.8.7 released! Fixes regex loading bug.
     
  4. Offline

    darkwarriors

    nothing change..

    Code:
    Data:
        darktest:
            world:
                Jump:
                    duration: 5
                    nodes:
                    - essentials.jump
                    type: USE
    
    
    Code:
    19:42:54 [INFO] [AuthMe] Player darktest logged in!
    19:43:23 [INFO] Adding permission essentials.jump to player darktest.
    19:43:25 [INFO] §9[PLAYER_COMMAND] darktest: /jump
    19:43:28 [INFO] §9[PLAYER_COMMAND] darktest: /jump
    19:43:30 [INFO] §9[PLAYER_COMMAND] darktest: /jump
    19:43:32 [INFO] §9[PLAYER_COMMAND] darktest: /jump
    19:43:35 [INFO] §9[PLAYER_COMMAND] darktest: /jump
    19:43:37 [INFO] §9[PLAYER_COMMAND] darktest: /jump
    19:43:40 [INFO] §9[PLAYER_COMMAND] darktest: /jump
    19:43:42 [INFO] darktest tried command: jumpo
    19:43:46 [INFO] §9[PLAYER_COMMAND] darktest: /jump
    
    another bug in parsing file:

    Code:
                    duration: 3000
        SetHome:
            info:
                name: 'Home'
                description: 'Allows you to set and change your home'
                help: 'Type /setHome to create your home and /home to access it.'
            permissions:
                - 'essentials.sethome'
            categories:
                - 'movement'
            costs:
                buy:
                    cost: 1000
                rent:
                    cost: 100
                    duration: 5000
                use:
                    cost: 50
                    usecount: 3
    
    but with /bab info SetHome it doeasnt display rentuse
    http://imagestorming.com/media/r1u/1302630886/2011-04-12_19.54.06.png
     
  5. Offline

    darthsiddious

    i didnt save my txt file. its fixed now.

    i am getting a weird error now. its below.

    Code:
    2011-04-12 15:38:46 [INFO] Player "darthsiddious" joined!
    2011-04-12 15:38:46 [SEVERE] java.lang.NullPointerException
    2011-04-12 15:38:46 [SEVERE]    at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin.settings.Settings.getInfo(Settings.java:141)
    2011-04-12 15:38:46 [SEVERE]    at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin.storage.StorageYaml.getPlayerData(StorageYaml.java:104)
    2011-04-12 15:38:46 [SEVERE]    at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin.BuyAbilities.processLogonLogoff(BuyAbilities.java:843)
    2011-04-12 15:38:46 [SEVERE]    at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin.PlayerLoaderSaver.run(BuyAbilitiesPlayerListener.java:87)
    2011-04-12 15:38:46 [SEVERE]    at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:33)
    2011-04-12 15:38:46 [SEVERE]    at java.lang.Thread.run(Unknown Source)
    2011-04-12 15:39:21 [INFO] Whitelist: Player rouing is trying to join...
    2011-04-12 15:39:21 [INFO] allow!
    2011-04-12 15:39:21 [INFO] rouing [/70.128.124.157:54122] logged in with entity id 612
    2011-04-12 15:39:21 [INFO] Player "rouing" joined!
    2011-04-12 15:39:21 [SEVERE] java.lang.NullPointerException
    2011-04-12 15:39:21 [SEVERE]    at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin.settings.Settings.getInfo(Settings.java:141)
    2011-04-12 15:39:21 [SEVERE]    at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin.storage.StorageYaml.getPlayerData(StorageYaml.java:104)
    2011-04-12 15:39:21 [SEVERE]    at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin.BuyAbilities.processLogonLogoff(BuyAbilities.java:843)
    2011-04-12 15:39:21 [SEVERE]    at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin.PlayerLoaderSaver.run(BuyAbilitiesPlayerListener.java:87)
    2011-04-12 15:39:21 [SEVERE]    at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:33)
    2011-04-12 15:39:21 [SEVERE]    at java.lang.Thread.run(Unknown Source)
    2011-04-12 15:39:30 [INFO] /98.197.85.238:50021 lost connection
     
  6. Offline

    Beatkidz

    Have same problem as others
    When i Rentuse a command i get left with the command
     
  7. Offline

    darkwarriors

    yeah @rcjrrjcr some news?
     
  8. Offline

    darkwarriors

    rcjrrjcr pls fix and update this plugin! i need it so much.
     
  9. Offline

    Beatkidz

    i'm not a coder at all. but i know Mcmmo did this.
    Switched time keeping to time stamps instead of ticks.. i think.
    i know they were having some problems with timers.
    also i want this SOOOOOOO bad to be updated and work 100%.
    are you still working on it?
     
  10. Offline

    haldavid

    is this abandoned?
     
  11. Offline

    superzanti

    I LOVE THIS PLUGIN!

    But, quick questions:
    I only want users to be able to rent on my server, so is there any way to use the command like:
    /rentab < ability >

    Thats not a big deal though.
    Currently I'm having trouble with just renting.
    If a player rents an ability, it works, but after the time is up, they can still use that ability. Though, if you reload permissions, it goes back to how it should be.
    How can I fix this?

    Any news on the status of this?
    The source on github doesn't seem to be up-to-date.

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

    funky man

    Just wondering if this is still supported?
     
  13. Offline

    superzanti

  14. Offline

    p.ndsl

    Awesome plugin, keep up the good work!
    Here, have a cake. [cake]
     
    superzanti likes this.
  15. Offline

    allisgood888

    Why can't you add it so that you pick which economy plugin to use? I use iconomy for my main economy on the server, but boseconomy for the donation system, which is what I'm trying to use.
     
  16. Offline

    funky man

    Is this working for anybody on build 733+ ?
     
  17. Offline

    RomaClanServer

    Without extensive testing to try to get it to work or figure out the problem, this is not working for me. Players lose their permissions after buying them and I get the occasional error on log in and out.
    Note: It was working on pre-773 builds
     
  18. Offline

    MineralMC

  19. Offline

    kahlilnc

    *Waiting*
     
  20. Offline

    rcjrrjcr

    Admittedly, I have not been concentrating on developing this plugin for the past few weeks. :p I'm trying to rewrite some of the messy code I had previously. It might take a while though.

    EDIT: Yay! Code cleanup complete! Testing time.

    Version 0.8.8 released. Updated for CB 740.

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

    funky man

    Thank you for update, my players will be happy :)
     
    RomaClanServer likes this.
  22. Offline

    RomaClanServer

    second
     
  23. Offline

    haldavid

    Renting still borked. It'll let users rent abilities, but the timer doesn't take it away when it expires. =(
     
  24. Offline

    superzanti

    Bump:

     
  25. Offline

    rcjrrjcr

    Fixing.
     
  26. Offline

    superzanti

    Awesome. Thank you so much.
     
  27. Offline

    rcjrrjcr

    Version 0.8.9 released. Fixes ability removal bug.
     
  28. Offline

    superzanti

    Hmm... It removes the permission now in the world.yml file for permissions, but permissions doesn't seem to reload, so they still have the ability until the server reloads the permissions file.
     
  29. Offline

    rcjrrjcr

    What version of Permissions are you using?
     
  30. Offline

    superzanti

    Wow thanks so much! This plugin works like a charm!
    I love this plugin.

    Yeah, I was still on permissions 2.7.0
    As soon as I updated to permissions 2.7.2 it started working.

    Thanks again! :)
    Have a cake! [cake]
     
  31. Offline

    GyD

    How does it work when a player rent an Abilities and is offline ?
     

Share This Page