InstallConfig
Installation and configuration
Dependencies
This plugin needs Vault installed.
Installation
- Download the latest version
- Copy to your plugins/ folder
- Restart your server
- Edit the plugins/GB.Rewarder/config.yml file to setup the plugin
- Perform a /gbrewarder reloadconfig when done
Configuration
A rundown of things you can control through the config.yml file
config.monitorMinedBlocksCount
This sets how many blocks should be saved in the player-placed blocks history.
If the player mines a block he has placed himself, and it is in his history, there is no payout.
Set to 0 to disable, and pay the user for every block, regardless if that block was placed by himself
config.playerMonitorTimeout
Number of seconds the server should keep the players minedBlocks history/income in memory after a disconnect.
This is to avoid people placing blocks, disconnecting, reconnecting and then mining them again
Default is 300 seconds, 5 minutes, minimum value is 60 seconds
config.incomeTracking
If enabled, tracks players incomes during sessions and over all time.
config.incomeAnnounceThreshold
If set to a value larger than 0, will make a server announcement every time a player has earned more than that amount.
Only useable if incomeTracking is enabled
config.trackBlockStats
If set, will create blockStats.txt in the plugins data folder, containing a CSV of blockid;amountmined.
This provides stats for your server, and can be used to tweak prices (Note, saves stats on all blocks, not just the one specified below)
Saves every 15 minutes, if blocks have been mined since last save
config.whitelist
Determines if world whitelisting of rewards is off, world or block.
off: Whitelisting is disabled, all defined rewards are awarded everywhere.
world: Rewards are only awarded in the worlds listed in config.whitelistedWorlds.
block: Rewards are only awarded if the world is listed in a blocks whitelistedWorlds.
config.whitelistedWorlds
A string list of worlds where rewards are enabled, this is used if config.whitelist is set to world.
Blocks / Place
The blocks and place section of the configuration sets up the payout value of individual blocktypes, when harvesting/mining (blocks) and placing (place). (Use the WiKi for reference)
If a block is not defined, nothing is paid if its worked on.
A block definition consists of an id, and a list of any / all of the following.
- id
- The ID of the blocktype, can be found via the aforementioned WiKi link. (Required)
- value
- The amount of money harvesting this blocktype pays. (Defaults to 0.0)
- payoutinterval
- If set, will pay value for every payoutinterval activities performed. (Defaults to 1)
- xpinterval
- If set, will reward xpintervalvalue xp for every xpinterval activities performed. (Defaults to 0, disabling xpinterval rewards, must be a whole number)
- xpintervalvalue
- if xpinterval is larger than or equal to 1, rewards xpintervalvalue xp for every xpinterval activities performed, (Defaults to 0, must be a whole number)
- xpchance
- If set, there vill be a xpchance% chance per activity of rewarding the player with xpchancevalue xp. (Defaults to 0.0, disabling xpchance rewards, xpchance must be between 0.0 > 100.0, both included)
- xpchancevalue
- If xpchance is larger than 0.0, this is the amount of xp rewarded if the die rolls in favour of the player.
- anypermission
- A string list of permissions, where the player needs at least one to get paid for the activity.
- allpermissions
- A string list of permissions, where the player needs all of them to get paid for the activity.
- whitelistedWorlds
- If config.whitelist is set to block, then this should be a list of worlds where this blocks reward is awarded. (If no whitelist is set, then the activity is not rewarded anywhere)
For instance, if you want to pay 0.5 money for every stone harvested, your blocks section would look like this:
blocks: '1': value: 0.5
And if you want to reward 1 XP for every 64 stones mined, on top of the 0.5, it would look like this:
blocks: '1': value: 0.5 xpinterval: 64 xpintervalvalue: 1
If you instead want a 7.5% chance of rewarding 2 XP for every stone mined, it would look like this:
blocks: '1': value: 0.5 xpchance: 7.5 xpchancevalue: 2
If you only want to pay for stone, if the player has either the imaginary permission job.miner or job.gatherer, it would look like this:
blocks: '1': value: 0.5 anypermission: - job.miner - job.gatherer
If you only want to reward stone mined in world, you set config.whitelist to block, and then
blocks: '1': value: 0.5 whitelistedWorlds: - world
Special ids
Setting up payment for other activities than harvesting blocks, require placement in different config containers, please refer to the special ids page for further information.
rewardStats.txt
If you enable config.trackBlockStats, a file called rewardStats.txt is generated in the plugin folder.
This file contains a simple list of ids;amount_harvested.
Sheep shearings has id 100000, mooshroom shearing has 100001, fishing has 100002 and please refer to the special ids page for mob ids, blaze has 200000, cavespider 200001 and so forth.
Permissions
GB.Rewarder currently has two permissions.
gbrewarder.user
Basic usage, this is set to true by default.
gbrewarder.admin
Administrator access, can reload config, and force a stats save.
Comments