
When a player breaks a block, if the block broken is found in a list defined in the configuration file, it will run through each reward. The rewards work in the way that if a random number falls in a certain percentage, then a list of commands will be run.

- Unlimited rewards: You may define as many rewards in the config as you want, and you may name them whatever you like, as of version 1.2. You can also define multiple reward sections so you can have multiple block lists.
- The Multiplier: The Multiplier, either a whole number or a decimal number, multiplies the chance of getting each reward by its value. For example, if the config said that a player has a 25% chance of getting $300, and the multiplier is 3, then the player will have a 75% chance of getting $300, or if the config gives the player a 50% chance of getting $50, but the multiplier is set to 0.1, then the player has a 5% chance of getting $50. The multiplier is set by default to 1, so the chances of getting rewards are not affected. Please don't set this to 0 to disable it!! Instead of disabling the multiplier, it will disable all rewards because all chances will be multiplied by 0, meaning everything has a 0% chance of a reward! Simply set it to 1 to disable it.
- Player name placeholder: Anytime "%player%" is found in a command to run, it will replace "%player%" with the name of the player that broke the block.
- In-game setup: Most options in the configuration can be modified in-game, no configuration editing required! You can choose command-style or GUI-style!

Here's how to get started with CMR:
1. In-game, run /cmr gui to open the CMR GUI configuration menu. Here you can see each reward "group" and some global settings, including global reward chance modifier and world restrictions.
2. Click on an existing "group" (of rewards) or create a new one by clicking the emerald block. The rewards in a reward group share a list of blocks they can be activated by. They can also share other settings, such as world restrictions.
3. Click on the grass block to change the list of blocks that trigger the rewards. Clicking on a block in your inventory adds it to the list. Clicking a block in the list deletes it. When you're done, click back.
3. Click on an existing "reward" (list of commands) or create a new one by clicking the emerald block. Each reward has a list of commands that's executed when the reward is triggered. Each reward also has a certain chance of executing each time the player breaks a block. You can use some basic math to figure out (on average) how frequently a reward will be triggered. If the reward chance is 20%, it will trigger every five blocks on average. (100 / 20 = 5).
4. In this menu, you can left-click an existing command to add a command after it, or right-click a command to delete it from the list. The commands are always triggered in order. To refer to the player who triggered the reward, use %player%.
And you're done! Be sure to delete the example rewards if you don't want them.

In my opinion, the command list and information looks much nicer in-game, but it is also slightly less detailed in-game.
Important commands:
/cmr: Gives plugin information.
/cmr help: Gives a list of sub-commands for the command /cmr.
/cmr reload: Reloads the multiplier, the list of blocks that trigger the rewards, and the rewards themselves and their properties (the chance of getting the reward and the commands to run upon triggering).
/cmr gui [player]: Opens the CMR configuration GUI. If a player is specified, you can attach to their editing session where you effectively have the same permissions they do while in the GUI, and you can click on things for them.
/cmr debug: If you're experiencing an issue, run this command to enable debug mode and debug logging. The console will receive a huge amount of information whenever CMR is working, which should help you troubleshoot. If you need additional help, you can find a log containing all the debug info at <server root>/plugins/CommandMineRewards/debug.log. Debug mode is automatically disabled when the server restarts.
Configuration commands
/cmr multiplier [multiplier]: Reads or updates the multiplier value. The multiplier may be either an integer or a decimal number.
/cmr block add <rewardSection> [block]: Adds a block to the list of reward-triggering blocks. You can use it either by specifying the name of the block you want to add, or just by holding it in your hand. Similarly...
/cmr block remove <rewardSection> [block]: This removes a block from the list in the same manner as /cmr block add.
/cmr block list <rewardSection>: Lists all the blocks that trigger rewards in a nice, readable format. Make sure you have no duplicate blocks in your block lists, or this will yell at you, and for good reason. The plugin may act unexpectedly in the presence of duplicate blocks.
/cmr reward add <rewardSection> [reward_name]: Create a new reward or a new reward section if no reward is specified.
/cmr reward remove <rewardSection> [reward_name]: Delete a reward or reward section. If reward name is not specified, it will delete the whole reward section so be careful with this one!
/cmr reward list [rewardSection]: Lists all reward sections defined. If used with a reward section parameter, it lists all rewards in that reward section.
/cmr command add <rewardSection> <reward_name> <command>: Add a command to a reward by just specifying the reward name, the reward section, and the command. The command can have spaces for args, and %player% to represent the name of the player who triggered it.
/cmr command insert <rewardSection> <reward_name> <insert_position> <command>: Insert a command at a specified position, meaning that the new command will have insert_position as its new ID, shifting all the ones below it down in ID. This is just in case the commands need to run in a specific order.
/cmr command replace <rewardSection> <reward_name> <index> <command>: Similar to /cmr command insert, but instead of shifting the commands it replaces the one at the specified index. Useful if there was a typo in the command you just /cmr command add-ed.
/cmr command remove <rewardSection> <reward_name> <command_ID>: Remove a command from the specified reward in the specified reward section. You can use the command ID to remove a command or the command itself if you are very precise and case sensitive. You can get the ID of a command with this next command...
/cmr command list <rewardSection> <reward_name>: Shows all commands attached to a reward and their IDs to use in /cmr command remove and /cmr command insert
/cmr world add [world] [rewardSection]: Adds a world to the list of allowed worlds in a reward section, or if no reward section specified, adds the world to the default, or global, allowed worlds list. The config option validateWorldsAndRegions will determine whether it will check to see if the world you typed in was actually valid. If no world is specified, adds the world you are in.
/cmr world remove [world] [rewardSection]: Pretty much the same as /cmr world add, except this command removes a world from a list. If no world is specified, uses the world you are in.
/cmr world list [rewardSection]: Lists the allowed worlds in a reward section, or the default/global allowed worlds list if no reward section specified.
/cmr region add <region> [rewardSection]: Same as /cmr world add except using regions instead of worlds.
/cmr region remove <region> [rewardSection]: Same as /cmr world remove except using regions instead of worlds.
/cmr region list [rewardSection]: Same as /cmr world list except using regions instead of worlds.
/cmr reward chance <rewardSection> <reward> [chance]: Changes or views the chance of a reward occurring.

