[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

    rcjrrjcr

    ...
    Is the costs.yml even in the folder plugin/BuyAbilities/ ??
     
  3. Offline

    Fiddy_percent

    Yeah just checked
    im still getting
    Code:
    2011-04-04 08:30:41 [INFO] Starting minecraft server version Beta 1.4
    2011-04-04 08:30:41 [INFO] Loading properties
    2011-04-04 08:30:41 [INFO] Starting Minecraft server on *:25565
    2011-04-04 08:30:41 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-612-g4c7a9e7-b617jnks (MC: 1.4)
    2011-04-04 08:30:41 [INFO] Preparing level "world"
    2011-04-04 08:30:41 [INFO] Preparing start region
    2011-04-04 08:30:41 [INFO] 144 recipes
    2011-04-04 08:30:42 [INFO] Invalid config file found and converted to proper name/format.
    2011-04-04 08:30:42 [INFO] [Permissions] (Phoenix) was Initialized.
    2011-04-04 08:30:42 [INFO] [ecoCreature] version {0.0.4f} is loading.
    2011-04-04 08:30:42 [INFO] BorderGuard Lite (Round) version 2.4 is enabled!
    2011-04-04 08:30:42 [SEVERE] java.lang.Exception: plugins\BuyAbilities\data.yml not found.
    2011-04-04 08:30:42 [SEVERE]     at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin.storage.StorageYaml.init(StorageYaml.java:30)
    2011-04-04 08:30:42 [SEVERE]     at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin.BuyAbilities.hook(BuyAbilities.java:228)
    2011-04-04 08:30:42 [SEVERE]     at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin.BuyAbilities.onEnable(BuyAbilities.java:82)
    2011-04-04 08:30:42 [SEVERE]     at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:118)
    2011-04-04 08:30:42 [SEVERE]     at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:514)
    2011-04-04 08:30:42 [SEVERE]     at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:216)
    2011-04-04 08:30:42 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:94)
    2011-04-04 08:30:42 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:72)
    2011-04-04 08:30:42 [SEVERE]     at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:215)
    2011-04-04 08:30:42 [SEVERE]     at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:202)
    2011-04-04 08:30:42 [SEVERE]     at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:142)
    2011-04-04 08:30:42 [SEVERE]     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:257)
    2011-04-04 08:30:42 [SEVERE]     at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    2011-04-04 08:30:42 [SEVERE] null loading BuyAbilities v0.8.2 (Is it up to date?)
    java.lang.NullPointerException
        at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin.BuyAbilities.onDisable(BuyAbilities.java:143)
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:120)
        at org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(JavaPluginLoader.java:528)
        at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManager.java:228)
        at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin.BuyAbilities.onEnable(BuyAbilities.java:85)
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:118)
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:514)
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:216)
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:94)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:72)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:215)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:202)
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:142)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:257)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    2011-04-04 08:30:42 [INFO] [Permissions] version [2.5.5] (Phoenix)  loaded
    2011-04-04 08:30:42 [INFO] godPowers version 2.0 is enabled!
    2011-04-04 08:30:42 [INFO] [HeroicDeath] 1.7.2.147 enabled.
    2011-04-04 08:30:42 [INFO] [iChat] Found Permissions (v2.5.5)
    2011-04-04 08:30:42 [INFO] iChat (v2.2.2) enabled
    2011-04-04 08:30:42 [WARNING] [iCoLand] Found 0 lands to protect ( loaded from file )
    2011-04-04 08:30:42 [INFO] [iCoLand] Successfully linked with Permissions
    2011-04-04 08:30:42 [INFO] [iCoLand] Version [v1.17] (initial) enabled
    2011-04-04 08:30:42 [INFO] [iConomy] Logging is currently disabled.
    2011-04-04 08:30:42 [INFO] [iConomy] v4.65 (Kenzi) loaded.
    2011-04-04 08:30:42 [INFO] [iConomy] Developed by: [Nijikokun, Coelho]
    2011-04-04 08:30:42 [INFO] [iCoLand] Successfully linked with iConomy
    2011-04-04 08:30:42 [INFO] [iConomy] hooked into Permissions.
    2011-04-04 08:30:42 [INFO] [mcMMO] Permissions enabled.
    2011-04-04 08:30:42 [INFO] mcMMO version 0.9.15 is enabled!
    2011-04-04 08:30:42 [INFO] MultiHome version 0.5.1 loaded
    2011-04-04 08:30:42 [INFO] [MultiVerse] - Version 1.6 (Permissions 2.5.5) Enabled
    2011-04-04 08:30:42 [INFO] [MultiVerse] Loading World & Settings - 'world' - NORMAL
    2011-04-04 08:30:42 [INFO] [MultiVerse] Loading World & Settings - 'world2' - NORMAL
    2011-04-04 08:30:42 [INFO] [MultiVerse] Loading World & Settings - 'nether' - NETHER
    2011-04-04 08:30:42 [INFO] [MultiVerse] 3 - World(s) loaded.
    2011-04-04 08:30:42 [INFO] [MultiVerse] Loading Portals
    2011-04-04 08:30:42 [INFO] [MultiVerse] 0 - Portal(s) loaded.
    2011-04-04 08:30:42 [INFO] [NoDrop] 0.2.3 is enabled!
    2011-04-04 08:30:42 [INFO] PvP Control version 1.5 is enabled!
    2011-04-04 08:30:42 [INFO] Turnstile 1.4.2 is enabled!
    2011-04-04 08:30:42 [INFO] Turnstile Successfully linked with Permissions!
    2011-04-04 08:30:42 [INFO] Turnstile Successfully linked with iConomy!
    2011-04-04 08:30:42 [INFO] Vanish 1.5.2 loaded.
    2011-04-04 08:30:42 [INFO] Done (0.143s)! For help, type "help" or "?"
    2011-04-04 08:30:47 [INFO] Stopping the server..
    2011-04-04 08:30:47 [INFO] CONSOLE: Stopping the server..
    2011-04-04 08:30:47 [INFO] Stopping server
    2011-04-04 08:30:47 [INFO] Stopping...
    2011-04-04 08:30:47 [INFO] [ecoCreature] has been disabled!
    2011-04-04 08:30:47 [INFO] [HeroicDeath] 1.7.2.147 disabled.
    2011-04-04 08:30:47 [INFO] [iChat] iChat Disabled
    2011-04-04 08:30:47 [INFO] [iCoLand] Version [v1.17] (initial) disabled
    2011-04-04 08:30:47 [INFO] [iConomy] Plugin disabled.
    2011-04-04 08:30:47 [INFO] mcMMO was disabled.
    2011-04-04 08:30:47 [INFO] MultiHome version 0.5.1 unloaded
    2011-04-04 08:30:47 [INFO] [MultiVerse] - Disabled
    2011-04-04 08:30:47 [INFO] [NoDrop] Disabled
    2011-04-04 08:30:47 [INFO] [Permissions] (Phoenix) disabled successfully.
    2011-04-04 08:30:47 [INFO] [iChat] Permissions plugin lost.
    2011-04-04 08:30:47 [INFO] PvP Control says Goodbye!
    2011-04-04 08:30:47 [INFO] Vanish 1.5.2 unloaded.
    2011-04-04 08:30:47 [INFO] Saving chunks
    2011-04-04 08:30:47 [INFO] Stopping server
    heres my yml
    Code:
    Abilities:
        Jump:
          # This name is how the plugin refers to the purchaseable ability internally. It's used in the file described in 2.
            info:
                name: 'jump to aim'
                description: 'allows user to jump to a block you are looking at'
                help: 'To jump type /jump or /j'
            # name/description listed in game/ability inventory. changing the name here would not break the association to users that have bought it.
            permissions:
                - 'essentials.jump'
            # all permission nodes the user would gain access to.
            categories:
                - 'movement'
            # used to organize/filter abilities
            commands:
                - 'RGX=(?i)/j(ump)?'
            # java regex used to check for associated commands
            costs:
                buy:
                    cost: 10000
              # permanent ownership of that permission
                rent:
                    cost: 100
                    duration: 30000
                  # time-based ownership of that permission
                use:
                    cost: 50
                    usecount: 5
                  # use-based ownership of that permission
        vanish:
            info:
                name: 'vanish'
                description: 'Hide from regular players'
                help: 'command: /vanish'
            permissions:
                - 'vanish.vanish'
            categories:
                - 'Fun'
            costs:
                buy:
                    cost: 2500
        Jesus:
            info:
                name: 'Jesus'
                description: 'Allows you walk on water'
                help: 'Type /Jesus to use'
            permissions:
                - 'godPowers.jesus'
            categories:
                - 'fun'
            costs:
                buy:
                    cost: 5000
                rent:
                    cost: 200
                    duration: 5000
        Godmode:
            info:
                name: 'Godmode'
                description: 'Makes you invincable'
                help: 'Type /god to use'
            permissions:
                - 'godPowers.godmode'
            categories:
                - 'fun'
            costs:
                buy:
                    cost: 100000
                rent:
                    cost: 10000
                    duration: 5000
     
  4. Offline

    Tim Fischer

    i want this with groups, not abilitys, so that players have to pay x Gold to join a group...

    this would be great!

    Example:
    Player 1 want to join group A, so he have to pay 100 Gold
     
  5. Offline

    rcjrrjcr

    I'll look at this. I don't have access to my code now so you'll have to wait quite a while.
    Create an ability that is buy only and costs 100 gold.
    Code:
    Abilities:
        GroupA:
             info:
                  name: 'Group A'
    description: 'Group A'
                  helptext: 'Group A'
             permissions:
                  - 'PluginA.NodeA'
             costs:
                 buy:
                     cost:100
    
    This is off the top of my head so I may be wrong. Check the wiki for help. (You know, the big bolded underlined italic link that says "HELP"?)
     
  6. Offline

    Nate Wiebe

    Its complaining about missing data.yml, where can I get this file?
     
  7. Offline

    rcjrrjcr

    Version 0.8.3 released. Fixes "data.yml missing" error.
    EDIT: Ugh. XenForo is messing with me. I can't change the thread title and am stuck with the plain text editor.
     
  8. Offline

    Nitnelave

    Thanks for the plugin, I haven't really used it yet, just installed on my server (left the default configuration). But I've got a bug : anytime a player disconnects, it shows this in the log (only the first part sorry retractablebridge and the read timeout error are something else, working now)[​IMG]
    I don't know if it has any effect, because I'm not really using it, but it doesn't look nice.
    By the way, I'm on build 612.
    Hope you can figure it out!
     
  9. Offline

    rcjrrjcr

    I'll fix that bug but I'm trying to sort out the mess that is my Git repo. That will take quite a while though.

    EDIT: Going to delay release until after new RB comes out.
     
  10. Offline

    darkwarriors

    i'am admin i use permisisons 2.5.5 but when i type /bab console say u dont have permisisons to access this command..

    why?

    ps : very usefull plugin and great idea!

    olse this error when a player quit:

    Code:
    17:08:16 [SEVERE] java.lang.NullPointerException
    17:08:16 [SEVERE]       at org.bukkit.util.config.ConfigurationNode.removeProperty(ConfigurationNode.java:499)
    17:08:16 [SEVERE]       at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin.storage.StorageYaml.writePlayerData(StorageYaml.java:138)
    17:08:16 [SEVERE]       at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin.BuyAbilities.processLogonLogoff(BuyAbilities.java:801)
    17:08:16 [SEVERE]       at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin.PlayerLoaderSaver.run(BuyAbilitiesPlayerListener.java:87)
    17:08:16 [SEVERE]       at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:33)
    17:08:16 [SEVERE]       at java.lang.Thread.run(Thread.java:722)
    
     
  11. Offline

    rcjrrjcr

     
  12. Offline

    darkwarriors

    obv i have already add that permissions!
     
  13. Offline

    rcjrrjcr

    The NPE has already been reported and will be fixed in the next release, which will come out after the next RB. I'll look into the permission problem. What plugins do you have on your server?
     
  14. Offline

    darkwarriors

    for permisisons support:

    Permissions 2.5.5
     
  15. Offline

    rcjrrjcr

    Only that and this plugin? No economy plugin?
     
  16. Offline

    darkwarriors

    ah all list?

    iConomy
    Permissions
    WorldGuard
    WolrdEdut
    War 1.2
    CookieMonster
    iConomychestShop
    iChat
    BigBrother
    MessageTimer
    Autosave
    Bukkittcp
    "buyAbilities"
    Essentials
     
  17. Offline

    Jellifish

    I am having the same problem, no matter what permissions I use, I'm getting "Do not have permissions". For details of the plugins I am running and versions see http://newfunk.info/wiki
     
  18. Offline

    Phaedrus

    Getting this error on player disconnect. Bukkit 670. Not sure if it's having any effect....

    EDIT: Yeah it's definately having an effect. Turns out I'm in the same boat as DarkWarrior. Whenever I use /bab in game it says I don't have permissions, even though I clearly do. I'm an Op, and in Admin group inheriting - '*'. The weird thing is that I can use the /bab commands from the console without issue.

    My players will be very disappointed. They were really looking forward to this. Hope you can get it sorted out. I'd be glad to help test.

    Code:
    00:03:06 [INFO] Connection reset
    00:03:06 [INFO] x0rtrunks lost connection: disconnect.quitting
    00:03:06 [INFO] Player "x0rtrunks" quitted!
    00:03:06 [INFO] Unloading player "x0rtrunks"'s data!
    00:03:06 [SEVERE] java.lang.NullPointerException
    00:03:06 [SEVERE]       at org.bukkit.util.config.ConfigurationNode.removeProperty(ConfigurationNode
    .java:503)
    00:03:06 [SEVERE]       at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin.storage.StorageYaml.writePl
    ayerData(StorageYaml.java:138)
    00:03:06 [SEVERE]       at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin.BuyAbilities.processLogonLo
    goff(BuyAbilities.java:801)
    00:03:06 [SEVERE]       at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin.PlayerLoaderSaver.run(BuyAb
    ilitiesPlayerListener.java:87)
    00:03:06 [SEVERE]       at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:33)
    00:03:06 [SEVERE]       at java.lang.Thread.run(Unknown Source)
    00:05:32 [INFO] /173.234.147.81:43756 lost connection
    >
    Running the following plugins:
    Code:
    >plugman vlist
    01:59:47 [INFO] Plugin List: "AppleTree [0.5.1]" "AutoSave [1.2.1]" "ServerAutoStop [1.0.0]" "Bandag
    es [1.2.3]" "BankAccount [0.4]" "BorderGuard [3.0]" "BuyAbilities [0.8.3]" "Cleaner [1.7]" "Commands
     Logging [0.2]" "CommandBook [1.2.1-customized]" "CommandHelper [2.0.2]" "SignColours [0.3]" "CraftB
    ookCommon [nightly]" "CraftBookMechanisms [nightly]" "CraftBukkitUpToDate [2.4.7]" "DropBonus [2.4]"
     "dynmap [0.15]" "FenceStack [1.13]" "HeroBounty [1.7.7]" "HeroicDeath [1.7.2.147]" "iChat [2.2.2]"
    "iConomy [4.65]" "ItemId [1.12]" "LimitSpawnsLite [1.01]" "LocalShops [2.2.1]" "Lottery [0.3]" "LWC
    [2.21]" "MagicCarpet [1.5.3]" "MCBans [2.8]" "MCDocs [5.2.4.1]" "MidiBanks [1.3]" "MinecartManiaCore
     [1.09]" "Minequery [1.5]" "MonsterHunt [0.5.2]" "MultiInv [1.5.2]" "MultiVerse [1.6.2]" "MyHome [1.
    9.3]" "NaturalGiants [1.1]" "Permissions [2.5.5]" "PermissionsPlus [1.4]" "PlugMan [1.3]" "Pumpkin D
    iver [0.15]" "PvPReward [0.4]" "SendGift [1.21]" "SignColours [0.3]" "SignLogger [1.2]" "SignOwner [
    1.2]" "SignReadMore [3.2]" "SimpleSignEdit [1.0]" "Slots [0.5]" "SpawnControl [0.8]" "TelePlusPlus [
    1.3.2]" "Tombstone [1.1.7]" "TradeMod [0.9.3.29.11]" "Turnstile [1.4.3]" "vPlayersOnline [1.6]" "Wor
    ldEdit [4.3]" "WorldGuard [5.0-alpha8]" "xWarp [2.7.7]" "MinecartManiaAdminControls [1.09]" "Minecar
    tManiaAutocart [1.09]"
    Yes, I know it's a lot.
     
  19. Offline

    darkwarriors

    any sort of update?
     
  20. Offline

    rcjrrjcr

    It's coming SOON™:D. The NPE that happens on player quit will be fixed. I still can't find the root of your problem (The permissions one) though.
     
  21. Offline

    darkwarriors

    ok thk alot if u want to see all the server with file and console i can give u a desktopaccess to mine server! i need this plugin so much!
     
  22. Offline

    rcjrrjcr

    Version 0.8.4 released. Fixed NPE while saving and permissions problems. Added BOSEconomy support.

    Technical Details: The permissions weren't being checked properly as in each interface, there was a check to see if the permissions plugin was active, which examined a field in an abstract class that all my plugins' main classes inherit from. However, in my main plugin class, I accidentally hid the field by declaring a new field with the same name, hence the superclass field remaining null. :p
     
    jasonznack likes this.
  23. Offline

    darkwarriors

    Code:
    Abilities:
        tphere:
          # This name is how the plugin refers to the purchaseable ability internally. It's used in the file described in 2.
            info:
                name: 'teleporta un tuo amico'
                description: 'teleporta un tuo amico nella tua posizione'
                help: 'usa /tphere playername'
            # name/description listed in game/ability inventory. changing the name here would not break the association to users that have bought it.
            permissions:
                - 'essentials.tphere'
            # all permission nodes the user would gain access to.
            categories:
                - 'movement'
            # used to organize/filter abilities
            commands:
                - 'RGX=(?i)/t(here)?'
            # java regex used to check for associated commands
            costs:
                buy:
                    cost: 9999999999999
              # permanent ownership of that permission
                rent:
                    cost: 9999999999999
                    duration: 30000
                  # time-based ownership of that permission
                use:
                    cost: 500
                    usecount: 2
                  # use-based ownership of that permission
        kit:
            info:
                name: 'use heal chests'
                description: 'allows you to use healing chests'
                help: 'Find a chest with a sign that says [heal]. then right click it.'
            permissions:
                - 'prova'
            categories:
                - 'combat'
            costs:
                buy:
                    cost: 10000
                rent:
                    cost: 1000
                    duration: 3000
    
    why with command /bab rentuse tphere , it say insufficent money? i have 4000 balance with iConomy! obv i want to enable only rentuse for my players so i put 999999999 buy and rent!
     
  24. Offline

    rcjrrjcr

    Will fix that soon. Anyway, to disable renting or buying an ability, leave out the rent/buy cost entry. There is no need to set such a high price.

    EDIT: Facepalmed. Forgot to commit changes to github, so I don't have the latest version. Once I get back to my desktop I'll make a debug version for you, so that I can find the root of the problem.
     
  25. Offline

    Shadowsquire

    I'm getting this error trying to start this on my server. Running CB #670, iConomy 4.6.5 and Permissions 2.6

    Code:
    [S]00:07:58 [SEVERE] null loading BuyAbilities v0.8.4 (Is it up to date?)[/S][/S]
    [S][S]java.lang.NullPointerException[/S][/S]
    [S][S]        at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin.BuyAbilities.onDisable(BuyAbilities.java:177)[/S][/S]
    [S][S]        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:129)[/S][/S]
    [S][S]        at org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(JavaPluginLoader.java:592)[/S][/S]
    [S][S]        at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManager.java:228)[/S][/S]
    [S][S]        at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin.BuyAbilities.onEnable(BuyAbilities.java:98)[/S][/S]
    [S][S]        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:127)[/S][/S]
    [S][S]        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:578)[/S][/S]
    [S][S]        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:216)[/S][/S]
    [S][S]        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:115)[/S][/S]
    [S][S]        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:93)[/S][/S]
    [S][S]        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:215)[/S][/S]
    [S][S]        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:202)[/S][/S]
    [S][S]        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:142)[/S][/S]
    [S][S]        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:257)[/S][/S]
    [S][S]        at net.minecraft.server.ThreadServerApplication.run(SourceFile:375[/S])
    Never mind me. I'm just an idiot. I put "you're" in the description for something and didn't realise the ' would screw things up.
     
  26. Offline

    rcjrrjcr

    Ah. YAML hates apostrophes in strings. I'll see if I can work around that.
     
  27. Offline

    darkwarriors

    @rcjrrjcr
    thank u very much for your support hope i can set up this plugin!
     
  28. Offline

    Mikor

    So, this isnt working at all for me after updating to 670. Weird bug, this -

    A player can "/bab categories" and see the proper list of categories he has access to. However, "/bab category (category name)" returns "Unable to access category" to the player. He CAN do "/bab page" and see a list of the individual skills as well as their help files, but he cannot purchase skills nor access specific categories. Help?

    Permissions file is as follows:

    Code:
    plugin:
        permissions:
            system: default
            copies: null
    groups:
        Default:
            default: true
            info:
                prefix: ''
                suffix: ' the Peasant'
                build: true
            inheritance: null
            permissions:
            - 'citizens.help'
            - 'factions.participate'
            - 'falsebook.ic.mc1000'
            - 'falsebook.ic.mc1001'
            - 'falsebook.ic.mc1017'
            - 'falsebook.ic.mc1018'
            - 'falsebook.ic.mc1020'
            - 'falsebook.ic.mc2020'
            - 'falsebook.ic.mc3000'
            - 'falsebook.ic.mc3001'
            - 'falsebook.ic.mc3002'
            - 'falsebook.ic.mc3003'
            - 'falsebook.ic.mc3020'
            - 'falsebook.ic.mc3021'
            - 'falsebook.ic.mc3030'
            - 'falsebook.ic.mc3031'
            - 'falsebook.ic.mc3033'
            - 'falsebook.ic.mc3034'
            - 'falsebook.ic.mc3036'
            - 'falsebook.ic.mc3040'
            - 'falsebook.ic.mc4000'
            - 'falsebook.ic.mc4010'
            - 'falsebook.ic.mc4100'
            - 'falsebook.ic.mc4110'
            - 'falsebook.ic.mc4200'
            - 'herobounty.accept'
            - 'herobounty.list'
            - 'localshops.buysell'
            - 'localshops.manage'
            - 'residence.create'
            - 'wormhole.use.sign'
            - 'wormhole.use.dialer'
            - 'wormhole.remove.own'
            - 'buyabilities.use'
            - 'buyabilities.abilities.faction'
            - 'buyabilities.abilities.skills'
            - 'buyabilities.abilities.locks'
            - 'buyabilities.abilities.npc'
            - 'buyabilities.abilities.sensors'
            - 'buyabilities.abilities.chat'
            - 'buyabilities.abilities.abilities'
            - 'buyabilities.abilities.advbuild'
            - 'buyabilities.abilities.bountyhelp'
        Exile:
            default: false
            info:
                prefix: '&2Exile '
                suffix: ''
                build: false
            inheritance: null
            permissions: null
        Citizen:
            default: false
            info:
                prefix: '&5Citizen '
                suffix: ''
                build: true
            inheritance:
            - Default
            permissions:
            - 'herobounty.new'
            - 'localshops.move'
        Moderator:
            default: false
            info:
                prefix: '&1Deity '
                suffix: ''
                build: true
            inheritance:
            - Citizen
            permissions:
            - 'herobounty.untargetable'
        Admins:
            default: false
            info:
                prefix: '&4CCRT '
                suffix: ''
                build: true
            inheritance: null
            permissions:
            - '*'
    users:
        Mikor:
            group: Admins
            permissions: null
    
    My costs.yml
    Code:
    Abilities:
        CreateNPC:
          # This name is how the plugin refers to the purchaseable ability internally. It's used in the file described in 2.
            info:
                name: 'CreateNPC'
                description: 'Create a new NPC where you are standing'
                help: 'Use /npc create name (text) to create an NPC where you stand.  Use a / in place of a space in NPC names (example CCRT/Salesman will display as CCRT Salesman)'
            # name/description listed in game/ability inventory. changing the name here would not break the association to users that have bought it.
            permissions:
                - 'citizens.basic.create'
            # all permission nodes the user would gain access to.
            categories:
                - 'NPC'
            # used to organize/filter abiliti
            costs:
                use:
                    cost: 500000
                    usecount: 1
                  # use-based ownership of that permission
        CreateFaction:
            info:
                name: 'CreateFaction'
                description: 'Create your own Faction!'
                help: 'Use /f create (Faction Tag) to use this!'
            permissions:
                - 'factions.create'
            categories:
                - 'Faction'
            costs:
                use:
                    cost: 5000000
                    usecount: 1
        BuildLift:
            info:
                name: 'BuildLift'
                description: 'A set of two lift modules to use, one to go up and one to go down.'
                help: 'Set a sign with 2nd line of [Lift Up] or [Lift Down] to use.  Signs should be aligned vertically.'
            permissions:
                - 'falsebook.blocks.lift'
            categories:
                - 'AdvBuild'
            costs:
                use:
                    cost: 25000
                    usecount: 2
        BuildGate:
            info:
                name: 'BuildGate'
                description: 'Construct your own gate, which can open and close with redstone!'
                help: 'Create a Craftbook-style gate.  Upon creation, the purchase expires.'
            permissions:
                - 'falsebook.blocks.gate'
            categories:
                - 'AdvBuild'
            costs:
                use:
                    cost: 750000
                    usecount: 1
        BuildBridge:
            info:
                name: 'BuildBridge'
                description: 'Create a retractable bridge for security!'
                help: 'See Wiki for details on how to construct a bridge.'
            permissions:
                - 'falsebook.blocks.bridge'
            categories:
                - 'AdvBuild'
            costs:
                use:
                    cost: 150000
                    usecount: 2
        CreateChannel:
            info:
                name: 'CreateChannel'
                description: 'Create your own Chat Channel!'
                help: 'Use /ch create (channel name) to use this!'
            permissions:
                - 'herochat.create'
            categories:
                - 'Chat'
            costs:
                use:
                    cost: 500000
                    usecount: 1
        WirelessRedstoneKit:
            info:
                name: 'WirelessRedstoneKit'
                description: 'Connect redstone wirelessly!  6 ICs per purchase! Useful for complex Redstone mechanisms!'
                help: 'MC1110 is Transmitter.  MC0111 is Receiver.  6 ICs per purchase. See Wiki for setup and usage details.'
            permissions:
                - 'falsebook.ic.mc1110'
                - 'falsebook.ic.mc0111'
            categories:
                - 'AdvBuild'
            costs:
                use:
                    cost: 150000
                    usecount: 6
        ArrowShooter:
            info:
                name: 'ArrowShooter'
                description: 'Create a stationary flaming arrow turret!'
                help: 'Use MC1240 facing AWAY from the direction you want the arrow to shoot from.  Must be activated with redstone connecting to the sign.  See Wiki.'
            permissions:
                - 'falsebook.ic.mc1240'
            categories:
                - 'AdvBuild'
            costs:
                use:
                    cost: 100000
                    usecount: 1
        ArrowBarrage:
            info:
                name: 'ArrowBarrage'
                description: 'Create a stationary flaming arrow barage turret!'
                help: 'Use MC1241 facing AWAY from the direction you want the arrows to shoot from. Must be activated with redstone connecting to the sign. See Wiki'
            permissions:
                - 'falsebook.ic.mc1240'
            categories:
                - 'AdvBuild'
            costs:
                use:
                    cost: 250000
                    usecount: 1
        DaySensor:
            info:
                name: 'TimeSensor'
                description: 'Create a sensor that triggers if it is daytime.'
                help: 'Use MC1230 along with redstone to create a current that activates at sunrise and deactivates at sundown. See wiki.'
            permissions:
                - 'falsebook.ic.mc1230'
            categories:
                - 'Sensors'
            costs:
                use:
                    cost: 75000
                    usecount: 1
        SensorPackage:
            info:
                name: 'SensorPackage'
                description: 'Create various sensors.  Sensors available; Water, Lava, Light, Block, Power, Mob, and Player/group.'
                help: 'Use MC1260 for Water, MC1261 for Lava, MC1262 for Light, MC1263 for Block, MC1270 for Power, MC0271 for Mob Sensor, and MC0272 for Player sensor. See Wiki'
            permissions:
                - 'falsebook.ic.mc1260'
                - 'falsebook.ic.mc1261'
                - 'falsebook.ic.mc1262'
                - 'falsebook.ic.mc1263'
                - 'falsebook.ic.mc1270'
                - 'falsebook.ic.mc0271'
                - 'falsebook.ic.mc0272'
            categories:
                - 'Sensors'
            costs:
                use:
                    cost: 100000
                    usecount: 1
        Lock:
            info:
                name: 'Chest/furnace lock'
                description: 'Lock your personal chests and furnaces.'
                help: 'Type /lwc -p create a lock. Please see wiki for additional details.'
            permissions:
                - 'lwc.protect'
            categories:
                - 'Locks'
            costs:
                use:
                    cost: 10000
                    usecount: 1
        WoodcuttingSkill:
            info:
                name: 'Woodcutting'
                description: 'Purchase the woodcutting production skill.'
                help: 'This allows access to the woodcutting production skill. This skill increases your chance of getting multiple logs when breaking a log block.'
            permissions:
                - 'mcmmo.skills.woodcutting'
            categories:
                - 'Skills'
            costs:
                buy:
                    cost: 500000
        MiningSkill:
            info:
                name: 'Mining'
                description: 'Purchase the Mining production skill.'
                help: 'This allows access to the mining production skill. This skill increases your chance of getting multiple drops from breaking stone and ore blocks.'
            permissions:
                - 'mcmmo.skills.mining'
            categories:
                - 'Skills'
            costs:
                buy:
                    cost: 500000
        HerbalismSkill:
            info:
                name: 'Herbalism'
                description: 'Purchase the Herbalism production skill.'
                help: 'This allows access to the Herbalism production skill. This skill increases health gained from bread and stew, and a chance of double drops from harvesting herbs.'
            permissions:
                - 'mcmmo.skills.herbalism'
            categories:
                - 'Skills'
            costs:
                buy:
                    cost: 500000
        ExcavationSkill:
            info:
                name: 'Excavation'
                description: 'Purchase the Excavation production skill.'
                help: 'This allows access to the excavation production skill. This skill increases your chance of finding rare buried treasure beneath the dirt.'
            permissions:
                - 'mcmmo.skills.excavaction'
            categories:
                - 'Skills'
            costs:
                buy:
                    cost: 500000
        RepairSkill:
            info:
                name: 'Repair'
                description: 'Purchase the repair production skill.'
                help: 'This allows access to the repair production skill. This skill allows you to repair tools, weapons, and armor.'
            permissions:
                - 'mcmmo.skills.repair'
            categories:
                - 'Skills'
            costs:
                buy:
                    cost: 250000
        TreeFeller:
            info:
                name: 'TreeFeller'
                description: 'Purchase the Tree Feller active skill.'
                help: 'Quickly clear trees by making them explode!  Skill length is linked to Woodcutting skill.'
            permissions:
                - 'mcmmo.ability.woodcutting'
            categories:
                - 'Abilities'
            costs:
                buy:
                    cost: 100000
        SuperBreaker:
            info:
                name: 'SuperBreaker'
                description: 'Purchase the Super Breaker skill.'
                help: 'Quickly clear mining materials and obtain Triple Drops!  Skill length is linked to Mining skill level.'
            permissions:
                - 'mcmmo.ability.mining'
            categories:
                - 'Abilities'
            costs:
                buy:
                    cost: 100000
        SkullSplitter:
            info:
                name: 'SkullSplitter'
                description: 'Purchase the Skull Splitter skill.'
                help: 'Cleave multiple enemies at once with this AoE melee attack!  Damage is split evenly between all targets hit. Skill is linked to Axes skill level.'
            permissions:
                - 'mcmmo.ability.axes'
            categories:
                - 'Abilities'
            costs:
                buy:
                    cost: 100000
        GigaDrillBreaker:
            info:
                name: 'GigaDrillBreaker'
                description: 'Purchase the Giga Drill Breaker skill.'
                help: 'Quickly clear dirt and receive triple drops and XP!  Tool damage is doubled.  Skill length is linked to Excavation skill level.'
            permissions:
                - 'mcmmo.ability.excavation'
            categories:
                - 'Abilities'
            costs:
                buy:
                    cost: 100000
        SerratedStrike:
            info:
                name: 'SerratedStrike'
                description: 'Purchase the Serrated Strike skill.'
                help: 'Deal 25% damage and apply a Bleed state to all targets within a small radius of your strike.  Sword quality dictates how many enemies the Bleed state can be applied to.'
            permissions:
                - 'mcmmo.ability.swords'
            categories:
                - 'Abilities'
            costs:
                buy:
                    cost: 100000
        Berserk:
            info:
                name: 'Berserk'
                description: 'Purchase the Berserk skill.'
                help: '50% bonus damage to enemies, and instant unarmed destruction of Dirt, Grass, Sand, and Gravel!'
            permissions:
                - 'mcmmo.ability.unarmed'
            categories:
                - 'Abilities'
            costs:
                buy:
                    cost: 100000
        BuildPersonalPortal:
            info:
                name: 'PersonalWarpPortal'
                description: 'Purchase the ability to link a self-built Personal Warp Portal to any private Warp system!'
                help: 'Use /wxcreate (portalname) [idc=PASSWORD] [net=NETWORK TO CONNECT TO] after building portal!'
            permissions:
                - 'wormhole.build'
            categories:
                - 'AdvBuild'
            costs:
                use:
                    cost: 500000
                    usecount: 1
        BuildPublicPortal:
            info:
                name: 'PublicWarpPortal'
                description: 'Purchase the ability to link a self-built Public Warp portal to the CCRT Public Warp system!'
                help: 'Use /wxcreate (portalname) net=CCRT'
            permissions:
                - 'wormhole.network.build.CCRT'
            categories:
                - 'AdvBuild'
            costs:
                use:
                    cost: 250000
                    usecount: 1
        BountyLocator:
            info:
                name: 'BountyHunterTrackingDevice'
                description: 'Purchase a 3 use tracking device that enables you to get an approximate location of a target on an accepted Bounty contract.'
                help: 'Use "/bounty locate" to get an approximate location of your target, accurate to within 250 blocks.  3 uses per purchase.'
            permissions:
                - 'herobounty.locate'
            categories:
                - 'BountyHelp'
            costs:
                use:
                    cost: 50000
                    usecount: 3
        ColoredChat:
            info:
                name: 'CustomizeColorInChat'
                description: 'Customize the color of your text in chat!  Valid for '
                help: 'Use &(hexadecimal character 0-f) before text to alter its coloration in the chat.  Donators get this for 1 month permanently!'
            permissions:
                - 'herochat.color'
            categories:
                - 'Chat'
            costs:
                rent:
                    cost: 10000
                    duration: 1728000
        OpenStore:
            info:
                name: 'OpenShop'
                description: 'Feeling entrepreneurial?  Buy this to open your own store to buy and sell goods! Set managers to run it for you!'
                help: 'Use /shop create (ShopName) to create a shop in a predefined area.'
            permissions:
                - 'localshops.create.free'
            categories:
                - 'AdvBuild'
            costs:
                use:
                    cost: 1500000
                    usecount: 1
    
    and finally, my data.yml file is empty with a {}.

    Any ideas? If you need more information, just let me know.
     
  29. Offline

    rcjrrjcr

    The permissions are case sensitive. For example, "buyabilities.abilities.npc" should be "buyabilities.abilities.NPC".
     
  30. Offline

    darkwarriors

    i try many permissions.. but dont work np.. i put essentials.kit.tools with use 1 but bab let me only do buy command neither rentuse!
     
  31. Offline

    riuthamus

    This is epic! thank you very much for supporting us! BOSEcon that is.
     

Share This Page