Inactive Jobs v2.0.1 - Jobs plugin for Minecraft (iConomy 4/5 & BOSEconomy, Permissions) [860]

Discussion in 'Inactive/Unsupported Plugins' started by flametornado, Apr 17, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    flametornado

    NOTE: THIS PLUGIN IS NO LONGER BEING DEVELOPED \ SUPPORTED BY ME.

    phrstbrn HAS TAKEN UP THE DEVELOPMENT \ SUPPORT AND ALL QUERIES SHOULD GO TO HIM ON HIS POST. (http://forums.bukkit.org/threads/ec...t-935-iconomy-5-boseconomy-permissions.23429/)


    Jobs - The Job plugin for Minecraft:
    Version: 2.0.1

    Requires:
    • iConomy 4/5 / BOSEconomy
    Optional

    • Stats and Achievements
    • Permissions
    • MySQL
    A fully configurable plugin that allows you to get paid for breaking, placing and killing. Class based (experience increases as you perform your job).


    NOTE: Please read the comments in the configuration file thoroughly and check the console errors before posting here for help.

    [fire]IMPORTANT [fire]: If you want to upload your config for help, please do so using the forum's upload functionality.

    If you like this plugin, please donate.

    [​IMG]

    Video



    Thanks Samkio for the plugin tutorial video.

    Downloads
    Previous Versions (open)



    Features:
    • Create your own custom jobs and choose what they get paid for and how much.
    • Leveling mechanic where higher level jobs will give higher incomes. Income earnt = experience gained.
    • Equation determining maximum experience, experience gained and income gained is customizable.
    • Customizable skill levels in the game to mark leveling milestones (fully customizable in the configuration file).
    • Your profession and skill level is part of your display name and whenever you talk everyone will know what you do and how good you are. (optional)
    • Stats of your maximum level in a job is saved if you have the stats and achievements plugin. ( for bragging rights) (optional)
    • Does periodic saving and save on player exiting the server.
    • Leaving a job resets your job level and experience to 0.
    • Permissions support.
    • Admin commands work even when the players are offline.
    Source:


    I made a sourceforge account for this. It will allow you to report bugs and feature requests. It'll help me a lot to make sense of this.

    The link is https://sourceforge.net/projects/flametornadjobs/.

    Some rules before you go there:
    1. Please look through the bugs that have already been reported to see if someone else has already reported that bug. If you have any extra information, post it on the bug's comments. The more information I have, the easier it is for me to fix it and test it.
    2. Same as above for feature requests.


    Commands:
    Code:
    Player:
    /jobs browse -  View a list of the available jobs.
    /jobs join [job name] - Join the job.
    /jobs leave [job name] - Leave the job.
    /jobs info [job name] [break, place, kill] - view information about that job.
    /jobs stats - view your job level and experience needed to level up.
    
    Admins:
    /jobs fire [playername] [job] - fire the player from the specified job.
    /jobs employ [playername] [job] - employ the player into the specified job.
    /jobs promote [playername] [job] [levels] - promote the player in their job X levels.
    /jobs demote [playername] [job] [levels] - demote the player in their job X levels.
    /jobs grantxp [playername] [job] [experience] - grant the player X experience in the selected job.
    /jobs removexp [playername] [job] [experience] - remove X experience from the player in the selected job.
    /jobs transfer [playername] [oldjob] [newjob] - transfer the player's job (keeps levels and experience)
    
    NOTE: All job names are case sensitive.
    
    Permissions Nodes:
    Code:
    jobs.join.<jobname> - allows the group to join the job. Where <jobname> is replaced with the job name (e.g. jobs.join.Woodcutter or jobs.join.* to join all jobs).
    jobs.world.<worldname> - allows players to get paid on selected world.
    
    jobs.admin.fire - enables the fire admin command.
    jobs.admin.employ - enables the employ admin command.
    jobs.admin.promote - enables the promote admin command.
    jobs.admin.demote - enables the demote admin command.
    jobs.admin.grantxp - enables the grant experience admin command.
    jobs.admin.removexp - enables the remove experience admin command.
    jobs.admin.transfer - enables the transfer admin command.
    Changelog:

    Version 2.0.2 WIP
    • Added more parameters to job level up (jobname, jobcolour, titlename, titlecolour, playername, playerdisplayname, joblevel)
    • Fixed promote and demote to correctly change the max exp.
    • job names are no longer case sensitive.
    • Changed the saving mechanism to be synchronous instead of asynchronous (may help with people losing jobs)
    • added config option of enable-pay-near-spawner in general config.
    • Fixed some NPE
    • Wolves killing things gives the player money and experience.
    • Fixed empty tags not resulting in errors.
    • fixed mysql password is all numbers.
    • fixed honorific error
    NOTE: This version is stable, but not fully tested. I will not release this version fully until i track down the jobs vanishing bug and destroy it for all the hassle it has cause me :p


    Version 2.0.1
    • Small bugfixes
    • Moved where the update stats command is called so it won't break anything if there's an error in it. Should also improve performance slightly
    • made the enabling of the stats and achievements plugin optional (configuration parameter in general settings
    • ChatColour can now be in any case and it'll still work.
    Version 2.o.0

    • Multiple jobs
    • Exposed equations
    • More customization
    • Can specify sub-class
    • Can specify job class kills.
    • Messages are customizable.
    • Kills with arrows works
    • Admin commands (work offline too)
    • Can disable payout on certain worlds (mainly for creative servers).
    • Can limit the number of jobs a player can have
    • Can limit the number of people that can have a certain job per server.
    • Better console error messages.
    • Plugin disables itself properly.
    Changelog (open)



    Version 1.3.3b and 1.3.2b
    • Killing works properly now. Drops seem to have gone back to normal levels and you can kill stuff and get paid for it all the time.
    • 1.3.3b is for iConomy 5 AND ONLY iConomy 5
    • 1.3.2b is for before iConomy 5 AND ONLY before iConomy 5
    Version 1.3.3

    • iConomy 5 support.
    Version 1.3.2

    • Removed annoying spam message which was for debugging and i forgot in for 1.3.1
    • Changed experience to be a double so people get experience for things less than 1. Saving mechanism still saves using integers, it would create waaaay too much fuss to change this since the database schema would need to be changed for everyone that used this plugin and it would render all previous saves incompatible. This seems like a decent compromise. People will lose a maximum of .99 exp when they log out.
    • Better method for checking when an animal's dead, should fix the weird animation problem and the lack of drops some people have been experiencing.
    Version 1.3.1

    • Killing near mob spawners will not give you money anymore.
    • Displays payment amount when you do /jobs info for killing now too.
    • Changed way that you create kill tags incode. Results in the system crashing and the plugin not being enabled if you got the wrong name (e.g. capitals or misspelt name)
    Version 1.3.0

    • Killing stuff should work now. This section is not as thoroughly tested, but should work fine.
    • No jobs have been made with killing stuff, you're on your own with the configuration for a while but the template section has been updated, it follows the same pattern as break and place.
    Version 1.2.3 - Bugfix update

    • changed priority to make sure it gets run last (to make the following points work properly)
    • checks if you can place a block or if the event is canceled by another plugin. Done to avoid people getting rick very easily by placing blocks in areas they are not allowed.
    • Fix for players not getting removed properly in the onDisable function which results in weird names when people reload their plugins.
    Version 1.2.2

    • The titles will now take into account any previous modifications to your display name by another plugin and simply tack on the title at the front (and when you change jobs, strip it from your title and tack a new title at the front).
    Version 1.2.1

    • Base experience is now configurable
    • experience multiplier is not configurable (for those who want lower economies). If you want to give 0.2 of your currency to per item, then set the multiplier to 10.
    Version 1.2.0

    • A little code cleanup.
    • Permissions support
    • customizable flat rate pay
    • customizable skill titles.
    Version 1.1.2

    • Cleaned up sql commands more to make them more specific and avoid errors as much as possible. Hard to test this since neither my testing server and my proper server have any problems seen by other people.
    • Fixed the system to work with /reloadall command. The experience was still being saved, you just needed to log out. I didn't even know that this command existed, so i never thought i'd have the plugin enable with people in the server. It now takes that into account and online users will not need to log out to see their stats and work on their jobs.
    Version 1.1.1 [fire] RECOMMENDED [fire]

    • Cleaned up SQL commands to be more exact, should result in less errors.
    • New configuration for what kind of prefix to add to the username (job, skill level, both or none).
    • New configuration to toggle the option of broadcasting messages when users reach the next skill level.
    • [Stats & Achievements] - further integration, this plugin now also adds the iConomy money amount to the stats table. (will always be 1 block behind)
    • URGENT FIX - tables were not getting cleared and players ended up having multiple jobs with multiple levels instead of one job and one set of levels. Code written to auto correct this.
    Version 1.1.0

    • Added BOSEconomy integration. This should be automatically detected.
    • Added flatfile functionality for server admins who don't want to use mysql.
    • EXPERIMENTAL : Added sqlite functionality, I sadly couldn't get sqlite to work properly on my testing machine so i haven't tested it. It should work though.
    Version 1.0.1

    • Small fix on /jobs stats command. It now rounds off the two decimal places and is less annoying to look at when it gives you the price for placing/destroying a block
    Version 1.0

    • Initial build, spent the weekend on it, pretty satisfied with it, added all mentioned functionality.
    [\SPOILER]

    TODO:



    See sourceforge for requested features and bugs.
     
  2. Offline

    flametornado

    try turning the server off, deleting the jobs table, execute this query "CREATE TABLE IF NOT EXISTS jobs (username varchar(20), experience integer, level integer, job varchar(20));" and see what plugin starts to whine because i stole it's database
     
    Darcion likes this.
  3. Offline

    QuackzMcDuck

    That worked..I appreciate the help.

    I just made a new database instead.
     
  4. Offline

    riuthamus

    Only issue now is herochat, it removes the formating for that and thus makes me look like a normal player instead of the mod colors. Also an integer option would be nice so it doesnt mess up with BOSEcon.
     
  5. Offline

    iffa


    You want one, I make one. Go on and put it to the first post if you feel like it.
     
  6. Offline

    Aiquen

    Hello, flametornado, this plugin is most lightweight and still enough customizable. That's what i'am looking for. But minimal possible rates of gains (and incomes) are really too high, for our server. Could you change that rounding from 0.2 to 0? Or even better, would you be willing to share source-code?
     
  7. Offline

    Plague

    using a plus sign in the title is not allowed, removed
     
  8. Offline

    darkwarriors

    we love if u could add decimal also in item

    like LOG: 0.2 or 0.01 ecc ecc

    we need it in decimal becuase reset all economy with 60+ players its so difficult!

    we see that u add in item experience calcolation rounding can u delete it? so we can add decimal variables?
     
  9. Offline

    flametornado

    I'm working on that right now. I'm going to give an experience multiplier and open up the default experience.

    I will post source code as soon as i find a nice (free) place to post it. And if you want the source you can ask instead of going through the annoying process of decompiling it :p
     
  10. Offline

    Aiquen

    As you know, i asked you :) But instead of blind waiting, i tried to do something by myself. :) I am sure you know https://github.com/ or http://www.dropbox.com/ :)

    I deleted my previous post, cause i lied there... I decompiled this, but with no working variables (or something like that), but i got that right after you quoted me:) (Decompiled plugin works, but it's not counting).
    I am very happy, that you will do that for us. And when you're in it.. could you change player.getName() to player.getDisplayName() in "void setDisplayName"? I think that won't change original color of name with that. :) (but i may be wrong). Really thanks ;)
     
  11. Offline

    flametornado

    Sure I can do that.
     
  12. Offline

    Aiquen

    I am sorry, but... What exactly did you do?
    You still have player.getName() there...
    Your changes for lower rates are not working. I think, you have to convert from int to double:

    Code:
    increaseExperience((int)(income * xpMultiplyer))

    and you can revert that "xpMultiplier", because you're not counting with that in this(in code) anyhow and exps converted to double will replace that...

    Code:
    public boolean onCommand()


    Bad configuration sample on first post here. And still no source-code.
    I do not want to be ungrateful, I am just sad. Keep working, it's almost perfect! :)
     
  13. Offline

    Tbowick

    I don't want to install mysql. How do I utilize flatfile? That's what iConomy is using. The configuration file for jobs only has the mysql section. Do I need to change something in the jobs config file and set up a flatfile db?
     
  14. Offline

    Aiquen

    Dude, you made my day so much brighter, I love you!
    (first line of config: # storage method, can be MySQL, sqlite, flatfile)
    (second line of config: storage-method: MySQL)
     
  15. Offline

    flametornado

    The configuration will be updated soon. I missed that.

    To get around the xp rounding I implemented an exp multiplier. If you have the amount of money you get is 0.2, then set the multiplier to 10 and get 2 exp per item.

    I also opened up the base exp if you want to change that.

    I stayed with .getName() instead of doing .getDisplayName() because if i did that there would be a problem when you change jobs or level up the plugin will add another title in front of your display name ending up with Apprentice Woodcutter Apprentice Woodcutter Apprentice Woodcutter Apprentice Woodcutter Apprentice Woodcutter Apprentice Woodcutter Apprentice Woodcutter Apprentice Woodcutter Apprentice Woodcutter Apprentice Woodcutter Apprentice Woodcutter Apprentice Woodcutter Apprentice Woodcutter Apprentice Woodcutter Apprentice Woodcutter Apprentice Woodcutter Apprentice Woodcutter Apprentice Woodcutter Apprentice Woodcutter Apprentice Woodcutter Apprentice Woodcutter Apprentice Woodcutter Apprentice Woodcutter Apprentice Woodcutter Apprentice Woodcutter Apprentice Woodcutter Apprentice Woodcutter Apprentice Woodcutter Apprentice Woodcutter Apprentice Woodcutter Apprentice Woodcutter Apprentice Woodcutter Apprentice Woodcutter Apprentice Woodcutter Apprentice Woodcutter Apprentice Woodcutter Aiquen.

    I will fix that at one point, when i don't have uni work to do.

    the source will be posted up at one time.
     
  16. Offline

    Derphiria

    im running CB 714 and i keep getting this console error

     
  17. Offline

    Aiquen

    OK, so my bad. I set multiplier to 0.1 and pays to 2. With 10 and 0.2 it's working. I didn't get this at firt.
     
  18. Offline

    iffa


    Had to reupload this... but atleast it's back. :D
     
  19. Offline

    darkwarriors

    for me 1 coins for every block placed or destoied is too much.. any solution?

    cb 677 or 674 jobs give this error:

    Code:
    2011-04-25 19:42:21 [SEVERE] java.lang.Integer cannot be cast to java.lang.Double loading Jobs v1.2.1 (Is it up to date?)
    java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Double
            at me.alex.jobs.Jobs.onEnable(Jobs.java:131)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:127)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:578)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:216)
            at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:115)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:93)
            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)
    
     
  20. Offline

    Tbowick

    Wow. I can only plead late-at-night. Thanks for your good humor and for not calling me a "newbie #)%wit"
     
  21. Offline

    flametornado

    looks like there's a problem with your username, password, database name or url. Please check those.

    The number you enter that has to be a double (in the format of [digit(s)].[digit(s)]). For example 0.0 would be acceptable, but 0 wouldn't.

    If you get too much money, then set the flat-rate-payout parameter to 0.0
     
  22. Offline

    Derphiria

    i used the config file that was in the rar file you posted.
     
  23. Offline

    flametornado

    You need to set the username to the username of your mysql database, and the password to the password needed to access your mysql database.

    If you don't have a mysql database, I suggest switching to flatfile.
     
  24. Offline

    darkwarriors

    what range xp-multiplayer can be?

    decimal or only int?
     
  25. Offline

    flametornado

    Decimal. Anything that in the config is an int, has to stay an int, anything with a decimal point, has to be a decimal.

    That's just how the yml reader works. If you make a mistake you'll get an error on the bukkit console at start.

    The range is 0.0 to the maximum size of a Double, which is roughly 2^1023.
     
  26. Offline

    o0AzzA0o

    i had issue with builder job where they would get 10 coin for placing blocks that where not included on the list...... build 733 no errors in log or anything with default config files..
     
  27. Offline

    flametornado

    That's because you left the flat-rate-payout to 10.0 Set it to 0.0 or 1.0
     
    o0AzzA0o likes this.
  28. Offline

    o0AzzA0o

    omg how can i be so dumb...... thanks
     
  29. Offline

    darkwarriors

    flame if i want to add a farmer jobs? suggest me how to set up it, beacuse i see only SOIL and CROPS, obv i want to make jobs that arent lammy
     
  30. Offline

    flametornado

    I was thinking about those too, but i ended up with the thought that they'd be lamey and nobody would want them :p.

    I was thinking that farmers get money for :
    break:
    sugar cane
    flower
    rose
    brown mushroom
    red mushroom
    crops
    pumpkin
    cactus

    place:
    sapling
    crops
    cake

    I know i put crops for both place and break, but people prob wouldn't farm, it gets boring quite fast.
    An easy way to make it un-farmable is to give it a low payout as well. Most people will get bored farming waaaaaaay before they hit a high level if you do crops as 1 or 2, maybe 3 (depends on your economy).

    Once I put in killing mobs (after i write my literature review that's due in a couple of weeks and i've been putting off for about a month) you can also give them money for killing animals.
     
  31. Offline

    Derphiria

    i tried the flatfile but it seems like no one can gain any experience or levels.
    is there anything i need to fix to let them gain experience?
     
Thread Status:
Not open for further replies.

Share This Page