Inactive [ECON] WurkIt v1.2.0 - Let your players earn iConomy\BOSEconomy money for playing Minecraft!! [1000]

Discussion in 'Inactive/Unsupported Plugins' started by oz_revulsion, Jun 11, 2011.

  1. Offline

    oz_revulsion

    [ECON] WurkIt v1.2.0 - Let your players earn iConomy\BOSEconomy money for playing Minecraft!! [1000]

    Version: 1.2.0

    This plugin allows you to set a price to pay your players for every type of block that they could find in minecraft. Unlike other jobs plugins WurkIt gives you the ability to set everyone the same job meaning that everyone is on the same even ground to earn currency making for a more stable (all beit semi communist) economy.

    If you'd like to buy me a beer for staying up building you a plugin you can donate here:

    [​IMG]

    Because of Bukkit's BS adfly links ban that is the only way to support me, sorry.

    You can download WurkIt here:
    Download the Jar there
    Or the Zipped Jar here

    Requirements:
    - iconomy v5.0; or
    - BOSEconomy v0.6.2 or above only

    Optional:
    - Permissions v3.1.6 only any older versions will not work

    Compatible With:
    - ItemCraft v1.4.1

    Tutorial Videos:

    Watching these videos is highly recommended for all admins who have WurkIt whether this is the first time you are installing or you've been on board since 0.2. These videos outline all of the old and new features and how to use them. The first two videos have admin and player stuff and is all the stuff that WurkIt can do in game. The last two videos are admin only videos and go through how to configure WurkIt and all the funky new features for admins. The total running time is 40 minutes but that is a damn sight quicker than it would take you to learn it all by reading, plus you get to listen to my velvet vocals if you watch the videos :D

    Show Spoiler

    Part 1 of the Player and Admin Tutorial


    Part 2 of the Player and Admin Tutorial




    Part 1 of the Admin configuration Tutorial and overview of new admin commands




    Part 2 of the Admin configuration Tutorial and overview of new admin commands




    New Features in this version:
    Show Spoiler

    - Wurk places have been put in! With Wurk places you can set an area in your server where if players break or place blocks in that area you will automatically pay them extra for working in that area. In this way you can pay players for helping you will projects in your server.
    - Heaps of bug fixes include, spelling mistakes in WurkIt items. Beds and Iron doors not working is fixed. Fixed the anti farming being broken. Every bug that was reported in the thread before the 1.2 annoucement has been fixed.
    - Updated to work with RB #1000.
    - WurkIt can only use Permissions 3.1.6 and BOSEconomy 0.6.2 or above now.
    - Added in commands to fill in your config with all blocks available in WurkIt and another to remove all 0 valued blocks. So when you want to add heaps of blocks at once you can all available blocks to your config, change the values of the ones you want to add and then run the strip out command to get rid of the left over blocks you don't want.
    - WurkItItems and your config will now always be ordered by minecraft ID even if you take them out of order in your config if you run a priceset then they will be reordered again.


    Features:

    Show Spoiler

    - Set a break and a place price for the blocks you want to and a default price for every other block your players may break. All blocks in 1.7.2 supported!
    - In game commands to edit your price list in the config and also check the prices you currently have set for placing and breaking blocks you are near in game.
    - Players can choose whether they are notified about their payday or not.
    - Choose if you want to display to the player that they have been paid for their recent activity on the server. Also you can set the exact message that they see when they get paid.
    - Choose the frequency of when your players get paid. Anything from once a second to once a whenever the hell you want (in seconds!)
    - Players can't just place a block and then break it again for money or vice versa. There is a break, placed buffer which keeps a rolling window of the blocks placed and broken so once a block is placed or broken on a square that square will not give any money until the buffer has been reset or when the window moves off the square. This is all configurable
    - Debug mode can be turned on to make sure that your players are always getting paid correctly.
    - Latest versions of BOSEconomy and iConomy support.
    - Permissions v3.1.6 only support. Older Versions will not work.
    - This plugin is compatible with ItemCraft v 1.4.1 Please note that is compatible but not supported! What this means is that it will run without problems but you will not be able to set prices for custom blocks they will all just get the default price. One thing to note however was that the way I made this compatible was to make it so if your server is an ItemCraft server then WurkIt's support for long grass, trap doors and dead bushes had to be taken away because currently they are not supported within ItemCraft. So if you have an ItemCraft server then these blocks will only use the default price along with all the other ItemCraft blocks. I have changed the plugin to regenerate its WurkItItems.txt every time it starts up now so if you are unsure of what blocks are supported based on your server just check that. Also if you have a non ItemCraft server you can still use long grass, trap doors and dead bushes if you do want to make your players gardeners! LOL!
    - Put in functionality to pay for placing blocks. This has all been built into the anti farming functionality so you can farm with placing blocks.
    - Edited all the commands to involve this placing functionality.
    - WurkIt will now automatically edit your config so that you have all the necessary settings for it not to break when upgraded. All you need to do is stop your server, delete the old Wurkit.jar put in the new one and restart Wurkit will automatically upgrade your config file without blowing away your current settings!



    Installation:
    Simply place the jar in your plugins folder and reload your config. This will create the WurkItConfig.yml, WurkItVersion.txt and the WurkItItems.txt files in the WurkIt folder. If you have previously installed versions of WurkIt then all you need to do is replace your .jar file with the new one and Wurkit will do all the work of rebuilding your config to the latest version.

    Configuration:
    WurkIt.config
    Show Spoiler

    Code:
    # The pricelist is what you pay the player for breaking or placing certain blocks
    # default is what the player is paid if you don't specify how much a certain block is
    # For example if you only have Stone and default setup in your price list then your players
    # will get your set break price everytime they break stone and if they break any other block they will get your default price
    # default is mandatory and must be in the config, if you do not want to use it then set it to zero but
    # if you remove it you will crash the plugin.
    # The format is:
    # <item_name>:
    #      break: 0.0
    #      place: 0.0
    # the item names can be found in the items WurkItItems.txt in the plugin folder but generally
    # it is just the grammatically correct item name so stone is "Stone"
    # all spaces are replaced with _'s and word after also starts with a capital so cobbelstone stairs is Cobblestone_Stairs
    # if you are unsure check the WurkItItems.txt but to use an item it must be written in the config exactly as it is
    # in the WurkItItems.txt and it is case-sensitive so if in your config you do this
    # sToNe:
    #    break: 3.0
    #    place: 1.0
    # it's not going to work and your stone will just get the default value. It must be "Stone"
    
    PriceList:
       default:
          break: 3.0
          place: 1.0
    
    # Set your message in the message field. Use the text $$ where you want to put your amount
    # your currency units are automatically picked up. Coloured messages are currently not supported
    # set enabled to false if you do not want to get the payday messages sent to your players.
    
    PaydayMessage:
       message: "It's payday! You earned $$"
       enabled: true
    
    # The PaydayInterval is how often your players get paid and it is in second. Only put integers (whole numbers) in here
    # the buffer size dictates how many blocks are recorded as being placed or broken and thus have no value if broken or palced at any one time
    # now this buffer lives in memory on your server so if you don't want to pwn your server I suggest you keep this modest
    # at a guess I'd say 1000 is reasonable for most servers without causing too much trouble but if you find you are getting
    # performance issues after installing this plugin then I'd say reduce the buffer size
    # by default the buffer runs a moving window so when it hits the max size the first entry is deleted to make room for the last one
    # the buffer is cleared by default whenever there is a payday but if you want to keep your rolling window constant then change
    # your clearBufferOnPayday value to false. Its true by default to give your poor server memory a break from time to time
    # rather than being at max capacity all the time but if you think your server can hack it then you can set it there
    # debugType takes three different values and is just used to make sure that your payday is firing correctly
    # you can use none, simple or verbose. Simple will tell only when the payday task fires and verbose
    # will show you when it fires and also how much each player is paid
    
    PaydayInterval:
       interval: 60
       clearBufferOnPayday: true
       debugType: none
       bufferSize: 1000
    # This section sets out the wurkplace variables. The first variable wurkPlaceTool is the id of the tool that is to be
    # used to mark out the wurkplaces when creating a wurkplace. The next for default variables set out what a wurkplace
    # information will be set to when a new wurk place is first created on your server. It is important
    # that the break and place type variables are set to either flat or percent in lower case and not mispelled.
    # WurkPlaceGreeting and Farewell are what is displayed to the player when they walk into or out of a wurkplace
    # wurkPlaceSaveInterval is how often (in seconds) wurk it should save the changes made to the wurkplaces that are in
    # memory at the moment down to your server for safe keeping.
    # entryExitRefreshRate is how often in server ticks wurk it should be checking if a player has entered or exited if you
    # are experiencing any lag after installing wurkit you might try increasing this so you check players postions less often
    # Finally debugType takes two options either none or simple. If this is set to simple then a message will be logged in your
    # server log every time a save event is fired.
    WurkPlaceSettings:
       wurkPlaceTool: 268
       defaultBreakType: percent
       defaultBreakAmount: 10
       defaultPlaceType: percent
       defaultPlaceAmount: 10
       wurkPlaceGreeting: "You just entered a Wurk Place."
       wurkPlaceFarewell: "You just left a Wurk Place."
       wurkPlaceSaveInterval: 360
       entryExitRefreshRate: 10
       debugType: none
    
    There is a lot of documentation within auto generated config file but let me re-iterate here.

    The first section is:

    PriceList:

    This holds all the prices for the blocks that will be broken or placed by your players. You have to put them in the format of:

    <item_name>:
    break: 0.0
    place: 0.0

    This is where the <item_name> comes from the WurkItItems.txt and the price is a number with either one or two decimal places. The <item_name> must be the same as what is written in the WurkItItem.txt but is pretty intuitive basically you just start every new word with a capital letter and any space is replaced with a _ so a cobblestone stairs would be Cobblestone_Stairs. If you are ever in doubt then just consult the WurkItItem.txt for the correct case sensitivity and spelling. If you have misspelled or got the case-sensitivity wrong on an entry then it will get the default amount you have set rather than the price you have set for the block itself.

    default must feature somewhere as a block type. What default does is apply a price to any block that you have not applied a price to. If you don't want a price applied to EVERY block you haven't given a break or place price to then simply set default to 0.0. You must always have a default entry or the plugin will crash if you don't want to use it set it to zero.

    The second section is the PaydayMessage section.

    This contains two variables being message and enabled. The message is what you want to be displayed to the player when they get paid you can type any text here. If you want to have the amount to be paid displayed including the units of your iConomy currency put the symbols $$ so you could put "$$ earned today" and it would display "50 Dollars 20 Cents earned today" for example. The enabled property let's you dictate if you want to display to your players that they got paid or not if you have this set to false your players will not get the payday message. If you have the message disabled leave the message there as you may get unexpected results if you have no message and besides if you have it disabled it will not show anyway!

    The third section is the PaydayInterval section.

    The interval takes an integer (a whole number) describing how often in seconds you want to pay your players. Mind you the players will only get paid if they are online so if you set this to every 12 hours and they are not online when this ticks over on the server then they wont be paid so be good to your players when setting this. Do not set this interval to zero or you may find that the plugin acts unexpectedly. If you want to pay your players instantly then just set this to 1. The difference between instantly and after 1 second is barely noticeable but massively more reliable.

    If clearBufferOnPayday is set to true then the placed buffer is cleared down and started again after every payday. This is a good way to minimize the plugins memory foot print as you wont be constantly running at the full placed buffer size. If you have this set to false then you will a persistent moving placed block window.

    debugType accepts three different values: none, simple and verbose. None will obviously turn the debugging information off. Simple will place a line in the server logs every time the payday task fires successfully. Verbose will do the same as simple with the addition that it will also tell you how much it is paying the players that it pays. This is helpful if you aren't sure if your payday task is firing correctly or not or if you think it has stopped.

    The bufferSize refers to how many blocks you want to have in your moving window. The placed buffer keeps track of all the blocks placed by player if these blocks are broken again they do not give payment to the player this also works the other way around i.e. broken then placed. This stops Farming the same block for cash. This buffer is kept in memory so I strongly recommend you do not set this bazillion if you don't want to pwn your server. I have tested this on the default setting of 1000 and the memory footprint was minimal but I would say if you are going to increase this then do so in small intervals and observer what happens to your servers memory so that you don't chew through your RAM. 1000 is more than enough to avoid farming because a player would have to place a block, then guess when the 1000 blocks have been placed and then break it again. This functionality doesn't make farming impossible but it makes it impractical.

    WurkPlaceSettings holds all variables used by the wurk place functionality in WurkIt. Wurkplacetool is the minecraft id of the tool that you want to use to select the points that you want a new wurkplace to be built in.

    The next six variables are what the plugin uses as the settings for new wurk places that are created. It is important that for the Break and Place types that you spell this right or you may break wurkit. You must set this to either percent or flat in lower case. Percent means that players get paid a percentage of the amount they would normally get paid for breaking blocks that are in a wurkplace the percentage amount is held in the amount variables. Flat means that the players get paid a set amount for each block they break in a wurkplace once again the amount that is added in held in the amount variables.

    wurkPlaceSaveInterval is how often changes to wurkplaces are saved down to disk on the server. This is in seconds. This shouldn't really ever need to be changed. entryandexitrefresh is how often the player positions are checked to see if a player has just entered or exited a wurkplace. This is in server ticks so 10 is a half a second. Once again this shouldn't need to be changed but if you do change it then you should only increase it. You might do this if you are experiencing lag.

    Finally debugType takes either simple or none. Simple will log an entry in the server log every time the wurkplaces are saved down to disk.


    Commands:
    Show Spoiler

    /wurkit

    - Shows help for wurkit and the version info

    /wurkit - reload

    - Reloads the configuration file.

    /pricecheck <on: off>

    - Turns on and off the price check feature. When the price check feature is on any time you right click a block it will give you the price that you will be paid for breaking and for placing it. Just a tip here make sure you have an item such as a pickaxe in your hand when you right click and not a block. If you right click with a block in your hand your will still get a price check but you'll also place a block which is a bit annoying! Right clicking with an item in your hand avoids this.

    /paydaymessage <on: off>

    - Turns on and off the payday message on for yourself. This is a per player setting it will not affect the payday setting in the config file.

    /priceset <break: place> <newPrice>

    - This command will change your WurkItConfig.yml and will set the break or place price of the next block that you right click to <newPrice>. Obviously <newPrice> must be a number.

    /wurkplace create <newname>

    - This will create a new wurkplace with the <newname>. This will only work if you have two points selected with your wurkplace selection tool

    /wurkplace rename <oldname> <newname>

    - This will rename the wurkplace with <oldname> to <newname>. You can only do this if you own the wurk place or have the correct permissions to do so.

    /wurkplace delete <wurkplacename>

    - This will delete the wurkplace with the name <wurkplacename>. You can only do this if you own the wurkplace or have the correct permissions to do so.

    /wurkplace info

    - This will display information about the wurkplace you are currently standing in.

    /wurkplace set <wurkPlaceSetting> <value>

    - Use this command to set one of the wurk place settings for the wurk place you are currently standing in to

    /completewurkconfig

    - Use this command to rebuild your config adding in every block that you don't currently have in the config. The new blocks will have a zero break and place value

    /stripwurkconfig

    - Use this command to strip the current config of any blocks that have zero values against both their break and place values<value>

    Available wurk place settings:

    breakType - Can take either percent or flat. Percent to pay a percentage of the normal payment to the employees. Flat to pay them a flat rate for every block.
    breakAmount - The amount of percentage or flat rate to pay.
    placeType - Can take either percent or flat. Percent to pay a percentage of the normal payment to the employees. Flat to pay them a flat rate for every block.
    placeAmount - The amount of percentage or flat rate to pay.


    A quick word about pricecheck and payday message: Pricecheck defaults to off and payday message defaults to what ever is in the server config. Both of these settings are stored in memory for each user and are not saved down to file. So if you have a server that has the payday message turned on and you turn it off with the command this will only stay off during your current session. If you log off and log on again the payday message will turn itself back on. Also if the payday message is off in the config using the paydaymessage command will have no affect.

    Permissions Nodes:

    Code:
    ---Admin Permissions----
    wurkit.admin.* - all admin commands
    wurkit.admin.priceset - /priceset <newPrice>
    wurkit.admin.reload - /wurkit -reload
    wurkit.admin.completeconf - /completewurkconfig
    wurkit.admin.stripconf - /stripwurkconfig
    wurkit.admin.wurkplaces.* - all wurk place admin commands
    wurkit.admin.wurkplaces.rename - allows the player to rename any wurkplace even if they don't own them
    wurkit.admin.wurkplaces.delete - allows the player to delete any wurkplace even if they don't own them
    wurkit.admin.wurkplaces.editvars - allows the player to edit the wurkplace settings for any wurk place even if they don't own it.
    
    ----Player Permissions------
    wurkit.player.* - all player commands
    wurkit.player.pricecheck - /pricecheck <on:off>
    wurkit.player.paydaymessage - /paydaymessage <on:off>
    wurkit.player.allowpay - Players will only be paid by WurkIt if they have this permission
    wurkit.player.wurkplaces.* - all player wurk place commands
    wurkit.player.wurkplaces.create - /wurkplace create <wurkplacename>
    wurkit.player.wurkplaces.rename - /wurkplace rename <oldname> <newname>
    wurkit.player.wurkplaces.delete - /wurkplace delete <wurkplaceName>
    wurkit.player.wurkplaces.info - /wurkplace info
    wurkit.player.wurkplaces.editvars - /wurkplace set <wurkplacesetting> <value>
    Changelog:

    Show Spoiler

    v1.2.0
    - Added Wurk places
    - Heaps of bug fixes including item spelling mistakes, bed and iron doors not working and anti farming not working.
    - Upgrade to RB 1000 and compatible with 1.7.3
    - Upgraded to use Permissions 3.1.6 and new BOSEconomy.

    v1.1.1
    - Fixed the show stopping bug that was invluded in v1.1.0

    v1.1.0 [BUGGED]
    - Built in functionality to pay players for placing blocks.
    - Increased default buffer size after further optimizations.
    - Upgrade to RB 953 and made compatible with new blocks in 1.7.2.
    - Built better version control to help admins update their config file correctly.
    - Updated all commands to handle new placing functionality.

    v1.0.1
    - OMFG new release of Bukkit RB only hours after v1.0 release. Now 935 compatible.
    - A few other little buglets I cleaned up whilst testing new build.

    v1.0
    - Optimized code used around the placed block buffers in preparation for block placing functionality.
    - Optimized permissions and command related code.
    - Change the way that the payday task is scheduled to address payday task stopping periodically.
    - Added version control so that WurkIt wont blow away your config every time you upgrade WurkIt and it will add missing functionality when upgrading.
    - Updated to Bukkit RB[928].
    - Built in BOSEconomy support.
    - Added debugging in the PaydayInterval settings
    - Added the priceset function.

    v0.3
    - Made Wurkit compatible with ItemCraft v1.4.1
    - Made Wurkit support Permissions
    - Added /pricecheck and /paydaymessage commands
    v0.2
    - Added the placed buffer to stop "farming"
    - Added the help and version info commands
    - Added necessary changes to config file for the user to setup all the new functionality
    v0.1
    - Initial build


    Future Plans:

    - Upload source code to github for everyone.
    - More customization features for wurk places.
     
  2. Offline

    oz_revulsion

    Cool cool so you have default WurkIt. Anything special I need to know about your ItemCraft setup? I'll put this on top priority so if I can find a fix then I'll release it in the very next version for you.

    Cheers
    Oz
     
  3. Offline

    Fox Diller

    Well, as my IT Manager said/yelled "We only use ItemCraft for Mo'Creatures in SMP!", so we just installed ItemCraft to use the Mo'Creatures plugin for ItemCraft.
     
  4. Offline

    oz_revulsion

    Oh noes! Ok well I'll have a look at it either tonight or tomorrow some time and see if I can get your IT Manager's blood pressure down ;) At first I'll just make it compatible, if I can. Read compatible, not supported, i.e. I'll try and make it work so you can use the standard blocks but I don't think I'll be able to make it so you can use WurkIt with your new blocks in one weekend, if at all. I let you know how I go.

    Cheers
    Oz
     
  5. Offline

    Fox Diller

    Oh! He's not angry, just in a different room. It's no rush dude, we just started using iConomy. I hope I can help, with some links and information; and a few suggestions from me.

    From the ItemCraft Forum Page I saw:

    I don't think that's the issue. But I also found a person on that Forum Post talking about MagicSpells having the same issue with ItemCraft here. The plugin developer's response was:

    If that's the case, my suggestion would be to see if you can maybe 'try/catch' the error and ignore those blocks not defined by ItemCraft. So when vanilla Bukkit is used, you can get paid by 'mining' Tall Grass or if another plugin messes with Item's you just can't define/earn money until you can accurately get an ID for that block.

    Though, I will admit supporting ItemCraft in some way might be pretty darn awesome. So people could make rare and amazing blocks, then define a nice payday amount in WurkIt.config. Alternatively you could then support a 'default' amount for blocks not found by ID. So if LONG_GRASS or any item throws that java.lang.NoSuchFieldError exception can be thrown into 'default', maybe even do a nice little Console message, "LONG_GRASS Block/Item Not Found; Using Default Payout Value x.xx".

    Just some thoughts! Thanks again for your help man, appreciate it fully!

    .fox
     
  6. Offline

    oz_revulsion

    Thanks for all the info. I have been looking at this whilst I am at work (shh don't tell the boss) and I saw some of that. Although I didn't see all of what you found so still very helpful thanks for doing the leg work for me.

    Yeah wurkit already has a default value that is what "default:" is in the WurkIt.config and it works exactly as you've described (great minds think alike I guess ;) ) If ItemCraft redefines the Materials enum then that is where the problem is. So that you don't have to deal with item codes in the config I have created a map between the Material enum and strings for comparison. It looks like to me from the errors you have that my Map doesn't like the new Materials enum. I may have to build in some checking to see if Item Craft is installed and build my map based on ItemCraft's new enum.

    Either way I'll try work it out. Stay tuned...

    Cheers
    Oz
     
  7. Offline

    Verm

    Talk about strenuous! I'd see if I couldn't get some sorting going on so I could do some searches that weren't O(n).
     
  8. Offline

    oz_revulsion

    Like I said, shitty code, I know about it and I'll fix it in time. But the way things are at the moment we aren't ready for place prices that aren't farm-able. It will come tho.

    Cheers
    Oz

    KK I got it working with ItemCraft. I'll release it later this weekend. If I'm lucky I might be able to add full support rather than just compatibility with ItemCraft.

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

    Fox Diller

    YOU

    ARE

    THE

    MAN!!
     
  10. Offline

    Oscarfzs

    Hey I've downloaded your mod, but I can't seem to get it to work. Not that something is wrong with the mod, but I just can't get the proper format for the item prices. Here is what I typed:

    Code:
    PriceList:
    
       default:
          price: 0.0
    
    Sandstone:
    price: 0.35
    
    Brown_Mushroom:
    price: 5.0
    
    Grass:
    price: 0.1
    
    Soul_Sand:
    price: 10
    
    Mossy_Cobblestone:
    price: 1.0
    
    Wool:
    price: 0.5
    
    Diamond_Ore:
    price: 50.0
    
    Dirt:
    price: 0.1
    
    Red_Mushroom:
    price: 5.0
    
    Glowstone:
    price: 0.5
    
    Netherrack:
    price: 10
    
    Stone:
    price: 0.5
    
    Sand:
    price: 0.1
    
    Mob Spawner:
    price: 500
    
    Log:
    price: 0.35
    
    Lapis_Ore:
    price: 20
    
    Glowing_Redstone_Ore:
    price: 10
    
    Coal_Ore:
    price: 5
    
    Redstone_Ore:
    price: 20
    
    Soil:
    price: 0.2
    
    Gold_Ore:
    price: 30
    
    Iron_Ore:
    price: 20
    
    Wood:
    price: 0.35
    
    Obsidian:
    price: 5
    
    Gravel:
    price: 0.5
    I tried between different spaces before the "price", 3 and 5 and 6 spaces but it didn't work. When I played it kept on showing the default price, which is 0. "Hard work shall be rewarded! You receive 0 credits"

    this happens everytime.
     
  11. Offline

    oz_revulsion

    Hey dude. Yeah the spaces themselves don't matter at long as you are uniform with how you do them. In what you have posted you have used an indent for the default and then no indent the rest of the way. This wont work. I am not sure if the spaces will be preserved in the code tags but I have posted below a corrected version of what you posted above. Just in case the spaces aren't preserved I used 3 spaces for the material and 6 spaces for the price so you just need to do that all the way down. Also I corrected your Mob spawner entry you forgot the underscore ;) Hope that works for you bud! And hope you enjoy the plugin!

    Cheers
    Oz

    Code:
    PriceList:
    
       default:
          price: 0.0
    
       Sandstone:
          price: 0.35
    
       Brown_Mushroom:
          price: 5.0
    
       Grass:
          price: 0.1
    
       Soul_Sand:
          price: 10
    
       Mossy_Cobblestone:
          price: 1.0
    
       Wool:
          price: 0.5
    
       Diamond_Ore:
          price: 50.0
    
       Dirt:
          price: 0.1
    
       Red_Mushroom:
          price: 5.0
    
       Glowstone:
          price: 0.5
    
       Netherrack:
          price: 10
    
       Stone:
          price: 0.5
    
       Sand:
          price: 0.1
    
       Mob_Spawner:
          price: 500
    
       Log:
          price: 0.35
    
       Lapis_Ore:
          price: 20
    
       Glowing_Redstone_Ore:
          price: 10
    
       Coal_Ore:
          price: 5
    
       Redstone_Ore:
          price: 20
    
       Soil:
          price: 0.2
    
       Gold_Ore:
          price: 30
    
       Iron_Ore:
          price: 20
    
       Wood:
          price: 0.35
    
       Obsidian:
          price: 5
    
       Gravel:
          price: 0.5
    LET IT BE SO!!!

    WurkIt v0.3 now with ItemCraft compatibility. It is definitely compatible but sorry dude I couldn't make it support ItemCraft mainly because I spent so long failing trying to get Itemcraft going on my client side. You must be some talent to get that shiz working because it was beyond me!

    So yeah not going to lie to you, I haven't tested this client side yet. But I was able to get it to load into my ItemCraft server with no problems and no errors at all but I wasn't able to actually log in and test it. I did contact the ItemCraft developer and I followed all the things he told me to do to get it to work so I am pretty sure that it will work for you no problems but give it a try, the worst that will happen is it still wont work properly in which case shoot us another message and I'll try harder to get an ItemCraft client up and running.

    One thing further, the reason that it didn't work was because Itemcraft doesn't currently support Long grass, dead bushes and trap door (all the blocks added in 1.6.6) which is why WurkIt was breaking. But in order to make WurkIt compatible with ItemCraft I had to take out WurkIt's ability to pay for those items. So I hope you didn't want to make anyone a Lawn mower in your server lol! WurkIt regenerates it WurkItItems.txt everytime it starts up now so if you flick between an ItemCraft and a non ItemCraft server and you aren't sure what is supported anymore just check that file for all the items you can use.

    I hope you enjoy the new version. Thanks again for the support!

    Cheers
    Oz

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

    Oscarfzs

    It works perfectly now, thanks!
     
  13. Offline

    SynMonger

    I'm getting lots of the errors below:

    Code:
    [SEVERE] Could not pass event PLAYER_INTERACT to WurkIt
    java.lang.NullPointerException
    at me.ozrevulsion.WurkIt.WurkItPlayerListener.onPlayerInteract(WurkItPlayerListener.java:21)
    at org.bukkit.plugin.java.JavaPluginLoader$10.execute(JavaPluginLoader.java:306)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:310)
    at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:166)
    at net.minecraft.server.ItemInWorldManager.dig(ItemInWorldManager.java:63)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:453)
    at net.minecraft.server.Packet14BlockDig.a(SourceFile:42)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    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:399)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:309)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    
    Code:
    [SEVERE] Could not pass event PLAYER_LOGIN to WurkIt
    java.lang.NullPointerException
    	at me.ozrevulsion.WurkIt.WurkItPlayerListener.onPlayerLogin(WurkItPlayerListener.java:45)
    	at org.bukkit.plugin.java.JavaPluginLoader$12.execute(JavaPluginLoader.java:320)
    	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:310)
    	at net.minecraft.server.ServerConfigurationManager.a(ServerConfigurationManager.java:186)
    	at net.minecraft.server.NetLoginHandler.b(NetLoginHandler.java:82)
    	at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:33)
    	at net.minecraft.server.NetworkListenThread.a(SourceFile:91)
    	at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:399)
    	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:309)
    	at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    


    Checked on the formatting in WurkItConfig.yml, and it looks OK. Any idea if there are any plugins that conflict with this one?
     
  14. Offline

    oz_revulsion

    Hmmm yes....[JediMindTrick] You are getting no errors with my plugin [/JediMindTrick]

    Don't look at me like that! Ok, ok the force is strong in this one.

    Can you post your config please?

    Cheers
    Oz
     
  15. Offline

    SynMonger

    Pasting the config into the forums wouldn't keep the formatting, so I used pastebin:

    http://pastebin.com/e8wQqEpK
     
  16. Offline

    oz_revulsion

    Thanks for the config. I dropped it into my testbed and it worked fine so you may be right it may be a conflict with another of your plugins. Can you please post the active plugins on your server and I'll try and investigate which one might be causing the conflict. Also may I ask your Bukkit, MC and WurkIt versions? Hopefully I can get to the bottom of this for you!

    Cheers
    Oz
     
  17. Offline

    SynMonger

    I think I found the problem. I'm using Essentials which in turn uses GroupManager, which is Permissions 2.7.2 compatible. Several of my plugins also don't support Permissions 3.x yet so I haven't been able to upgrade.

    Mystery solved for now I think.
     
  18. Offline

    oz_revulsion

    Ok, cool man. You probably wont want to do this just for WurkIt but in my experience I prefer commandbook to essentials. The reason being is that Essentials tries to be a jack of all trade but ends up being a master at none. The commands it provides are amazing, no doubt I loved them. But any time you wanted to provide functionality outside of essentials that essentials already provided I had problems. Essentials as you say hates permissions, warping can also be a problem and economy as well. When I was using Essentials I had all these problems at one point or another, eventually I had enough.

    I am now using commandbook, MyWarp, MyHome, Permissions and iConomy and I couldn't be happier. Sure I can't make a bigtree any more but things all work harmoniously and best bit is even if something does go wrong I have multiple points of failure so for e.g. at the moment I beleive MyWarp is inactive but even if it stops working I can just drop another warps plugin in and I'm good to go. Like I said you might not think its worth it just for WurkIt but might be worth the change for any plugin you plan to install going forward. Food for thought anyway.

    Cheers
    Oz
     
  19. Offline

    KuroSnow

    Oz, this plugin looks really cool, but I'd like to ask two questions: Does it support paying for killing mobs, and does it support BOSEconomy? =)
     
  20. Offline

    oz_revulsion

    No neither BOSEconomy or mob killing prices are currently supported. You will notice though that I have built in both of these into my future release plans. I suspect BOSEconomy support will probably appear in the next version.

    Cheers
    Oz
     
  21. Offline

    KuroSnow

    Sounds good. Not worried about mob prices cause I found mob bounty now. =) But still, this will be a very likely implementation.
     
  22. Offline

    derHirte

    Hi there.

    First of all, thanks for the plugin. I really like it!

    Problems:
    Sometimes i have the problem that WurkIt stops working properly. The players on my server won't get money from time to time. After a reload via the console command its running again.
    There is no error-message displayed on the server console.
    I update it to Version 0.3 tonight. Maybe it won't happen again.
    I'll let you know.


    Suggestions:
    I read a post on this thread that someone was asking to get money for placing items.
    You explained that you can't do that because of the farming problem. People could set and replace blocks all the time.
    My suggestion would be:

    one job during one session

    e.g.:
    Let's say the duration of one session is 3600 seconds.
    After the session the normal message comes up:

    "Payday, you earned 20.00 $ today"

    After that the player can choose his job. Something like

    "You are currently employed as Miner. Do you want to change your Job"
    Users answers: "/Job Builder"

    WurkIT:
    "You are currently employed as Builder"

    The user will only get money for placing blocks.
    You can't switch jobs during sessions.

    Maybe that could be a possible solution. It would be really cool to have such a feature. Unfortunately i'm not a good java programmer... so i don't know how much efford it would take to implement such a feature.

    Request:
    Could you add something like a Tax-System?
    Since you are working hand in hand with the iConomy plugin I think it wouldn't be too hard.
    e.g.: After one Session

    "Payday, you earned 20.00 $ today"
    "TAXES: 5 $ of your money will go into the CityBankAccount. Thank You."

    Maybe you could make a percentage of the Tax. Adjustable in the config. The collected money will be transferred to a specific account. That would be AWESOME!!!

    That's all for today.

    Keep up the good work!

    Thanks, Michael
     
  23. Offline

    oz_revulsion

    Hey Bud

    Thanks for choosing WurkIt! I have answered each of your questions below.

    Hmm this is not great. I have had this report once before but the other person was quick to uninstall before we got to the bottom of it. If I could give you the same questions as I gave them if you are able to answer them for me then I will hopefully be able to resolve this issue for you.

    Your idea for the session based jobs is a very good one I must say, but I didn't actually say that the block placing functionality couldn't be built. In actual fact I said the exact opposite. I said that the logic had largely already been built it was just that I needed to optimize my code because when I built it I was stupid hungover and didn't do it in the fastest possible way. Once I have optimized the code so that it is speedier I will put in block placement. Here is what I said about it:

    Another great idea Micheal! Did you know, however, that iConomy can already do this? Take a look at this part of the config:

    Code:
    Amount:
                Cutoff: 0.0                               # Amount limit to be met until we stop giving interest. (0.0 for no limit)
                On: 'Players'                             # Banks or Players
                Percent: 0.0                              # Percent of holdings to give / take (Negative to take) (Overrides Min/Max)
                Maximum: 1                                # (Range) Maximum amount for random in between. (Make Max/Min equal for a flat-rate amount ie: 5/5)
                Minimum: 2                                # (Range) Minimum amount for random in between.
    As you can see if you make the Percent negative then you can charge your players interest instead of giving them interest!

    Thanks man! I look forward to hearing if v0.3 has fixed your problems. If not then the answers to my questions above should point us in the right direction.

    Cheers
    Oz
     
  24. Offline

    derHirte

    Hi there.

    Here is the config-file you asked for:

    Code:
    # The pricelist is what you pay the player for breaking certain blocks
    # default is what the player is paid if you don't specify how much a certain block is
    # For example if you only have Stone and default setup in your price list then your players
    # will get your set price everytime they break stone and if they break any other block they will get your default price
    # default is mandatory and must be in the config, if you do not want to use it then set it to zero but
    # if you remove it you will crash the plugin.
    # The format is:
    # <item_name>:
    #      price: 0.0
    # the item names can be found in the items WurkItItems.txt in the plugin folder but generally
    # it is just the grammatically correct item name so stone is "Stone"
    # all spaces are replaced with _'s and word after also starts with a capital so cobbelstone stairs is Cobblestone_Stairs
    # if you are unsure check the WurkItItems.txt but to use an item it must be written in the config exactly as it is
    # in the WurkItItems.txt and it is case-sensitive so if in your config you do this
    # sToNe:
    #    price: 3.0
    # it's not going to work and your stone will just get the default value. It must be "Stone"
    
    PriceList:
       default:
          price: 0.01
       Dirt:
          price: 0.01
       Sand:
          price: 0.01
       Gravel:
          price: 0.01
       Stone:
          price: 0.02
       Obsidian:
          price: 0.25
       Log:
          price: 0.03
       Sugar_Cane_Block:
          price: 0.01
       Wooden_Pressure_Plate:
          price: 0.01
       Jukebox:
          price: 0.01
       Wall_Sign:
          price: 0.01
       Soil:
          price: 0.01
       Iron_Ore:
          price: 0.02
       Step:
          price: 0.01
       Netherrack:
          price: 0.01
       Wooden_Door:
          price: 0.01
       Detector_Rail:
          price: 0.01
       Ladder:
          price: 0.01
       Lapis_Ore:
          price: 0.01
       Dispenser:
          price: 0.01
       Wooden_Stairs:
          price: 0.01
       Jack_O_Latern:
          price: 0.01
       Rails:
          price: 0.02
       Wool:
          price: 0.01
       Work_Bench:
          price: 0.01
       Snow:
          price: 0.01
       Cobblestone_Stairs:
          price: 0.01
       Brown_Mushroom:
          price: 0.01
       Wood:
          price: 0.01
       Soul_Sand:
          price: 0.01
       Furnace:
          price: 0.01
       Mossy_Cobblestone:
          price: 0.01
       Stone_Button:
          price: 0.01
       Powered_Rail:
          price: 0.01
       Torch:
          price: 0.01
       Pumpkin:
          price: 0.01
       Bed:
          price: 0.01
       Cobblestone:
          price: 0.01
       Web:
          price: 0.01
       Trap_Door:
          price: 0.01
       Redstone_Wire:
          price: 0.01
       Iron_Door:
          price: 0.01
       Cactus:
          price: 0.01
       Clay:
          price: 0.01
       Fence:
          price: 0.01
       Sandstone:
          price: 0.01
       Glass:
          price: 0.02
       Yellow_Flower:
          price: 0.01
       Lever:
          price: 0.01
       Red_Rose:
          price: 0.02
       Brick:
          price: 0.01
       Gold_Ore:
          price: 0.01
       Diamond_Ore:
          price: 0.01
       Salpling:
          price: 0.01
       Double_Step:
          price: 0.01
       Bookshelf:
          price: 0.15
       Glowstone:
          price: 0.01
       Ice:
          price: 0.01
       Redstone_Ore:
          price: 0.01
       Coal_Ore:
          price: 0.01
       Red_Mushroom:
          price: 0.01
    
    # Set your message in the message field. Use the text $$ where you want to put your amount
    # your currency units are automatically picked up. Coloured messages are currently not supported
    # set enabled to false if you do not want to get the payday messages sent to your players.
    
    PaydayMessage:
       message: "Zahltag! Du hast heute verdient: $$"
       enabled: true
    
    # The PaydayInterval is how often your players get paid and it is in second. Only put integers (whole numbers) in here
    # the placed buffer size dictates how many blocks are recorded as being placed and thus have no value if broken at any one time
    # now this placed buffer lives in memory on your server so if you don't want to pwn your server I suggest you keep this modest
    # at a guess I'd say 500 is reasonable for most servers without causing too much trouble but if you find you are getting
    # performance issues after installing this plugin then I'd say reduce the buffer size
    # by default the buffer runs a moving window so when it hits the max size the first entry is deleted to make room for the last one
    # the buffer is cleared by default whenever there is a payday but if you want to keep your rolling window constant then change
    # your clearBufferOnPayday value to false. Its true by default to give your poor server memory a break from time to time
    # rather than being at max capacity all the time but if you think your server can hack it then you can set it there
    
    PaydayInterval:
       interval: 360
       placedBufferSize: 500
       clearBufferOnPayday: true
    
    If I type in /plugins, WurkIt is always available.
    if I write /WurkIT, it respondes all the time with the possible actions. Like "/wurkit -reload //Will reload the plugin"
    Me and my mates are playing in one world but far away from each other. So i'm sure that i'm not breaking blocks one of my mates has placed during one pay day.

    I observed it is not working. I wouldn't say it stopped/crashed. I mean it answers me all the time.
    I was mining for an hour and the first paydays where given as usual but then nothing happend.
    My mates told me the same thing. After the "/wurkit -reload" everything went good, again.

    It happens from time to time, not very often though.


    Thanks for that hint. I didn't know that.
    I think the problem with this one is, everytime a play will gain money, e.g. for a trade, he has to pay taxes. I don't want that to happen. It would be great if they only have to pay taxes when they are working.

    I'm also using the citizens-mod so that players can trade their dirt and cobblestone for money. I don't want them to lose money evertime they sell their stuff.

    So it would be awesome if you could implement a tax-system bases on you payday.

    I hope the informations are usefull.

    Thanks,

    Michael
     
  25. Offline

    oz_revulsion

    Hey fella

    Yeah the config file you posted looks fine. I will drop it into my testbed tonight just to make sure but I can't see anything wrong with it from just looking at it.

    That is really weird. So you haven't got any errors in your server logs you say? What version of Bukkit and MC are you on? What other plugins do you have installed on your server? I'll see if I can replicate the problem on my testbed. At this point I'm beginning to think there may be something going funny with the Bukkit scheduler on some servers I may alter how the payday triggers are fired in future versions to try and combat this problem.

    That setting I showed you wont affect your other transactions it will simply charge your players a tax on the interval you set it to. In any case I know understand what you mean. You want sort of an income tax type system. That would be pretty cool I must admit. I have added to my list of future plans.

    Cheer
    Oz
     
  26. Offline

    derHirte

    Hi there.

    There are no errors in the server logs.

    Bukkit: Build: 860 (MC: 1.6.6)

    Mods:
    motd v1.0
    HTML:
    http://forums.bukkit.org/threads/admn-gen-tp-info-motd-v1-0-greeting-teleport-request-time-vote-ip-wholist-860-permissions.8359/
    iConomy 5.0.1
    HTML:
    http://forums.bukkit.org/threads/econ-iconomy-5-0-1-eruanna-845.40/
    Permissions 3.1.5b
    HTML:
    http://forums.bukkit.org/threads/admn-dev-permissions-3-1-5b-the-plugin-of-tomorrow-818.18430/
    Citizens v1.0.8h
    HTML:
    http://forums.bukkit.org/threads/mech-citizens-v1-0-8h-npcs-for-bukkit-1-6-compatible-860.7173/
    and yours of course :)

    I thought that maybe the servercommand: "/time set 0" which I use a lot, could be the problem.
    My mates can use the "motd"-plugin to change the daytime. With "/vTime day" you will get the same effect as the "/time set 0" command.

    Well, I don't know how it affects the actual server-time or the time your plugin uses. But that could be a possible reason.

    Yeay, I can't wait for it :)

    Cheers,
    Michael
     
  27. Offline

    oz_revulsion

    Hmm, maybe. Leave it with me and I'm gonna set up my testbed like your server and see if I can break it. I let you know how I go, for now I guess the reload every now and again will have to be your resolution until I am able to find the problem. Sorry dude, I'll be as quick as I can.

    Cheers
    Oz

    [UPDATE]

    Hey dude

    Right so I have set my server to have the same plugins as you. I took your config and the only change I made was I made the payday interval 5 seconds. Then I played for about 20 minutes and it didn't miss a single payday. I then set the time to a different time every minute for the next ten minutes and I still couldn't get this to break. I even tried changing the the timeout to 30 seconds, breaking some blocks and then going to sleep. When I woke up I got paid no worries. I'm suggesting this isn't happening to you but I have no idea how your doing it because I have tried my butt off to break it and I can't.

    When you aren't getting paid is it that all your players aren't getting paid or is it that one or two players aren't getting paid? Also I'm not sure if this is completely obvious but I have to say it because this is completely baffling me. Did you know that if you don't break any blocks for an entire payday then you wont see the payday message at all? I'm wondering if you or your players might be taking a break to build something and haven't broken anything for a whole payday and thus not seeing the message for one payday and in your case this would mean that you wouldn't see a payday for 12 minutes!

    If you can use /wurkit and /wurkit -reload and the rest of the commands work then the plugin is still clearly active and I haven't programmed the plugin to stop working so there are only three possible options at this point:

    1. You have not broken a block in the entire payday or maybe you accidentally got disconnected just before a paid and thus your income was wiped.
    2. The bukkit scheduler has some sort of bug in it and it looses the recurring jobs at intervals.
    3. There is actually something wrong with the plugin and I'm just not seeing it.

    Now 1 can happen and I think it would be worth you monitoring this is you do think that the plugin has gone down. 2 could happen but I think is unlikely as I'm not the plugin to use the plugin scheduler and it seems I'm the only one suffering the problem. In any case there is another way that I can program this which could be more reliable so in the next version I will program this in. I think the third one is highly unlikely at this point given that I have done extensive testing using your configuration and on top of that I have now had this running on my own live (and very active) server for over a week now with no issues at all.

    In any case hopefully the new version will fix your issue because it was v0.3 I did my tests with and in any case I reprogram the way I use the scheduler for the next version to try and resolve these issues.

    Thanks for the bug report and I hope the problems aren't too large for you to be discouraged from continuing to use my plugin. On a side note Citizens if awesome eh?! I have seen it a number of times but never seen it on a server. I thought it was really cool!

    Stay cool mi amigo!
    Oz
     
  28. Offline

    derHirte

    Hi there.

    of course!

    The problem occured a few minutes ago.
    We are 5 people playing on the server. So it happens very often that the server is empty.
    My friend and i disconnected to have a game of Battlefield. After we connected we went on mining for half an hour in two different mines. None of us got the payday. Both of us were removing generated levelblocks. (i hope you understand what i mean)

    Again, the wurkit plugin was still responding to the normal "/wurkit" command.

    I believe you and after all it's not the end of the world. Since you can fix it with the /wurkit -reload command it is not a big deal.

    Of course not.

    I have to agree with you. With the iConomy and the WurkIt plugin its AWESOME. You get paid for your work, you can sell the useless dirt and buy different tools with that money.
    Maybe this will give you a better point of view with the request of the tax system. So you would only have to pay taxes when you work. That would be really cool.

    I will keep an eye on the server, especially on the weekend. If i can find anything that could cause that problem, I'll let you know.

    Have a good one,

    cheers
    Michael
     
  29. Offline

    oz_revulsion

    Hmm I just downgraded to v0.2 on my testbed because v0.3 has some new log in things programmed in so I thought it might have been that. I left the server running for an hour while I played APB and came back, logged on and no problems at all. I just seriously don't know what could be causing this for you. You need to try and work out a pattern for when this happens so I can try and get this to happen on my server and try fix it. As it stands there is a lot (...a lot) of people who have this plugin installed without getting the randomly turning off problem so there has to be something about the way your server is setup causing this we just have to figure out what. I started writing v0.4 tonight so hopefully in the next couple of weeks I can put that out with the new way of doing the scheduler and that might fix your issue. In the meantime just keep an eye on it and see if you can find a pattern I might be able to try out.

    Cheers
    Oz
     
  30. Offline

    derHirte

    Hi there.

    Yep, i'll do.

    As I said, it's not a big deal.
    Since it can be fixed so easy and I am almost alone with this problem, you should't put so much effort in this. (I really appreciate it) Use the time to develop v0.4. Can't wait for this one.

    Thanks a lot.

    Cheers
    Michael
     
  31. Offline

    oz_revulsion

    It's cool mate I'll build it in, it wont break the people it already works for it will just help people like yourself who are having problems (hopefully). I'm an admin too so I know how frustrating it is when developer give's us on your problem without even trying. I know its only you getting the problem but if there is one that is enough for me to at least try and do something. I'll let you know how I go.

    Cheers
    Oz
     

Share This Page