[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

    fallarnon

    So is it now compatible with Permissions? :cool:
     
  3. Offline

    rcjrrjcr

    Yep.:rolleyes: There was an alternative way to add/remove permissions, though I'm not sure how well it works.
    Though I'm not sure if Bukkit even works with Minecraft Beta 1.4.:(
     
  4. Offline

    kahlilnc

    So this works with spells the plugin?
     
  5. Offline

    Joself

    Will there ever be an item cost? On my server, I want ranking up to cost both money and an item which is unobtainable under normal circumstances.
     
  6. Offline

    2Bucks

    I'm a bit confused at what "category" means. Is category synonymous with plugin? As in if I have to let people buy all the EssentialsWarp plugins, all the Towny plugins, etc?
     
  7. Offline

    Kevin Forte

    I'm a bit confused as well. This seems absolutely perfect, as the money is really racking up on my server with no real, expensive outlet for it. It'd be great to let players buy 30 minutes of "Jesus Mode" for 10,000 or whatever, where they get access to /heal and all /tp commands. Unfortunately, based on your instructions, I have NO idea how I might go about doing this.
     
  8. Offline

    EniGmA1987

    This seems like a great plugin, but I am very confused as well as there isnt really any info on how to set it up.

    How do we set permissions for this?
    How do we make abilities purchasable?
    What kind of abilities can we use? Do we somehow take things other plugins add and make them purchasable, or does this have its own abilities within the plugin that are used?
     
  9. Offline

    rcjrrjcr

    Instructions are here.

    Categories are a simple way to classify abilities. For example, the category "combat" would contain abilities relating to combat, like giving access to /heal and other combat-related buffs.

    I don't think that this will be added in the near future but I'll add it to the TODO list anyway.

    Well, since Spells uses permission nodes, yes. Each ability can contain a related set of spells and configured to allow players to buy uses of the spells.
    Show Spoiler


    Each ability would contain the corresponding permission node for each spell, and be configured with a wildcard string or regular expression to check for the corresponding invocation of any of its spells. So, when a player buys uses of this ability, he is able to cast those spells until he runs out of uses.
    However, if you are using Wand, I'm not exactly sure how to detect each spell casted, but without Wand, it should work.

    EDIT: Since many users are complaining about the unintuitive format of the costs.yml file, I think I should create a simple GUI for easy creation and modification of the file. Any comments?
     
  10. Offline

    bakon balázs

    wow. interresting, testing soon : >
     
  11. Offline

    rcjrrjcr

    Version 0.7.2 released! Everything has been recompiled against CB #617.
     
  12. Offline

    Asterdom

    Wow a GUI would be great for that. I just spend some 2 hours getting the basics in.... anyways im running into an issue where i have given permissions to all catergories but anytime i attempt to purchase any it ends with Unable to buy this ability... Really want to get this working any ideas?
     
  13. Offline

    rcjrrjcr

    Can you post your costs.yml in spoiler tags here?
     
  14. Offline

    Asterdom

    Wow thanks for the quick reply! Yes i can but its a duisy

    Show Spoiler
    Abilities:
    chimerawing:
    info:
    name: 'ChimaeraWing'
    description: 'Allows you to spend 10 feathers to return to the spawn'
    help: 'Type /setmyspawn to set your the teleport, and use /myspawn'
    permissions:
    - 'mcmmo.item.chimaerawing'
    categories:
    - 'basic'
    costs:
    buy:
    cost: 500
    use:
    cost: 20
    usecount: 1
    SetMySpawn:
    info:
    name: 'Set MySpawn'
    description: 'Set your characters personal spawnpoint.'
    help: 'Type /setmyspawn to set your the teleport, and use /myspawn respawn there. Cost: Loose all items'
    permissions:
    - 'mcmmo.commands.setmyspawn'
    - 'mcmmo.commands.usemyspawn'
    categories:
    - 'basic'
    costs:
    buy:
    cost: 1000
    Spawn:
    info:
    name: :'Spawn'
    description: 'More powerful respawn command. Respawn without loosing items.'
    help: 'Type /spawn to respawn'
    permissions:
    - 'essentials.spawn'
    categories:
    - 'basic'
    costs:
    buy:
    cost: 2000
    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'
    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:
    - 'basic'
    # used to organize/filter abilities
    commands:
    - '(?i)/j(ump)?'
    # java regex used to check for associated commands
    costs:
    buy:
    cost: 1000
    # time-based ownership of that permission
    use:
    cost: 50
    usecount: 5
    # time-based ownership of that permission
    Regeneration:
    info:
    name: 'Regeneration'
    description: 'Power Level based regeneration'
    help: 'Increase your power level and your health regens faster!'
    permissions:
    - 'mcmmo.regeneration'
    categories:
    - 'combat'
    costs:
    buy:
    cost: 350
    Home:
    info:
    name: 'Home'
    description: 'Allows you to set and change your home'
    help: 'Type /setHome to set your Home Mark and /home to return to the Home Mark'
    permissions:
    - 'essentials.sethome'
    categories:
    - 'basic'
    costs:
    buy:
    cost: 1500
    Warp:
    info:
    name: 'Warp'
    description: 'Allows use of the powerful Warp System'
    help: 'Type /setwarp *name* to sepecify a named warp and then use /warp *name* to teleport there. Warps can be deleted by tying /delwarp *name*'
    permissions:
    - 'essentials.delwarp'
    - 'essentials.warp'
    - 'essentials.setwarp'
    categories:
    - 'adv'
    costs:
    buy:
    cost: 1500
    Compass:
    info:
    name: 'Compass'
    description: 'Allows access to the compass command'
    help: 'Type /compass to use!'
    permissions:
    - 'essentials.compass'
    categories:
    - 'utils'
    costs:
    buy:
    cost: 500
    TreeFeller:
    info:
    name: 'TreeFeller'
    description: 'Cuts huge chunks from trees every strike! Duration based on Woodcutting skill.'
    help: Right-click while holding an axe to ready it. Then strike a tree to activate.'
    permissions:
    - 'mcmmo.ability.woodcutting'
    categories:
    - 'abilities'
    costs:
    buy:
    cost: 750
    use:
    cost: 50
    usecount: 5
    SuperBreaker:
    info:
    name: 'SuperBreaker'
    description: 'Mining ability, makes you mine at lightning speed! Duration based on Mining skill'
    help: 'Right-click while holding the pickaxe to ready it. Then mine away!'
    permissions:
    - 'mcmmo.ability.mining'
    categories:
    - 'abilities'
    costs:
    buy:
    cost: 1000
    use:
    cost: 75
    usecount: 5
    GigaDrill:
    info:
    name: 'GigaDrill'
    description: 'Excavating ability, dig like the wind! Duration based on Excavation skill'
    help: 'Right-click while holding the pickaxe to ready it. Then mine away!'
    permissions:
    - 'mcmmo.ability.excavating'
    categories:
    - 'abilities'
    costs:
    buy:
    cost: 1000
    use:
    cost: 75
    usecount: 5

    Woodcutting:
    info:
    name: 'Woodcutting'
    description: 'Train Woodcutting Skill'
    help: 'Cutting wood with an axe increases the speed of cutting and impproves TreeFeller.'
    permissions:
    - 'mcmmo.skills.woodcutting'
    categories:
    - 'skills'
    costs:
    buy:
    cost: 450
    Mining:
    info:
    name: 'Mining'
    description: 'Train Mining Skill'
    help: 'Mining ores and desotroying blocks make you faster and SuperBreaker last longer.'
    permissions:
    - 'mcmmo.skills.mining'
    categories:
    - 'skills'
    costs:
    buy:
    cost: 750
    Excavation:
    info:
    name: 'Excavation'
    description: 'Train Excavation Skill'
    help: 'Digging materials like dirt and sand makes you dig faster and improves Drill.'
    permissions:
    - 'mcmmo.skills.excavation'
    categories:
    - 'skills'
    costs:
    buy:
    cost: 500
    Swords:
    info:
    name: 'Swords'
    description: 'Train Swords Skill'
    help: 'Killing mobs with swords increases damage with them. '
    permissions:
    - 'mcmmo.skills.swords'
    categories:
    - 'skills'
    costs:
    buy:
    cost: 500
    SerratedStrike:
    info:
    name: 'SerratedStrike'
    description: 'Sword ability, hurts multiple targets, causes bleeding.'
    help: 'Right-click while holding a sword to ready it, then attack a creature to use.'
    permissions:
    - 'mcmmo.ability.swords'
    categories:
    - 'combat'
    costs:
    buy:
    cost: 750
    Axes:
    info:
    name: 'Axe'
    description: 'Train Axes Skill'
    help: 'Killing mobs with axes increases damage with them.'
    permissions:
    - 'mcmmo.skills.axes'
    categories:
    - 'skills'
    costs:
    buy:
    cost: 400
    SkullSplitter:
    info:
    name: 'SkullSplitter'
    description: 'Axe ability, fells targets with prejudice.'
    help: 'Right-click while holding a axe to ready it, then attack a creature to use.'
    permissions:
    - 'mcmmo.ability.axes'
    categories:
    - 'combat'
    costs:
    buy:
    cost: 750
    BeserkFists:
    info:
    name: 'BerserkFists'
    description: 'Unarmed ability, dig through rock and sand, and beat enemies to a pulp!'
    help: 'Right-click while unarmed to ready your fists, Then hit a block or creature to use'
    permissions:
    - 'mcmmo.ability.axes'
    categories:
    - 'combat'
    costs:
    buy:
    cost: 500
    Archery:
    info:
    name: 'Woodcutting'
    description: 'Train Archery Skill'
    help: 'Killing mobs with the bow & arrow increases damage & improves chance of "Ignition"'
    permissions:
    - 'mcmmo.skills.archery'
    categories:
    - 'skills'
    costs:
    buy:
    cost: 500
    Herbalism:
    info:
    name: 'Herbalism'
    description: 'Train Herbalism Skill'
    help: 'Harvesting plants increases chance of double drops & makes food more effective.'
    permissions:
    - 'mcmmo.skills.herbalism'
    categories:
    - 'skills'
    costs:
    buy:
    cost: 600
    MerchantSign:
    info:
    name: 'MerchantSign'
    description: 'Gives you the ability to sell your own items to players'
    help: 'Put a sign in and type [Sell] | <amount> | <itemID> | <$> to create a sell chest'
    permissions:
    - 'essentials.signs.sell.create'
    - 'essentials.signs.trade.create'
    categories:
    - 'signs'
    costs:
    buy:
    cost: 1000
    MediSign:
    info:
    name: 'MediSign'
    description: 'Allows the creation of MediSigns'
    help: 'Put a sign on an empty chest and name it [Heal] to make a MediBox'
    permissions:
    - 'essentials.signs.sell.create'
    categories:
    - 'signs'
    costs:
    buy:
    cost: 10000
    DisposalSign:
    info:
    name: 'DisposalSign'
    description: 'Allows the creation of Disposal signs'
    help: 'Put a sign on an empty chest and name it [Disposal] to make a MediBox'
    permissions:
    - 'essentials.signs.disposal.create'
    categories:
    - 'signs'
    costs:
    buy:
    cost: 500
    MobHunter:
    info:
    name: 'MobHunter'
    description: 'Gives aditional money for mobs killed.'
    help: 'Kill monsters, get cash.'
    permissions:
    - 'MobBounty.mb'
    categories:
    - 'adv'
    costs:
    buy:
    cost: 1000
     
  15. Offline

    NathanWolf

    Keewwl! I was very confused when it said you quoted my post in a thread I'd never posted in ;) Worked out.

    Yes, this should work great! @rcjrrjcr, we *may* want to discuss you supporting the new permissions system, if you want. Unfortunately, what you really want to interact with is the new group system, which doesn't exist yet. I've got a prototype running in Persistence, and I'd be interested in getting this plugin to work with it, if you were interested as well :D

    You know, I'm thinking that (as a community) we should really find and support a nice free, cross-platform (Java?) YML editor.

    Most peoples' trouble with YML has to do with the fact that YML is picky and sucks, not really to do with the format you've chosen to use within YML.

    I'm hopefully going to be releasing my Magic plugin next week- and I'm having the same sort of issue, long-term. The first release is only going to support spells in a db- but eventually I'd like to support YML. Either way, though, some sort of editor would be best.

    Long-term, I want to integrate with webbukkit and provide a web UI for Spells (and other data- CrowdControl, NetherGate and Wand could all be set up this way as well). It may be something you want to look into, as well! ;)
     
  16. Offline

    rcjrrjcr

    Do you have the "buyabilities.abilities.basic" permission? To access a category, replace spaces in the category name with periods, and append it to "buyabilities.abilities." For example, the category "signs" would map to "buyabilities.abilities.signs". Also, I noticed that you did not include the commands for some abilities with the cost for buying usages specified. In other words, you have to change each ability that you can buy uses of to something like this:
    Show Spoiler
    Code:
    chimerawing:
                 info:
                                           name: 'ChimaeraWing'
                                           description: 'Allows you to spend 10 feathers to return to the spawn'
                                           help: 'Type /setmyspawn to set your the teleport, and use /myspawn'
                          permissions:
                                           - 'mcmmo.item.chimaerawing'
                          categories:
                                           - 'basic'
    [B]             commands:[/B]
    [B]                          - '/setmyspawn'[/B]
    [B]                          - '/myspawn'[/B]
                          costs:
                                           buy:
                                                            cost: 500
                                           use:
                                                            cost: 20
                                                            usecount: 1
    


    The part you are missing in the costs.yml is in bold.

    I just modified the bbCode tags a little to match your post. :D

    Well, this entire thing can be implemented using multiple groups quite easily, with each ability corresponding to a group, and with each ability a player buys, s?he is added to the group. However, this would require users to be able to belong to multiple groups, and that would be a little messy.

    I heartily agree. YAML, with its 4 spaces for indentation instead of tabs, confuses many hapless users, resulting in plugin threads spammed with "is there something wrong with my config.yml file" posts. Personally, I use YEdit (no, not the bukkit plugin) which is an Eclipse plugin. Works pretty well for me. Too bad YAML doesn't have DTDs, unlike XML.:(

    Well, SQL databases aren't really suited for storing config data, which should be modifiable outside of the server. They're more suited to storing larger chunks of data and for (maybe) connection with an external web server, accessible via PHP.

    I'm not exactly sure what I would use WebBukkit for. I would suppose I could add/remove/modify abilities through it but I don't think that would be important now.

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

    Rahazan

    I love you.
     
  18. Offline

    Asterdom

    I was not kidding about the 2 and a half hours lol.

    I have tried every form of granting permissions i could think of. Adding the 'buyabilities.*' permission as well as
    - 'buyablilities.abilities.basic'
    - 'buyablilities.abilities.ect' individually as well. Neither seems to work. I can use the commands. /bab categories works.

    But cannot access the /bab category insertcathere nor will it let me buy them direct using /bab buy abilityhere.
     
  19. Offline

    Euron

    Question:

    Is there any way with this plugin currently to configure the 'renting' of abilities to shut off a timed effect?

    For example, renting out godmode; is there a way to rent it out for, say, 30 seconds, and once they use it, it autoexpires in 30 seconds?
     
  20. Offline

    NathanWolf

    That's how my simple GM is set up- each user can be in any number of groups, each group can inherit from one (or none- but no more than one) other group.

    Each group and user has a deny/grant list- so you can grant or deny permissions.

    Permissions, in this case, actually represent bukkit permission profiles- not permission nodes. You set up profiles, e.g. "admins", or "DarkWizardLevel1" - whatever. You can assign a single pnode, or set up a whole complex structure including special value overrides, material list overrides, etc. It's all really going to be very cool :)

    And I'm not saying my GM needs to be THE GM- Bukkit wants one internally, I'll use that when it's ready. I'm hoping the API doesn't look too different from what I've put together- but it will certainly be a different persistence backend, I think, at this point.


    God, right? I mean, XML is not great to work with by hand, but the beauty is some free tools and a well-written DTD can make for an incredibly easy-to use editor.

    I'm really so very against YML. If it wasn't for bukkit permissions, I would vouch to never, ever support it. :(

    True that.

    Personally, I'm avoiding config data if at all possible :)

    So far, for NetherGate and Magic, anything someone could define as a "property" or "configuration data" is run through permissions. So, you can set it up with a YML file just like a global properties file, if you want- or you can tweak any of the values on a per-user basis. It's really much more powerful.

    In terms of where this gets stored, that doesn't really matter. The Persistence plugin supports any kind of data store- you can put your player data in YML and you permissions in Oracle, if you want, I don't care. :)

    Bukkit permissions, however, are YML and YML only- and I'm really not too crazy about that.


    It'd basically be the designer tool you were asking if anyone wanted :)

    Instead of making a Java app, or whatever you had in mind, to remove the burden of YML from the masses, you just make a WB interface into your data. Admins can login and set up your plugin live, using some nice forms that will be much easier for you to put together in HTML than they would be in swing or whatever :)
     
  21. Offline

    Asterdom

    That is a main function of this plugin in your costs.yml file example

    Chimerawing:
    info:
    name: 'ChimaeraWing'
    description: 'Allows you to spend 10 feathers to return to the spawn'
    help: 'Type /setmyspawn to set your the teleport, and use /myspawn'
    permissions:
    - 'mcmmo.item.chimaerawing'
    categories:
    - 'basic'
    costs:
    buy:
    cost: 500
    rent:
    cost:50
    duration: 3000

    Setting the duration option defines (in milliseconds i believe) how much time it is given for
     
  22. Offline

    Euron

    The ability yes, but does that extend to the effect? If I set the ability time of godmode to 30seconds to rent it, will it expire once the rent is up? Or will it remain permanently?

    EDIT: Actually, a 'script' function would tidy this up nicely, where a script looks like
    command(1) (target:buyer)
    command(2) (target:buyer)
    ...
    command(n) (target:buyer)
    Where each command could include a wait.

    For example, buying the "SuperPick"(WorldEdit) Script:
    "//sp area 5
    wait:30
    //"

    Which enables the superpick for the user, waits 30 seconds, then disables it.

    Another example, using a 'godmode script':
    "/god Euron
    wait:60
    /god Euron"

    Which enables godmode for 60 seconds.

    Is something that would accomplish this currently in the scope of the plugin? If not, would it be possible to extend it to do so without great difficulty?
     
  23. Offline

    rcjrrjcr

    Well, I looked at spyc, and it looked pretty interesting. I think I'll finish up the editor first. I might even have a graphical representation of the abilities (à la Civilization's tech tree).
    On another note, I can't seem to find any information about WebBukkit except for some references here and there on the forums. Accessing webbukkit.org gives me an page with all the images and text missing.


    Currently, no. Scripts would be an interesting addition though. I'll add it to the TODO list.

    Actually, it's in server ticks. There are 20 server ticks in 1 second, if the server is not overloaded.
     
  24. Offline

    Asterdom


    Repost. Sorry, but im spending so much time trying ill be DAMNED if i dont get it to work its to perfect for minecraft enhancement. Plus I already wrote a costs file for just about every permission I could want

    /bab categories works.


    I have tried every form of granting permissions i could think of. Adding the 'buyabilities.*' permission as well as
    - 'buyablilities.use'
    - 'buyablilities.abilities.basic' individually as well.

    Neither seems to work for granting me access to the categories or buying abilities.

    /bab buy (instertnamehere) - returns - "Unable to buy this ability" Ingame
    and [INFO] Loaded world: world in the server console

    /bab catergory (instertcatergoryhere) - returns - "Unable to access category" and like wise
    returns [Info] Loaded world: world on the server

    Also i found strange activity in the server running only BuyAbilities, iconomy and permissions updated to as of yesterday and using 612. With only one command in costs.yml

    This is the costs.yml
    Code:
    Abilities:
        Test:
            info:
                name: 'Test'
                description: 'Grants Temporary access to the iconomy extras'
                help: ' to set your the teleport, and use /myspawn'
            permissions: 
                - 'iConomy.admin.stats'
            categories:
                - 'basic'
            costs:
                buy:
                    cost: 1
    
    When i boot up the server the only thing off is.

    [INFO] BuyAbilities: Node "DATA:" empty!

    Now we begin the log when i log in.

    Show Spoiler

    [INFO] Tester [/127.0.0.1:49448] logged in with entity id 137
    2011-04-02 05:29:20

    Immediatly upon logging in attempted the command "/bab buy Home" (same for any other ability)

    Returned "Cannot purchase this ability." In game and


    [INFO] Loaded world: world - In the server console


    I then disconnected (via menu) and got this block of text

    [SEVERE] java.net.SocketException: Software caused connection abort: recv failed
    2011-04-02 05:29:53
    [SEVERE] at java.net.SocketInputStream.socketRead0(Native Method)
    2011-04-02 05:29:53
    [SEVERE] at java.net.SocketInputStream.read(Unknown Source)
    2011-04-02 05:29:53
    [SEVERE] at java.net.SocketInputStream.read(Unknown Source)
    2011-04-02 05:29:53
    [SEVERE] at java.io.FilterInputStream.read(Unknown Source)
    2011-04-02 05:29:53
    [SEVERE] at net.minecraft.server.Packet.b(Packet.java:73)
    2011-04-02 05:29:53
    [SEVERE] at net.minecraft.server.NetworkManager.f(NetworkManager.java:130)
    2011-04-02 05:29:53
    [SEVERE] at net.minecraft.server.NetworkManager.c(NetworkManager.java:229)
    2011-04-02 05:29:53
    [SEVERE] at net.minecraft.server.NetworkReaderThread.run(SourceFile:68)
    2011-04-02 05:29:53
    [SEVERE] java.net.SocketException: Software caused connection abort: socket write error
    2011-04-02 05:29:53
    [SEVERE] at java.net.SocketOutputStream.socketWrite0(Native Method)
    2011-04-02 05:29:53
    [SEVERE] at java.net.SocketOutputStream.socketWrite(Unknown Source)
    2011-04-02 05:29:53
    [SEVERE] at java.net.SocketOutputStream.write(Unknown Source)
    2011-04-02 05:29:53
    [SEVERE] at java.io.DataOutputStream.writeInt(Unknown Source)
    2011-04-02 05:29:53
    [SEVERE] at net.minecraft.server.Packet30Entity.a(SourceFile:119)
    2011-04-02 05:29:53
    [SEVERE] at net.minecraft.server.Packet33RelEntityMoveLook.a(SourceFile:31)
    2011-04-02 05:29:53
    [SEVERE] at net.minecraft.server.Packet.a(Packet.java:108)
    2011-04-02 05:29:53
    [SEVERE] at net.minecraft.server.NetworkManager.e(NetworkManager.java:101)
    2011-04-02 05:29:53
    [SEVERE] at net.minecraft.server.NetworkManager.d(NetworkManager.java:233)
    2011-04-02 05:29:53
    [SEVERE] at net.minecraft.server.NetworkWriterThread.run(SourceFile:89)
    2011-04-02 05:29:53
    [INFO] Tester lost connection: disconnect.genericReason
    2011-04-02 05:29:54
    [INFO] Freed 23.514175415039062 MB.
    2011-04-02 05:30:06

    Reconnected and waited a moment (enough to mimick typing the command)

    [INFO] Tester [/127.0.0.1:49454] logged in with entity id 172
    2011-04-02 05:30:09
    [INFO] Tester lost connection: disconnect.quitting

    No error.


    On top of that i tried using the wildcard permissions to test. To no avail.

    Still have access to the /bab command. Still have access to the /bab categories command.

    But neither:
    /bab category (category)
    nor /bab buy (ability) seems to work

    P.S.: Mispelling the /bab buy test instead of "Test" shows suggestions as well

    Any suggestions? Im trying so damn hard to make this work i dont want to give up on it now....
    Its like the commands are half functioning...

    Any help would be appreciated, i tried to give you a good bit of info without the BS (tried ^^, )
     
  25. Offline

    rcjrrjcr

    Okay. The "Node "DATA" empty" message is not an error. It occurs if your data.yml file is empty.
    And the "Unable to buy ability" error is because I left out a period in the code, making it access the wrong YAML node.
    Same goes for the "Unable to access category" error, except it checked the wrong permission node.

    I'll test again and check if it works. Expect a fixed version soon.

    Version 0.7.3 released! Fixes @Asterdom 's bug (hopefully) and a whole lot of errors. I'll be focusing on modifying the code to only load players' abilities when they log in and save when they log out.

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

    Asterdom

    Thank you rcjrrjcr.

    With ever fiber of my being THANK YOU!
     
  27. Offline

    rcjrrjcr

    Version 0.8 released. Now, player's abilities are only loaded when they log on, and autosaved when they log off.
    Next on the TODO list: Scripts.

    This is how I think scripts will be implemented. Each ability has two scripts - one for activation, one for expiration. Each script consists of commands, like "say", which makes the player say something in chat or use a command, "teleport", which teleports the player somewhere.

    However, there will be some difficulties in doing this. For example, should a script be run only when the player buy/rents the ability or when s?he logs in? Or should there be multiple scripts, though that would add a lot of complexity. The JAR file is getting bigger and bigger with each release.:p

    Version 0.8.1 released. Fixes cost data not loading, resulting in free abilities. :(

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

    Fiddy_percent

    Code:
    2011-04-03 23:47:39 [INFO] Loading properties
    2011-04-03 23:47:39 [INFO] Starting Minecraft server on *:25565
    2011-04-03 23:47:39 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-612-g4c7a9e7-b617jnks (MC: 1.4)
    2011-04-03 23:47:39 [INFO] Preparing level "world"
    2011-04-03 23:47:39 [INFO] Preparing start region
    2011-04-03 23:47:39 [INFO] 144 recipes
    2011-04-03 23:47:39 [INFO] Invalid config file found and converted to proper name/format.
    2011-04-03 23:47:39 [INFO] [Permissions] (Phoenix) was Initialized.
    2011-04-03 23:47:39 [INFO] BuyAbilities version 0.8.1 is inactive.
    2011-04-03 23:47:39 [INFO] BuyAbilities: Stored data not detected. If this is your first run, it's fine.
    2011-04-03 23:47:39 [INFO] BuyAbilities: PluginEnabled event detected!
    2011-04-03 23:47:39 [INFO] iChat (v2.2.2) enabled
    2011-04-03 23:47:39 [INFO] BuyAbilities: PluginEnabled event detected!
    2011-04-03 23:47:39 [WARNING] [iCoLand] Found 0 lands to protect ( loaded from file )
    2011-04-03 23:47:39 [INFO] [iCoLand] Version [v1.17] (initial) enabled
    2011-04-03 23:47:39 [INFO] BuyAbilities: PluginEnabled event detected!
    2011-04-03 23:47:39 [INFO] [iConomy] Logging is currently disabled.
    2011-04-03 23:47:40 [INFO] [iConomy] v4.65 (Kenzi) loaded.
    2011-04-03 23:47:40 [INFO] [iConomy] Developed by: [Nijikokun, Coelho]
    2011-04-03 23:47:40 [INFO] BuyAbilities: PluginEnabled event detected!
    2011-04-03 23:47:40 [INFO] BuyAbilities: Hooking into iConomy.
    2011-04-03 23:47:40 [INFO] BuyAbilities: Economy hooked!
    2011-04-03 23:47:40 [INFO] BuyAbilities: BuyAbilities inactive.
    2011-04-03 23:47:40 [INFO] [iCoLand] Successfully linked with iConomy
    2011-04-03 23:47:40 [INFO] [NODROP] The settings file been created. Please set it up before using the plugin. The plugin will be disabled until you do.
    2011-04-03 23:47:40 [INFO] [NoDrop] Disabled
    2011-04-03 23:47:40 [INFO] BuyAbilities: PluginEnabled event detected!
    2011-04-03 23:47:40 [INFO] [Permissions] version [2.5.5] (Phoenix)  loaded
    2011-04-03 23:47:40 [INFO] BuyAbilities: PluginEnabled event detected!
    2011-04-03 23:47:40 [INFO] BuyAbilities: Hooking into Permissions.
    2011-04-03 23:47:40 [INFO] BuyAbilities: Permissions hooked!
    2011-04-03 23:47:40 [INFO] BuyAbilities: BuyAbilities active.
    2011-04-03 23:47:40 [INFO] [iChat] Found Permissions (v2.5.5)
    2011-04-03 23:47:40 [INFO] [iCoLand] Successfully linked with Permissions
    2011-04-03 23:47:40 [INFO] [iConomy] hooked into Permissions.
    2011-04-03 23:47:40 [INFO] Vanish 1.5.2 loaded.
    2011-04-03 23:47:40 [INFO] BuyAbilities: PluginEnabled event detected!
    2011-04-03 23:47:40 [INFO] Done (0.111s)! For help, type "help" or "?"
    2011-04-03 23:47:45 [INFO] Red_Comet_00 [/192.168.1.1:51216] logged in with entity id 121
    2011-04-03 23:47:45 [INFO] Player "Red_Comet_00" joined!
    2011-04-03 23:47:45 [SEVERE] java.lang.NullPointerException
    2011-04-03 23:47:45 [SEVERE]     at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin.storage.StorageYaml.getPlayerData(StorageYaml.java:93)
    2011-04-03 23:47:45 [SEVERE]     at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin.BuyAbilities.processLogonLogoff(BuyAbilities.java:755)
    2011-04-03 23:47:45 [SEVERE]     at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin.PlayerLoaderSaver.run(BuyAbilitiesPlayerListener.java:87)
    2011-04-03 23:47:45 [SEVERE]     at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:33)
    2011-04-03 23:47:45 [SEVERE]     at java.lang.Thread.run(Unknown Source)
    2011-04-03 23:48:19 [INFO] Red_Comet_00 lost connection: disconnect.quitting
    2011-04-03 23:48:19 [INFO] Player "Red_Comet_00" quitted!
    2011-04-03 23:48:19 [INFO] Unloading player "Red_Comet_00"'s data!
    2011-04-03 23:48:19 [SEVERE] java.lang.NullPointerException
    2011-04-03 23:48:19 [SEVERE]     at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin.storage.StorageYaml.writePlayerData(StorageYaml.java:136)
    2011-04-03 23:48:19 [SEVERE]     at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin.BuyAbilities.processLogonLogoff(BuyAbilities.java:762)
    2011-04-03 23:48:19 [SEVERE]     at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin.PlayerLoaderSaver.run(BuyAbilitiesPlayerListener.java:87)
    2011-04-03 23:48:19 [SEVERE]     at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:33)
    2011-04-03 23:48:19 [SEVERE]     at java.lang.Thread.run(Unknown Source)
    2011-04-03 23:49:00 [INFO] Stopping the server..
    2011-04-03 23:49:00 [INFO] CONSOLE: Stopping the server..
    2011-04-03 23:49:00 [INFO] Stopping server
    2011-04-03 23:49:00 [SEVERE] java.lang.NullPointerException
    2011-04-03 23:49:00 [SEVERE]     at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin.storage.StorageYaml.writeData(StorageYaml.java:75)
    2011-04-03 23:49:00 [SEVERE]     at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin.BuyAbilities.onDisable(BuyAbilities.java:143)
    2011-04-03 23:49:00 [SEVERE]     at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:120)
    2011-04-03 23:49:00 [SEVERE]     at org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(JavaPluginLoader.java:528)
    2011-04-03 23:49:00 [SEVERE]     at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManager.java:228)
    2011-04-03 23:49:00 [SEVERE]     at org.bukkit.plugin.SimplePluginManager.disablePlugins(SimplePluginManager.java:222)
    2011-04-03 23:49:00 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.disablePlugins(CraftServer.java:83)
    2011-04-03 23:49:00 [SEVERE]     at net.minecraft.server.MinecraftServer.g(MinecraftServer.java:238)
    2011-04-03 23:49:00 [SEVERE]     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:313)
    2011-04-03 23:49:00 [SEVERE]     at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    2011-04-03 23:49:00 [INFO] Stopping server
    
    :(
     
  29. Offline

    rcjrrjcr

    Hmm. I'll go look at my code now.

    EDIT: I'm an idiot. Accidentally copied my ebeans code to the main build. Sorry. Hopefully I can get the fix out soon.

    Version v0.8.2 released. Fixed 'storage data not loading properly' bug caused by code from another branch.

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

    Fiddy_percent

    Code:
    2011-04-04 01:23:13 [INFO] Loading properties
    2011-04-04 01:23:13 [INFO] Starting Minecraft server on *:25565
    2011-04-04 01:23:13 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-612-g4c7a9e7-b617jnks (MC: 1.4)
    2011-04-04 01:23:13 [INFO] Preparing level "world"
    2011-04-04 01:23:13 [INFO] Preparing start region
    2011-04-04 01:23:13 [INFO] 144 recipes
    2011-04-04 01:23:14 [INFO] Invalid config file found and converted to proper name/format.
    2011-04-04 01:23:14 [INFO] [Permissions] (Phoenix) was Initialized.
    2011-04-04 01:23:14 [INFO] [ecoCreature] version {0.0.4f} is loading.
    2011-04-04 01:23:14 [INFO] BorderGuard Lite (Round) version 2.4 is enabled!
    2011-04-04 01:23:14 [SEVERE] java.lang.Exception: plugins\BuyAbilities\data.yml not found.
    2011-04-04 01:23:14 [SEVERE]     at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin.storage.StorageYaml.init(StorageYaml.java:30)
    2011-04-04 01:23:14 [SEVERE]     at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin.BuyAbilities.hook(BuyAbilities.java:228)
    2011-04-04 01:23:14 [SEVERE]     at com.rcjrrjcr.bukkitplugins.buyabilitiesplugin.BuyAbilities.onEnable(BuyAbilities.java:82)
    2011-04-04 01:23:14 [SEVERE]     at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:118)
    2011-04-04 01:23:14 [SEVERE]     at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:514)
    2011-04-04 01:23:14 [SEVERE]     at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:216)
    2011-04-04 01:23:14 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:94)
    2011-04-04 01:23:14 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:72)
    2011-04-04 01:23:14 [SEVERE]     at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:215)
    2011-04-04 01:23:14 [SEVERE]     at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:202)
    2011-04-04 01:23:14 [SEVERE]     at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:142)
    2011-04-04 01:23:14 [SEVERE]     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:257)
    2011-04-04 01:23:14 [SEVERE]     at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    2011-04-04 01:23:14 [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 01:23:14 [INFO] [Permissions] version [2.5.5] (Phoenix)  loaded
    2011-04-04 01:23:14 [INFO] [iChat] Found Permissions (v2.5.5)
    2011-04-04 01:23:14 [INFO] iChat (v2.2.2) enabled
    2011-04-04 01:23:14 [WARNING] [iCoLand] Found 0 lands to protect ( loaded from file )
    2011-04-04 01:23:14 [INFO] [iCoLand] Successfully linked with Permissions
    2011-04-04 01:23:14 [INFO] [iCoLand] Version [v1.17] (initial) enabled
    2011-04-04 01:23:14 [INFO] [iConomy] Logging is currently disabled.
    2011-04-04 01:23:14 [INFO] [iConomy] v4.65 (Kenzi) loaded.
    2011-04-04 01:23:14 [INFO] [iConomy] Developed by: [Nijikokun, Coelho]
    2011-04-04 01:23:14 [INFO] [iCoLand] Successfully linked with iConomy
    2011-04-04 01:23:14 [INFO] [iConomy] hooked into Permissions.
    2011-04-04 01:23:14 [INFO] [MultiVerse] - Version 1.6 (Permissions 2.5.5) Enabled
    2011-04-04 01:23:14 [INFO] [MultiVerse] Loading World & Settings - 'world' - NORMAL
    2011-04-04 01:23:15 [INFO] [MultiVerse] Loading World & Settings - 'world2' - NORMAL
    2011-04-04 01:23:15 [INFO] [MultiVerse] Loading World & Settings - 'nether' - NETHER
    2011-04-04 01:23:15 [INFO] [MultiVerse] 3 - World(s) loaded.
    2011-04-04 01:23:15 [INFO] [MultiVerse] Loading Portals
    2011-04-04 01:23:15 [INFO] [MultiVerse] 0 - Portal(s) loaded.
    2011-04-04 01:23:15 [INFO] [NoDrop] 0.2.3 is enabled!
    2011-04-04 01:23:15 [INFO] Vanish 1.5.2 loaded.
    2011-04-04 01:23:15 [INFO] Done (0.132s)! For help, type "help" or "?"
     

Share This Page