Wurkit Bukkit Plugin: Pay your players iConomy money to play minecraft.
Level 30 : Artisan Ninja
Posted 06/18/11 5:05:56 pm
[ECON] WurkIt v1.0 - Let your players earn iConomyBOSEconomy money for playing Minecraft!! 
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 pseudo communist) economy.
Download the Jar there
Or the Zipped Jar here
- iconomy v5.0; or
- BOSEconomy v0.6.2
- Permissions v3.1.5
- ItemCraft v1.4.1
New Features in this version:
- BOSEconomy support now available! One thing to mention though is because BOSEconomy only supports adding whole numbers to bank accounts if you set a price to 0.1 for example the pay will always be rounded up. You can still set prices like 1.5 but and whilst the pay is totaling it will add up to the decimal the rounding only occurs on payday. So if some breaks 3 blocks valued at 1.5 they will get paid 5 dollars because 4.5 will get rounded up.
- New command priceset added. This allows an admin to set the price of a block in the config in game. Just type /priceset <newPrice> and then right click the block you want to set the price of. This will add the price to your price list or change the price of the block if its already in your config. Price set will not work for blocks that aren't in the WurkItItems.txt so ItemCraft blocks aren't supported and if you are running ItemCraft you wont be able to set the price of long grass, dead bushes or trapdoors.
- Added a debug mode for the payday. You can set debugType in the config file to either none, simple or verbose. Simple will just put a line in your server log every time the payday task fires. Verbose will do what simple does as well as tell you how much each player got paid. This will help any admins that are wondering if the payday task is still firing correctly.
- I have reprogrammed the way that WurkIt uses the Bukkit scheduler to address the problems reported with the payday task stopping for some reason. Now if the payday task falls out of the scheduler it is automatically put back in the scheduler when a block is placed or broken so WurkIt should automatically recover itself if it does happen to break.
- All sorts of optimizations and bug fixes that you can read about in the changelog.
- Permissions 3.1.5 support has been added. You can now dictate who has control over the new commands and who gets paid using the famous Permissions plugin. Of course if you don't have permissions then you can still use WurkIt, all players will have all commands and will get paid and only Ops are given permission to reload the wurkit config with /wurkit -reload.
- This plugin is now 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!
- Set a price for the blocks you want to and a default price for every other block your players may break. All blocks in 1.6.6 supported!
- 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. There is a placed buffer which keeps a rolling window of the blocks placed so once a block is placed 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
Simply place the jar in your plugins folder and reload your config. This will create the WurkIt.config and the WurkItItems.txt files in the WurkIt folder.
# 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:
# 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
# price: 3.0
# it's not going to work and your stone will just get the default value. It must be "Stone"
# 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.
message: "It's payday! You earned $$"
# 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
# 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
There is a lot of documentation within auto generated config file but let me re-iterate here.
The first section is:
This holds all the prices for the blocks that will be broken by your players. You have to put them in the format of:
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 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.
The placedBufferSize 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 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 500 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. 500 is more than enough to avoid farming because a player would have to place a block, then guess when the 500 blocks have been placed and then break it again. This functionality doesn't make farming impossible but it makes it impractical.
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.
- Shows help for wurkit and the version info
/wurkit - reload
- Reloads the configuration file.
- 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 it.
- 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.
- This command will change your WurkItConfig.yml and will set the price of the next block that you right click to <newPrice>. Obviously <newPrice> must be a number
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.
wurkit.admin.* - all admin commands
wurkit.admin.priceset - /priceset <newPrice>
wurkit.admin.reload - /wurkit -reload
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
- 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.
- Built in BOSEconomy support.
- Added debugging in the PaydayInterval settings
- Added the priceset function.
- Made Wurkit compatible with ItemCraft v1.4.1
- Made Wurkit support Permissions
- Added /pricecheck and /paydaymessage commands
- 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
- Initial build
- Build in functionality to be able to charge income tax and put this tax into a configured account
- Build in other features such as prices for placed blocks and mob prices.
- Currently the user has no ability to choose the colour of the payday message displayed to the player. This is a plan to be added.
If you have enjoyed my plugin and want to show your appreciation tips are accepted (but not neccessary) through this link!!!
Join us to post comments.