[ECON/FUN] BuyAbilities v0.9.2 - Purchase Abilities [953]

Discussion in 'Inactive/Unsupported Plugins' started by andune, May 30, 2011.

  1. Offline

    andune

    BuyAbilities - Purchase Abilities:
    Version: v0.9.2

    Reviving the plugin originally written by @rcjrrjcr. This update includes iConomy5 and a number of other fixes. I've spoken with @rcjrrjcr and I will be maintaining this plugin going forward. Here is the link to the original BuyAbilities thread.

    So without further ado, here is the original description (with updates):

    ---

    BuyAbilities 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 zip file
    Download jar only (for updates)


    Help

    Source Code

    Requirements:
    • An economy plugin (iConomy 4 or 5, EssentialsEco, BOSEconomy)
    • A permissions plugin (Permissions 2.7, GroupManager)
    Usage Instructions:
    For players:
    • 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.
    For Admins:
    • 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.
      • "/bab reload" reload the abilities definition file
    • 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.
      • To allow live reloading of ability definitions, grant the permission "buyabilities.admin.reload"
      • 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.

    TODO:
    • Permission 3.x support
    • Permissions 2.7.x fixes for mixed-case names
    • PEX support (maybe?)
    • WorldGuard region support (permissions specific to a region)
    • Better messaging to users when rented abilities are expiring


    Changelog:
    v0.9.2
    • fixed issue with abilities not persisting across plugin restarts & server reboots
    • fixed "ConcurrentModificationException" issues, reported by @Joy
    • fixed dangling "Categories: /" issue on "/bab info", reported by @Joy
    • added debug message to try to narrow down what's happening with mixed case names and Permissions
    v0.9.1
    • added live reload capability via "/bab reload", available via permission 'buyabilities.admin.reload'
    Show Spoiler

    v0.9.0
    • integrated Nijikokun's Register module (iConomy5 support)
    • bukkit ebean support for serializing user data
    • fixes to support Essentials 2.2.18+
    • other bug fixes
    • debug messages cleanup (converted to Logger log.fine())
    v0.8.9
    • Fixes ability removal bug. Iterators finally get a use.


    Suggestions and ideas are welcome!


    Credits: (from @rcjrrjcr)

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

    (And of course thanks to @rcjrrjcr for writing this great plugin to begin with!)

    Report bugs by enclosing the exception's stack trace, your costs.yml and data.yml in spoilers or preferably using pastebin.
     
    Taranis01 and Phaedrus like this.
  2. Offline

    Kevger

    Code:
    15:41:06 [SCHWERWIEGEND] unacceptable character #FFFD special characters are not
     allowed
    in "<reader>", position 1969
    15:41:06 [SCHWERWIEGEND]        at org.yaml.snakeyaml.reader.StreamReader.checkP
    rintable(StreamReader.java:68)
    15:41:06 [SCHWERWIEGEND]        at org.yaml.snakeyaml.reader.StreamReader.update
    (StreamReader.java:159)
    15:41:06 [SCHWERWIEGEND]        at org.yaml.snakeyaml.reader.StreamReader.prefix
    (StreamReader.java:130)
    15:41:06 [SCHWERWIEGEND]        at org.yaml.snakeyaml.scanner.ScannerImpl.scanLi
    neBreak(ScannerImpl.java:1752)
    15:41:06 [SCHWERWIEGEND]        at org.yaml.snakeyaml.scanner.ScannerImpl.scanTo
    NextToken(ScannerImpl.java:977)
    15:41:06 [SCHWERWIEGEND]        at org.yaml.snakeyaml.scanner.ScannerImpl.fetchM
    oreTokens(ScannerImpl.java:237)
    15:41:06 [SCHWERWIEGEND]        at org.yaml.snakeyaml.scanner.ScannerImpl.checkT
    oken(ScannerImpl.java:183)
    15:41:06 [SCHWERWIEGEND]        at org.yaml.snakeyaml.parser.ParserImpl$ParseBlo
    ckMappingValue.produce(ParserImpl.java:592)
    15:41:06 [SCHWERWIEGEND]        at org.yaml.snakeyaml.parser.ParserImpl.peekEven
    t(ParserImpl.java:163)
    15:41:06 [SCHWERWIEGEND]        at org.yaml.snakeyaml.parser.ParserImpl.checkEve
    nt(ParserImpl.java:148)
    15:41:06 [SCHWERWIEGEND]        at org.yaml.snakeyaml.composer.Composer.composeN
    ode(Composer.java:132)
    15:41:06 [SCHWERWIEGEND]        at org.yaml.snakeyaml.composer.Composer.composeM
    appingNode(Composer.java:230)
    15:41:06 [SCHWERWIEGEND]        at org.yaml.snakeyaml.composer.Composer.composeN
    ode(Composer.java:160)
    15:41:06 [SCHWERWIEGEND]        at org.yaml.snakeyaml.composer.Composer.composeM
    appingNode(Composer.java:230)
    15:41:06 [SCHWERWIEGEND]        at org.yaml.snakeyaml.composer.Composer.composeN
    ode(Composer.java:160)
    15:41:06 [SCHWERWIEGEND]        at org.yaml.snakeyaml.composer.Composer.composeM
    appingNode(Composer.java:230)
    15:41:06 [SCHWERWIEGEND]        at org.yaml.snakeyaml.composer.Composer.composeN
    ode(Composer.java:160)
    15:41:06 [SCHWERWIEGEND]        at org.yaml.snakeyaml.composer.Composer.composeD
    ocument(Composer.java:122)
    15:41:06 [SCHWERWIEGEND]        at org.yaml.snakeyaml.composer.Composer.getSingl
    eNode(Composer.java:105)
    15:41:06 [SCHWERWIEGEND]        at org.yaml.snakeyaml.constructor.BaseConstructo
    r.getSingleData(BaseConstructor.java:124)
    15:41:06 [SCHWERWIEGEND]        at org.yaml.snakeyaml.Yaml.load(Yaml.java:264)
    15:41:06 [SCHWERWIEGEND]        at org.bukkit.util.config.Configuration.load(Con
    figuration.java:74)
    15:41:06 [SCHWERWIEGEND]        at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin
    .settings.Settings.<init>(Settings.java:62)
    15:41:06 [SCHWERWIEGEND]        at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin
    .BuyAbilities.loadSettings(BuyAbilities.java:145)
    15:41:06 [SCHWERWIEGEND]        at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin
    .BuyAbilities.onEnable(BuyAbilities.java:115)
    15:41:06 [SCHWERWIEGEND]        at org.bukkit.plugin.java.JavaPlugin.setEnabled(
    JavaPlugin.java:125)
    15:41:06 [SCHWERWIEGEND]        at org.bukkit.plugin.java.JavaPluginLoader.enabl
    ePlugin(JavaPluginLoader.java:750)
    15:41:06 [SCHWERWIEGEND]        at org.bukkit.plugin.SimplePluginManager.enableP
    lugin(SimplePluginManager.java:253)
    15:41:06 [SCHWERWIEGEND]        at org.bukkit.craftbukkit.CraftServer.loadPlugin
    (CraftServer.java:134)
    15:41:06 [SCHWERWIEGEND]        at org.bukkit.craftbukkit.CraftServer.loadPlugin
    s(CraftServer.java:112)
    15:41:06 [SCHWERWIEGEND]        at net.minecraft.server.MinecraftServer.e(Minecr
    aftServer.java:232)
    15:41:06 [SCHWERWIEGEND]        at net.minecraft.server.MinecraftServer.a(Minecr
    aftServer.java:219)
    15:41:06 [SCHWERWIEGEND]        at net.minecraft.server.MinecraftServer.init(Min
    ecraftServer.java:146)
    15:41:06 [SCHWERWIEGEND]        at net.minecraft.server.MinecraftServer.run(Mine
    craftServer.java:285)
    15:41:06 [SCHWERWIEGEND]        at net.minecraft.server.ThreadServerApplication.
    run(SourceFile:422)
    15:41:06 [SCHWERWIEGEND] Error occurred while disabling BuyAbilities v0.9.2 (Is
    it up to date?): null
    java.lang.NullPointerException
            at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin.BuyAbilities.onDisable(
    BuyAbilities.java:162)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:127)
            at org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(JavaPluginLoade
    r.java:771)
            at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManag
    er.java:269)
            at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin.BuyAbilities.loadSettin
    gs(BuyAbilities.java:148)
            at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin.BuyAbilities.onEnable(B
    uyAbilities.java:115)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:125)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader
    .java:750)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManage
    r.java:253)
            at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:134)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:112)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:232)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:219)
            at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:146)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:285)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    15:41:06 [SCHWERWIEGEND] Error occurred while enabling BuyAbilities v0.9.2 (Is i
    t up to date?): Plugin attempted to register PLUGIN_ENABLE while not enabled
    org.bukkit.plugin.IllegalPluginAccessException: Plugin attempted to register PLU
    GIN_ENABLE while not enabled
            at org.bukkit.plugin.SimplePluginManager.registerEvent(SimplePluginManag
    er.java:346)
            at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin.BuyAbilities.onEnable(B
    uyAbilities.java:131)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:125)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader
    .java:750)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManage
    r.java:253)
            at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:134)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:112)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:232)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:219)
            at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:146)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:285)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
     
  3. Offline

    andune

    Hmm I put that in as a test and wasn't able to generate it locally. You can ignore it, it has no ill effects, but I'll get it cleaned up for the next version.

    In the future, please use pastebin to share stack traces. From the stack trace, it appears to be a YAML configuration issue - YAML is very picky about syntax and you probably have an error in your file. Try resetting to the default YAML file and see if the error goes away (it should). Then go through your YAML file and look for the error, there are probably some free tools you can find with google that will help you with YAML syntax validation.

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

    Code:
    23:22:27 [INFO] BuyAbilities.addPlayerAbility(): world: world, player: ostPavel, node:mcmmo.ability.unarmed
    23:22:27 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'bab' in plugin BuyAbilities v0.9.2
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:128)
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:281)
            at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:718)
            at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:684)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:677)
            at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:32)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:217)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:401)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:311)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Caused by: java.lang.UnsupportedOperationException: Unsupported (or deprecated) operation, sorry dude.
            at ru.tehkode.permissions.compat.PermissionHandler.setCacheItem(PermissionHandler.java:443)
            at com.rcjrrjcr.bukkitplugins.util.permissionsinterface.PermYetiHandler.addPerm(PermYetiHandler.java:68)
            at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin.AbilityManager.addPlayerAbility(AbilityManager.java:70)
            at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin.AbilityManager.buyAbility(AbilityManager.java:101)
            at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin.BuyAbilities.commandHandler(BuyAbilities.java:501)
            at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin.BuyAbilities.onCommand(BuyAbilities.java:280)
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
            ... 12 more
    And he bought an ability, it charged currency, but he didn't actually get it.

    BAB table in SQL is still empty, even though I could buy an ability, with the previous error, all in all, very strange buggy behaviour right now :/

    ===

    To add to that, I think you should really use the proper API commands :S I have the feeling that's what's breaking it, that setCache thing is an internal thing or so, which shouldn't be used? I don't know exactly...
     
  5. Offline

    andune

    Once again, the actual exception here is caused by PEX. BAB is calling 'setCacheItem', a valid "Permissions" operation, but PEX does not support it. It *IS* proper API commands, PEX just chose not to implement that part of the API. This plugin never claimed compatibility with PEX, it's compatibility right now is solely at the discretion of the PEX developers fully implementing the Permissions API.

    That all said, I could look into adding PEX native support, but as I don't use PEX myself this isn't top on my priority list. Maybe when I get around to adding Permission 3.0 support, I can look into the idea of supporting PEX directly, but it would require me learning about PEX's native APIs and implementing a wrapper for it. Definitely easier if they just support the full permissions API, I'm not all that fond of maintaining Permissions API's for 4 different permissions systems (Permissions 2.7.x, Permissions 3.0, GroupManager and PEX).

    So to your "all in all" comment about buggy behavior, it's really no surprise, you're using a permissions system this was never built to work with and the PEX developers have not fully implemented the Permissions API that this plugin depends on to work. I'd recommend not using it until either such a time as myself or someone else decides to add PEX support to this plugin (it's open-source, the PEX developers are welcome to build the wrapper and push it to me), or PEX itself fully supports the write/remove/cache operations of the Permissions API and stops throwing "Sorry dude" exceptions.
     
  6. Ok thank you, just thought this was a new type of exception, as they added the setCache thing specifically for this plugin, yet it still doesn't work. I'll ask the PEX people again.

    And yes, it's ridiculous we need/have 4 different Permission systems, is what happens when people can't work together on a common goal.
     
  7. Offline

    tassox33

    Having these errors

    All i'm trying to do is give players the stargate mod ability - 'wormhole.use.dialer' for a few minutes. Using /bab rent Gatekeeper.
    Code:
    2011-06-05 10:08:31 [SEVERE] ebean.properties not found
    2011-06-05 10:08:31 [INFO] DataSourcePool [BuyAbilities] autoCommit[false] transIsolation[SERIALIZABLE] min[2] max[20]
    2011-06-05 10:08:31 [INFO] SubClassFactory parent ClassLoader [org.bukkit.plugin.java.PluginClassLoader]
    2011-06-05 10:08:32 [INFO] Entities enhanced[0] subclassed[1]
    v0.854] Load Completed.
    2011-06-05 10:08:34 [INFO] BuyAbilities version 0.9.2 is inactive.
    2011-06-05 10:08:34 [INFO] BuyAbilities.addPlayerAbility(): world: world1, player: tassox33, node:wormhole.use
    2011-06-05 10:08:34 [SEVERE] Error occurred while enabling BuyAbilities v0.9.2 (Is it up to date?): com.nijiko.permissions.PermissionHandler.setCacheItem(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Z)V
    java.lang.NoSuchMethodError: com.nijiko.permissions.PermissionHandler.setCacheItem(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Z)V
        at com.rcjrrjcr.bukkitplugins.util.permissionsinterface.PermYetiHandler.addPerm(PermYetiHandler.java:68)
        at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin.AbilityManager.addPlayerAbility(AbilityManager.java:70)
        at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin.AbilityManager.load(AbilityManager.java:143)
        at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin.BuyAbilities.onEnable(BuyAbilities.java:120)
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:125)
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:750)
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:253)
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:134)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:112)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:232)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:219)
        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:146)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:285)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    2011-06-05 10:08:36 [INFO] stealthsprinter [/2.97.235.17:51474] logged in with entity id 703 at (-55.22063592244523, 74.0, 93.25334142392812)
    2011-06-05 10:09:26 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'bab' in plugin BuyAbilities v0.9.2
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:128)
        at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:281)
        at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:718)
        at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:684)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:677)
        at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:32)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:217)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:401)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:311)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Caused by: java.lang.NullPointerException
        at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin.BuyAbilities.commandHandler(BuyAbilities.java:497)
        at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin.BuyAbilities.onCommand(BuyAbilities.java:280)
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
        ... 12 more
    
    This is my config file
    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:
                - '/j(ump)?'
            # this is CRITICAL to get right for any "rentuse" abilities, this is the only way the mods knows how
            # to detect when the ability has been used.  It is a full RegEx expression.
            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
        HealChest:
            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:
                - 'essentials.signs.protection.use'
            categories:
                - 'combat'
            costs:
                buy:
                    cost: 10000
                rent:
                    cost: 1000
                    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:
                - 'basic'
            costs:
                buy:
                    cost: 1000
                rent:
                    cost: 100
                    duration: 5000
        Gatekeeper:
            info:
                name: 'Gatekeeper'
                description: 'Allows the  use of the stargates'
                help: 'Type /dial xxx to go to another world'
            permissions:
                - 'wormhole.use'
                - 'wormhole.use.dialer'
                - 'wormhole.use.sign'
            categories:
                - 'basic'
            costs:
                buy:
                    cost: 100000
                rent:
                    cost: 5000
                    duration: 500
    Thankyou, let me know if you need to know what mods im using. I'm using BOSEconomy if that matters.
     
  8. Offline

    andune

    For future ref, please use pastebin rather than pasting in threads directly. The key missing piece of information is what Permission system are you using? BAB does not support PEX or Permissions 3.x at this time (at least, it's not been actively coded or tested with either - if it works it's pure luck).
     
  9. Offline

    tassox33

    I'm not sure what pastebin is, I was thinking using [-code-] was better then just pasting text in. I'd be glad to do that if someone would show me what it is. Ok, I'm using 3.x ... only because 2.7 is inactive.
    I could be wrong but isn't 3.x the most popular of the 4 perms? (yes i know its new and you need time)
    Thanks for the quick reply.
     
  10. Offline

    andune

    Just go to http://pastebin.com/. Paste it there, it will give you a short link to post here. :)

    Yes, I expect Permissions 3.x will become one of the most popular and I expect I myself will upgrade to it at some point in the near future, at which point for sure BAB will be coded to work with it. :) I may do some dabbling tonight if I have time, otherwise I will plan to work on it next weekend.
     
  11. Offline

    Tfs Halo

    does group manager work with this o_o... i will try right now but idk if it will work.
     
  12. Offline

    andune

    Yes, the original author had Group Manager support, and I use Group Manager myself, so I made sure to test it out and get it working with the latest version of Essentials (which now supports GroupManager). I'll be upgrading to Permissions 3 at some point, so I can't promise Group Manager will work forever, but at least for now it's got good support. :)
     
  13. Offline

    PointlessOddity

    I would love to post an error log on this but my host wont let me see it (Damn you multiplay) anyway

    When anyone tries to buy an ability they get this error
    Code:
    An internal error occurred while attempting to perform this command
    I think this is something to do with my configuration so i will post that to
    Show Spoiler
    Abilities:
    Padlock:
    # This name is how the plugin refers to the purchaseable ability internally. It's used in the file described in 2.
    info:
    name: 'Padlock'
    description: 'Allows you to create and own locked doors, chests, dispensers and furnaces.'
    help: 'Left click a chest to own it the left click to lock/unlock'
    # name/description listed in game/ability inventory. changing the name here would not break the association to users that have bought it.
    permissions:
    - 'chestlock.own'
    - 'chestlock.lock'
    # all permission nodes the user would gain access to.
    categories:
    - 'Security'
    # used to organize/filter abilities
    commands:
    - '/lock'
    # java regex used to check for associated commands
    costs:
    buy:
    cost: 1500
    # permanent ownership of that permission
    #rent:
    # cost: 0
    # duration: 0
    # time-based ownership of that permission
    use:
    cost: 150
    usecount: 5
    # use-based ownership of that permission
    Turnstiles:
    # This name is how the plugin refers to the purchaseable ability internally. It's used in the file described in 2.
    info:
    name: 'Turnstile'
    description: 'Allows you to create a turnstile which takes money from people when they go through'
    help: 'Type /ts for a list of commands'
    # name/description listed in game/ability inventory. changing the name here would not break the association to users that have bought it.
    permissions:
    - 'turnstile.*'
    # all permission nodes the user would gain access to.
    categories:
    - 'Shop'
    # used to organize/filter abilities
    commands:
    - '/ts make *'
    # java regex used to check for associated commands
    costs:
    buy:
    cost: 3000
    # permanent ownership of that permission
    #rent:
    # cost: 0
    # duration: 0
    # time-based ownership of that permission
    use:
    cost: 300
    usecount: 1
    # use-based ownership of that permission
    HomeTeleport:
    # This name is how the plugin refers to the purchaseable ability internally. It's used in the file described in 2.
    info:
    name: 'Home Teleport'
    description: 'Allows teleport to your home'
    help: 'Type /sethome to change where your home is and /home to use up 1 teleport and go there'
    # name/description listed in game/ability inventory. changing the name here would not break the association to users that have bought it.
    permissions:
    - 'essentials.home'
    # all permission nodes the user would gain access to.
    categories:
    - 'Home'
    - 'Magic'
    # used to organize/filter abilities
    commands:
    - '/home'
    # java regex used to check for associated commands
    costs:
    buy:
    cost: 10000
    # permanent ownership of that permission
    #rent:
    # cost: 0
    # duration: 0
    # time-based ownership of that permission
    use:
    cost: 1000
    usecount: 1
    # use-based ownership of that permission


    Reason for edit: Spelling error
     
  14. Offline

    andune

    Thanks for posting your config, however this will be really hard to diagnose without a stack trace. If you can get access to your server log to find and share the stack trace, I can combine that with your config file to hopefully narrow down the problem and help you out.
     
  15. Offline

    PointlessOddity

    Ill do my best
    ----EDIT----
    I found a log but nothing was being recorded as an error in it i would post it but its 6gb of text and boring as hell to read instead i created a list of all the plugins i am using

    Show Spoiler
    BuyAbilities
    FalseBookBlock
    Turnstile
    MinecartManiaCore
    MinecartManiaStation
    ChestLock
    MinecartManiaChestControl
    Permissions
    FalseBookChat
    iChat
    SecretDoors
    MinecartManiaAutomations
    AutoMessage
    NoMoreRain
    FalseBookCore
    iConomy
    FalseBookExtra
    FalseBookIC
    WorldEdit
    Essentials
    MinecartManiaAdminControls
    WorldGuard
    RemoteBukkit
    TimeShift
    SignShop
    SignColours
    MusicCraft
    MinecartManiaSignCommands
    Citizens
    MinecartManiaAutocart
    EssentialsSpawn

    See anything that has a reported conflict with BuyAbilities?
     
  16. Yes, it was same error, thanks for fix. But still we have so many XML lines in field "perm" in MySql, that's right? Why cant be there only perm node? :)
     
  17. Offline

    andune

    Because it's much easier to let Java do the work for me (XML marshall/unmarshall) than to write my own custom parser, plus it's much better tested since the core Java XML stuff is used in production code around the world every day. It's really easy to read, also, compared to do doing a binary serialize which would not be.

    Perhaps try making a backup of your current config and then drop in the "stock" config (from the original .ZIP file) and see if that works? You may not have the permission nodes, but you should be able to, for example, '/bab rent Jump' and then type '/bab current' and see that you have the Jump ability.

    If you can get it working with the stock, unedited 'costs.yml' that comes with the ZIP, then we know it's a problem with your YML config and not a conflict between BAB and your other plugins. Knowing that should help you in tracking down the issue much faster since you'll know it's an issue in your YML config that you're looking for. :)

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

    Icedew123

    Uhm.. I have a suggestion. Can you add a notification on how many commands you have left or how much time you have left if you're renting a command. Please consider doing this
     
  19. Offline

    PointlessOddity

    Thank's for your help ^_^

    Read through the whole post and i found something it needs permissions 2.7 i have 3.1 -_- and i cant downgrade

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

    Silarn

    There are permissions oddities with bab. It seems that it isn't correctly parsing a permissions file that uses capital letters. So when someone tries to gain permission and already has an entry with a capital letter, it creates a new entry for them and throws the entire permissions system out of whack.
     
  21. Offline

    andune

    I've heard this report a few times now and believe it to be an issue with the way BAB interacts with Permisions 2.7.x. I haven't been able to reproduce this locally as I use GroupManager myself, but I am planning to do some work with Permissions 3.x in the near future and will take a look at this 2.7.x problem at the same time.
     
  22. Offline

    Silarn

    I'm fairly sure GroupManager parses everything as lowercase when it reads the permissions data, so I wouldn't be surprised.
     
  23. Offline

    andune

    FYI I am working on Permissions 3.x. Getting it running on my private test server and then I'll start looking into making BAB compatible with it. Just so you guys know it's on the priority list and support is coming soon.
     
    efstajas likes this.
  24. Offline

    Taranis01

    @morganm

    im glad to hear you're working on Permissions 3 :)

    i get this error when stoping the server with the /stop command:
    Code:
    2011-06-14 05:48:31 [SEVERE] Error occurred while disabling BuyAbilities v0.9.2 (Is it up to date?): This method not implemented
    java.lang.UnsupportedOperationException: This method not implemented
        at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin.storage.StorageEBeans.writeData(StorageEBeans.java:94)
        at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin.BuyAbilities.onDisable(BuyAbilities.java:162)
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:127)
        at org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(JavaPluginLoader.java:820)
        at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManager.java:269)
        at org.bukkit.plugin.SimplePluginManager.disablePlugins(SimplePluginManager.java:262)
        at org.bukkit.craftbukkit.CraftServer.disablePlugins(CraftServer.java:129)
        at net.minecraft.server.MinecraftServer.stop(MinecraftServer.java:260)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:339)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
     
  25. Offline

    tassox33

    Just checkin in, have a million ideas based on this mod.
     
  26. Offline

    Taranis01

  27. Offline

    jkeller4000

    maybe it not yet added but how to i see how long i have ability left for if i rent it based on time?
    and is each server tick about a second?
     
  28. Offline

    andune

    @tassox33

    Sorry I have Perm3 support half-coded but I've been distracted by a Bukkit bug that is causing incorrect blocks to be reported by Bukkit which causes things like LWC and LogBlock to not work properly. That's a higher priority issue on my server at the moment but I'll get back to Perm3 support here soon.

    @jkeller4000

    There are normally 20 server ticks in a second, although that might change slightly on an overloaded server where you're seeing the "Can't keep up! Did the system time change, or is the server overloaded?" message a lot. Regarding seeing how much time is left, that's a feature I'd like to add when I get a chance.

    @Taranis01
    Yes that error won't affect the plugin at all and I will have it fixed in the next version that supports Perm3. Thanks for reporting the issue.
     
  29. Offline

    WeedFreak

    Hi , i love this Plugin :D , i have one thing,
    I use this Plugin on my server and want to Build it in, in my Quest system! can u add a command that removes a permanetly buyed permission from bab ? > like /bab remove Jump, with an permission for /bab remove < i want this sooo much x) it gives Admin cotrol over the buyed abilities too. !

    it would be verry nice when this is possible

    what you think can/ will you do it ?

    Greetz
     
  30. Offline

    SpeakingCactus

    Heem what am i doing wrong ?
    The plugin was working, then i tryied to change buyable abilities.. Now the plugin doesn't work anymore..
    Please can you find the bug ?
    EDIT: Heem wtf..? Well, i typed spaces, and not tabs; the bug doesn't come from here..
     
  31. Offline

    andune

    @SpeakingCactus

    Can you use pastebin to post your config? Then I can download it exactly as you have it locally and test it out. Also, what error are you getting? Do you see an exception in the server.log, or are you just not seeing any abilities in /bab commands anymore?
     

Share This Page