Important permissions:
- cmr.use.<rewardSection>.<reward>: Allows players to receive rewards from the reward called <reward> in the section called <rewardSection> in the config file.
- cmr.use.*: Allows players to get rewards from all rewards defined in the CMR config. You'll probably want to add this to all users, but it isn't a default permission.
- cmr.reload: Allows the user to reload the CMR config.
- cmr.debug: Allows the user to enable CMR debug mode. See /cmr debug in command info.
- cmr.gui: Allows the user to open a new CMR GUI session for themselves. Anything they do in the GUI is restricted by what configuration permissions they have (see below).
- cmr.gui.assist: Allows the user to attach to another player's GUI session. See /cmr gui in command info.
Configuration permissions
- cmr.block: Allows you to see the list of blocks. Potentially handy for the average user to see how to be rewarded.
- cmr.block.modify: Allows the user to add and remove blocks with /cmr addblock and /cmr removeblock.
- cmr.reward: Allows you to see the list of reward names. Not useful for the regular user.
- cmr.reward.modify: Allows the user to add and delete rewards using /cmr reward add and /cmr reward remove, as well as editing the chance of reward occurring with /cmr reward chance.
- cmr.command: Lets you see what commands are used when you receive a reward. Could be handy to let the user admire the prize.
- cmr.command.modify: Allows the user to add, insert, and delete commands used in any reward. I'm sure you can figure out which commands you need to do that.
- cmr.multiplier: Allows you to see the current multiplier value.
All of the above permissions default to OP only.
- cmr.multiplier.modify: Allows the user to change the multiplier setting.
- cmr.world: Allows you to see the list of worlds, both in reward sections and globally.
- cmr.world.modify: Allows you to modify the list of worlds, both in reward sections and globally.
- cmr.region: Allows you to view the list of regions, both in reward sections and globally.
- cmr.region.modify: Allows you to modify the list of regions, both in reward sections and globally.
- cmr.silktouchpolicy: Allows you to see whether silk touch is required or disallowed from triggering a reward, section, or globally.
- cmr.silktouchpolicy.modify: Allows you to change the policy on silk touch triggering rewards, sections, or globally.

Default config
# globalAllowedWorlds: string list: a list of worlds all rewards will operate in. Is overridden by allowedWorlds in a reward section. Defaults to "*", meaning all worlds allowed.
globalAllowedWorlds:
- "*"
# globalAllowedRegions: string list: same as globalAllowedWorlds except with WorldGuard regions instead of worlds.
globalAllowedRegions:
- "*"
# globalSilkTouch: string, can be REQUIRED, IGNORED, or DISALLOWED: The global setting on whether silk touch is required, disallowed, or ignored to receive rewards. Is overrided by silkTouch in a reward section or reward. Defaults to IGNORED.
globalSilkTouch: IGNORED
# removeInvalidValues: boolean: If true, will delete invalid blocks in the lists of blocks.
removeInvalidValues: false
# survivalOnly: boolean: If the reward should only be enabled when the player is in survival mode.
survivalOnly: true
# boolean: will prevent you from using invalid worlds and WorldGuard regions in their associated commands
validateWorldsAndRegions: true
# verbosity: number (0, 1, or 2) (default 1): How verbose console messages should be. 0 for only errors, 1 for errors and executed commands, 2 for a metric ton of logging detail. (probably don't use 2 in production.)
# Please note that even with verbosity: 0 you will still receive command output in console. ex. if you have in a reward /give %player% diamond, you will still receive the message "Gave 1 [Diamond] to %player%" every time it runs,
# and there is no way to prevent this that I'm aware of. If you figure it out, please let me know.
verbosity: 1
# autopickupCompat: boolean (true or false): If true, will grab the broken block type at a lower priority than normal to allow compatibility with plugins such as auto pickup plugins. This setting should be disabled unless required as it may add a bit of overhead
autopickupCompat: false
# randomizeRewardOrder: boolean (true or false): If true, will randomize the order rewards are evaluated in, so it isn't weighted toward the first reward in the list. This usually only matters if you are using any sort of reward limit.
randomizeRewardOrder: false
# mcMMOHookEnabled: boolean (true or false): If true, will only allow rewards to be issued from blocks not placed by players, as determined by mcMMO. (Requires mcMMO to be installed obviously)
mcMMOHookEnabled: falseremoveInvalidValues: Type: true/false. Default: false. When CommandMineRewards starts up, it will check the block list in each reward section for invalid blocks. If this is true, it will remove them from the list for you. If this is false, it will just ignore them.
multiplier: Type: number. Default: 1. Changes the reward chance multiplier, just like the in-game multiplier command. 0 is no rewards, 1 is normal, 2 is double chance, etc.
survivalOnly: Type: true/false. Default: true. If this is true, it will not allow creative players to get rewards. If, for some reason, you want creative players to participate too, change this to false.
validateWorldsAndRegions: Type: true/false. Default: true. If this is true, it will make sure worlds and regions actually exist before you add them with /cmr addregion and /cmr addworld.
verbosity: Type: number. Default: 1. If this is 0, CommandMineRewards will only log errors, nothing more. If this is 1, CMR will log errors and the commands it executes when it executes them. If this is 2, CMR will log EVERYTHING. This includes EVERYTHING that happens, EVERYTHING that doesn't happen and why, and just basically spams the console a lot. This is useful for if you're having a problem related to not issuing rewards and you need help from me.
autoPickupCompat: Type: true/false. Default: false. If this is true, enables some special trickery to play nicer with auto-pickup plugins.
mcMMOHookEnabled: Type: true/false. Default: false. If this is true, CMR will hook mcMMO and issue no rewards for broken blocks that are marked as being placed by players.
Reward section structure (for rewards.yml):
rewardSection:
blocks:
- block1
- block2
- block3
allowedWorlds:
- world
- world_nether
- world_the_end
allowedRegions:
- mine
- yours
silkTouch: DISALLOWED
rewardLimit: 1
rewards:
rewardA:
chance: 5
commands:
- eco give %player% 200
- broadcast %player% received rewards
rewardB:
chance: 20
commands:
- give %player% diamond 1
- !msg %player% &aGood job!Similar projects
Plugin →Let Me Despawn
Improves performance by tweaking mob despawn rules. Say bye to pesky unintentional persistent mobs.
26.2MSueta
JourneyMap
Real-time map used for mapping in-game or your browser as you explore.
14.7MSueta
Emotecraft
Create your own emotes in Minecraft.
7.9MSueta
Simple Tpa
A simple tpa plugin which sends requests
5.4MSueta
Common Network
Forge and Fabric Unified Networking Solution
4.7MSueta
Set Home
A lightweight plugin for players to set their homes.
3.8MSueta