ResourceMadness - Competitive team-based resource gathering
Version: v0.1.3
Join a team and compete against your opponents in a match of resource gathering. The first team to gather all the requested items wins. For your victory you may even be rewarded.

Features:
 Create team-based matches of resource gathering
 Supports 2-4 teams with no player limit
 Support for persistent matches
 Support for time-based matches
 Sudden Death mode when there's no clear winner
 Integrated world/game/team chat
 Customizable settings
 Filter interface - fully control what items the players need to gather
 Reward interface - add a reward for the winning team to claim
 Tools interface - add tools for players to receive at match start
 Template creation - save your favorite filters
 As owner receive all items the players have gathered
 No item duplication (can be changed for reward/tools)
 No worrying about being online - claim your items/reward/tools whenever you want
 Restore all world changes the players made while playing
 Periodical autosave functionality
 Supports Permissions 3, PermissionsEx and BukkitPermissions (only P3 tested)
 And more!

This is the first public release so there are bound to be some bugs creeping inside.
BaioMolka, Reanu, soulriver123 and especially Zerocool87 - thanks for testing the plugin out pre-release.

Just extract the files into the bukkit plugin folder and you're set.
For up-to-date information, check out one of the following pages:
http://mtaye.tumblr.com
http://dev.bukkit.org/server-mods/resourcemadness/
http://forums.bukkit.org/threads/fun-resourcemadness-v0-1-1-competitive-team-based-resource-gathering-1060.36027/

Donate:
If you love this plugin as much as I love making it, please consider donating. Thanks!
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=D5ZDSPM7NU8GN

Screenshots:
http://www.flickr.com/photos/mtaye/6132225938/
http://www.flickr.com/photos/mtaye/6132227434/
http://www.flickr.com/photos/mtaye/6132227518/

Video:
Here's a quick tutorial where Zero and I setup a game and show how it works.
http://www.youtube.com/watch?v=K8dAweVaQjU

Quick guide:
How it usually works:
 Owner creates a game
 Owner sets the desired settings (Optional)
 Owner adds items to filter
 Owner adds items to reward (Optional)
 Owner adds items to tools (Optional)
 Players join teams
 Owner starts the game or players ready themselves (Auto start)
 Players claim tools (Optional)
 When a team wins, the game stops
 Players claim their items/reward (Optional)
 Owner claims game's found items (Optional)

Creating a game
A game rig is created by first creating the main column.
[stone] STONE
[glass] GLASS
[stone] STONE

Now you need to add the desired number of teams around the main column. Here's an example for two teams.
[wool][stone][wool] - WOOL - Each team must have a distinct wool color.
[sign][glass][sign] - WALL_SIGN - Each team needs a wall sign placed onto the glass block.
[chest][stone][chest] - CHEST - A team also needs a chest. Only single chests are supported.

Currently there's a minimum of two teams necessary to create a game and you can have a maximum of four teams.

Finally, to create a game type /rm add. You will be prompted to hit a block that is part of your game rig. Congratulations! You have created your first game.

Get item info
If there are more than 50 items to search for, the items are written using id's instead of bukkit material names. Typing /rm item [material/id] will let you know the item id of a material or the material of an item id.
/rm item dirt,sapling,glass - Result: 3:dirt, 6:sapling, 20:glass
/rm item glass sapling dirt - Result: 3:dirt, 6:sapling, 20:glass
/rm item 1-5 - Result: 1:stone, 2:grass, 3:dirt, 4:cobblestone, 5:wood
/rm item lava - Result: 10:lava, 11:stationary_lava, 327:lava_bucket

Check game info
To check out the current game info, Left-click a wool block or use the command /rm [id] info [page].

Interface modes
There are three interface modes - FILTER, REWARD and TOOLS. You can cycle through them by sneak+left clicking a sign or using the command /rm mode filter/reward/tools.

Check filter info
Change the interface mode to filter. Left-click a wall sign to check out the filter info.

Add items to filter/Remove items from filter
Now you can set which items the players will have to gather to win. You can achieve this in one of three ways.

1. Change the interface mode to filter. Left click - Put items into game chests and hit a chest. All items from all chests will be put into filter. If all chest are empty while left-clicking one, you will be prompted to clear the filter.
2. Change the interface mode to filter. Put items into a chest and hit it while holding the sneak button. Each left-click will add those items to the filter by the amount in the chest.
Holding sneak and right-clicking the chest will subtract those items from the filter by the amount in the chest.
If the chest is empty you will add (left-click) or subtract (right-click) the item you're holding by an amount of 1.
3.The command /rm [id] filter [material/id]/all/block/item:[amount:stack] allows you to get more control about the items you want to filter. It sets the filter items to the amount you specify.
/rm filter 1,3,4:10 - This will set each of the filtered items 1(stone),3(dirt) and 4(cobblestone) to the amount of 10.
/rm filter 1 3 4:10 - This will set each of the filtered items 1(stone) and 3(dirt) to the amount of 1, and 4(cobblestone) to the amount of 10.

These two are the exact same as above, only using bukkit material names.
/rm filter stone,dirt,cobblestone:10
/rm filter stone dirt cobblestone:10

You can also use dashes.
/rm filter 1-10,20-40:10 - This will set each of the items 1-20 and 20-40 to the amount of 10.
/rm filter 1-10:10 20-40:stack - This will set each of the items 1-10 to the amount of 10 and each of the items 20-40 to the amount of it's max stack value.

Dashes can also be used to assign a random value for the amount of items.
/rm filter 1,3-5:10-100 - This will set each of the items 1(stone),3(dirt),4(cobblestone) and 5(wood) to the amount of 10-100. What this means is that these items will get a random amount from 10-100 each match.

If you want to add items to those already in the filter, you can use the /rm filter add command. The difference between /rm filter and /rm filter add is that the first one sets the items to the amount specified, while the latter one adds them.
/rm filter add 40-50,3,5,6:60 - This will add to each of the items 40-60 and 3,5 and 6 an amount of 60.
/rm filter add 2-5:20 20,40:stack - This will add to each of the items 2-5 an amount of 20 and to the items 20 and 40 an amount of it's max stack value.

If you just want to modify the amount of an item, for example dirt, do this.
/rm filter 3:20 - If dirt(3) exists in filter, this will modify it's amount to 20.

You can remove individual items from filter too using the commands /rm [id] filter subtract [material/id]/all/block/item:[amount:stack] and /rm [id] filter clear [material/id]/all/block/item:[amount:stack].
/rm filter 1-10:0 - This will remove items 1-10 from filter because setting an item's amount to zero will remove it.
/rm filter clear 1-10 - This will do the same thing.
/rm filter subtract 1-10 - This will subtract an amount of 1 from the items 1-10;
/rm filter subtract 1-10:20 - This will subtract an amount of 20 from the items 1-10;

For more examples, check out the Commands section.

Clear items from filter
1. Change the interface mode to filter. If all chests are empty, left-clicking one will prompt you to clear the filter. Click the sign to confirm or any other game block to cancel.
2. To clear all items from filter type /rm filter clear.

Check reward info
Change the interface mode to reward. Left-click a wall sign to check out the reward info.

Add items to reward/Remove items from reward
If you choose to have an infinite reward, the controls are exactly the same as for the filter above.

A finite reward has a slightly modified control scheme because of the finite nature of the items.
1. The easiest way to add a reward is to change the interface mode to reward. Now put the desired items into a chest and hit it. All items in that game chest will be put into the reward. If infinite reward is disabled, the chest will be emptied. If chest is empty while left-clicking it, you will be prompted to clear the reward.
2. If the chest is empty you will add (left-click) or subtract (right-click) the item you're holding to/from the reward by an amount of 1.
3. You can also set a reward by using the command /rm [id] reward [material/id]/all/block/item:[amount:stack]. If infinite reward is disabled, adding items this way will take them from your inventory.
/rm reward 1,3-5:10 - Set each of the items stone(1),dirt(3),cobblestone(4) and wood(5) to the amount of 10.

To add items to those already in the reward, use /rm [id] reward add [material/id]/all/block/item:[amount:stack].
/rm reward add 10-20,50,54,3:60 - This will add to each of the items 10-20,50,54 and 3(dirt) an amount of 60.

To remove individual items, use the /rm [id] reward subtract [material/id]/all/block/item:[amount:stack] and /rm [id] reward clear [material/id]/all/block/item:[amount:stack] commands.
/rm reward 20-30:0 - This will remove items 20-30 from reward because setting an item's amount to zero will remove it.
/rm reward clear 20-30 - This will do the same thing.
/rm reward subtract 20-30 - This will subtract an amount of 1 from the items 20-30;
/rm reward subtract 20-30:20 - This will subtract an amount of 20 from the items 20-30;
Note that items are returned to your inventory if infinite reward is disabled.

Clear items from reward
1. Change the interface mode to tools. If chest is empty, left-clicking it will prompt you to clear the reward. Click the sign to confirm or any other game block to cancel. The cleared reward items are put into the chest and your inventory.
2. To clear items from reward type /rm reward clear. All cleared items are put into your inventory.

Check tools info
Change the interface mode to tools. Left-click a wall sign to check out the tools info.

Add items to tools
This works just like adding a reward.
1. Change the interface mode to tools. Put the desired items into a chest and hit it. All items in that game chest will be put into tools. If infinite tools are disabled, the chest will be emptied. If chest is empty while left-clicking it, you will be prompted to clear the reward.
2. If the chest is empty you will add (left-click) or remove (right-click) the item you're holding to/from tools by an amount of 1.
3. Set tools by using the command /rm [id] tools [material/id]/all/block/item:[amount:stack]. If infinite tools are disabled, adding items this way will take them from your inventory.
/rm tools 5:10 - Set 5(wood) to the amount of 10.

To add items to those already in tools, use /rm [id] tools add [material/id]/all/block/item:[amount:stack].
/rm tools add 30-40,1,3,4:60 - This will add to each of the items 30-40,1(stone),3(dirt) and 4(cobblestone) an amount of 60.

To remove individual items, use the /rm [id] tools subtract [material/id]/all/block/item:[amount:stack] and /rm [id] tools clear [material/id]/all/block/item:[amount:stack] commands.
/rm reward 30-100:0 - This will remove items 30-100 from tools because setting an item's amount to zero will remove it.
/rm reward clear 30-100 - This will do the same thing.
/rm reward subtract 30-100 - This will subtract an amount of 1 from the items 30-100;
/rm reward subtract 30-100:20 - This will subtract an amount of 20 from the items 30-100;
Note that items are returned to your inventory if infinite tools are disabled.

Clear items from tools
1. Change the interface mode to tools. If chest is empty, left-clicking it will prompt you to clear the tools. Click the sign to confirm or any other game block to cancel. The cleared tools are put into the chest and your inventory.
2. To clear items from tools type /rm tools clear. All cleared items are put into your inventory.

Save a template of your filter/reward/tools
You can save your favorite filters by using the /rm template save [template] command.
To load the template afterwards, use /rm template load [template].
You can also remove a template by using /rm template remove [template].
To see a list all your templates, use the /rm template list [page] command.

Check game settings
Use /rm [id] settings [page] to check game settings.

The command /rm set [page] allows you to change the current game settings.
/rm set - Shows which settings can be customized. Not having permissions for settings will hide them. Locking them in the config file will do the same thing.
/rm set maxplayers 8 - Changes max players per game to 8.
/rm set restore false - Changes auto restore world changes to false.

Get team info
Left-click a wool block to get information about the teams.

Join a game
1. Sneak+Left-click a team wool block to join that team.
2. Use /rm [id] join [team color].

Quit a game
1. Sneak+Left-click a team wool block to quit that team.
2. Use /rm quit.

Ready
Use /rm ready to announce that you're ready. When all players are ready the game will start automatically.

Start/Stop a game
To manually start a game, use /rm id] start.

You can force the game to use a random amount of items from the ones in the filter. For instance, you have filtered 100 items you want to use, but you only want 10 of them in the game. The command /rm [id] start [amount] allows you to do that.
/rm start 10 - This will start a game with 10 random items from the ones you have set in the filter.

Use /rm [id] stop to stop a game. The reward will not be distributed.

Chat
There are three chat modes available - WORLD, GAME and TEAM chat. World chat sends messages to everyone on the server. Game chat sends messages to all teams in the game. Team chat sends messages to your team. When you enter a game, you automatically switch to game chat. You can switch to the desired chat mode with the commands /rm chat world/game/team or send a message without switching by using /rm chat world/game/team [message].
/rm chat world hello there - Send message 'hello there' to everyone on server.
/rm chat team - Switch to team chat.
You must be in-game to use the chat function. 

Get which items you need to gather
1. Left-click your team's sign or chest to get remaining items.
2. You can also use /rm items if you're away from the game rig.

Make gathered items count
For the gathered items to count, a player needs to put them into his team's chest. The player must then left-click the chest to complete the transaction.

Pause a game in progress
To pause a game, type /rm [id] pause. The game will freeze until you resume it by using the command /rm [id] resume.

Claim items/reward/tools
Use /rm claim items/reward/tools [material/id]/all/block/item:[amount:stack] to receive all the items that you can claim. If you were offline when a match began or ended, you may claim the items you have not received (but should have), like tools or items that where taken from you at match start (if you have the option clear player inventory enabled). Rewards need to be claimed manually.
Normally, items are put into your inventory, however, you can use /rm claim items/reward/tools chest to put them into a chest of your choosing instead.
/rm claim items - Claim all your items.
/rm claim chest 1-5:30 - Claim the items 1-5 from your reward, each with an amount of 30.
/rm claim reward chest 1-5:30 - Claim the items 1-5 from your reward, each with an amount of 30, to chest.
/rm claim tools iron_pickaxe  - Claim one iron_pickaxe(257) to chest.

Claim found/gathered items from a game
Use /rm [id] claim found to receive all the items a game has gathered. Use /rm [id] claim found chest to claim them to a chest. You must be the owner of the game.

Commands:
While /resourcemadness is the original command, the following commands are using the more convenient alias /rm. Both work equally.

For users that use permissions, keep in mind that some functions may be hidden if you choose to not include the relevant permission nodes.

Also check the config file (config.txt), which may contain a lock on certain commands, making them unchangeable.

You can omit the [id] from commands if you so desire. If you do, you will be prompted to choose the game with which to interact.

/rm info - This will prompt the player to choose a game.
/rm [id] info - This will run the action on game [id] directly.

/rm [page]
Show main commands.

/rm add
Add/Create a game.

/rm [id] remove
Remove an existing game. You must be the owner.

/rm list [page]
Show a list of all games on the server. Only advertised games will be shown.
/rm list - Show the first page of the list.
/rm list 3 - Show the third page.

/rm commands [page]
Show a list of commands and aliases.
/rm commands - Show the first page of the list.
/rm commands 3 - Show the third page.

/rm [id] info
Show a game's info.

/rm [id] info found
Show what items a game contains. A game stores all the items that were gathered during matches.

/rm info items
Show the items you can claim.

/rm info reward
Show the reward you can claim.

/rm info tools
Show the tools you can claim.

/rm info claim
Show everything you can claim.

/rm [id] settings [page]
Show a game's settings.

/rm [id] settings reset
Reset a game's settings to those in the config file.

/rm set [page]
Show commands to change settings.

/rm [id] set minplayers [amount]
Set the min required players for a game. This takes players from all teams into account.
/rm set minplayers 4 - Set minplayers to 4.

/rm [id] set maxplayers [amount]
Set the max allowed players for a game. This takes players from all teams into account.
/rm set maxplayers 8 - Set maxplayers to 8.

/rm [id] set minteamplayers [amount]
Set the min required team players for a game.
/rm set minteamplayers 2 - Set minteamplayers to 2.

/rm [id] set maxteamplayers [amount]
Set the max allowed team players for a game.
/rm set maxteamplayers 4 - Set maxteamplayers to 4.

/rm [id] set timelimit [amount]
Set the match time limit in minutes.
/rm set timelimit 10 - Set timelimit to 10.

/rm [id] set random [amount]
Set amount of items that are picked from the filter randomly every match.
/rm set random 10 - For example, if filter contains more than 10 items, this will pick 10 items randomly on match start.

/rm [id] set advertise
Choose if a game is advertised in the list of games.
/rm set advertise true

/rm [id] set restore
Choose if world changes made by game players should be restored automatically.
/rm set restore true

/rm [id] set warp [true/false]
Choose if players are teleported to game at game start/finish.
/rm set warp true

/rm [id] set midgamejoin
Choose if players are allowed to join/quit a match in progress.
/rm set midgamejoin false

/rm [id] set healplayer
Choose if player's should be healed when the game starts.
/rm set clearinventory true

/rm [id] set clearinventory
Choose if player's inventories should be emptied at game start. They can reclaim their items when the game ends.
/rm set clearinventory true

/rm [id] set foundasreward
Choose if the game's found items should be used as reward.
/rm set foundasreward true

/rm [id] set warnunequal
Choose if you should be warned when the reward/tools can't be distributed to players equally.
/rm set warnunequal true

/rm [id] set allowunequal
Choose if you allow that unequal distribution of reward/tools to players.
/rm set allowunequal false

/rm [id] set warnhacked
Choose if you should be warned when adding hacked items.
/rm set warnhacked true

/rm [id] set allowhacked
Choose if you allow the use of hacked items.
/rm set allowhacked false

/rm [id] set infinitereward
Choose if you want the reward to never run out.
/rm set infinitereward false

/rm [id] set infinitetools
Choose if you want the tools to never run out.
/rm set infinitetools false

/rm [id] mode
Cycle through the available interface modes.

/rm [id] mode filter
Change the interface mode to filter.

/rm [id] mode reward
Change the interface mode to reward.

/rm [id] mode tools
Change the interface mode to tools.

/rm [id] filter
Show the filter commands.

/rm [id] filter info
Show a game's filter.

/rm [id] filter [material/id]/all/block/item:[amount/stack] 
This command adds and sets the filtered items to the amount you specify.

/rm filter 1,3,4:64 - Set each of the items 1(stone),3(dirt),4(cobblestone) to the amount of 64.
/rm filter stone,dirt,cobblestone:64 - Set each of the items 1(stone),3(dirt),4(cobblestone) to the amount of 64.
/rm filter 1-5,glass-chest - Set each of the items 1-5,20-54 to the amount of 1.
/rm filter all:64 - Set each of the items to the amount of 64.
/rm filter block:32-128 - Set each of the items that are blocks to the amount of 32-128.
/rm filter item:stack - Set each of the items that are not blocks to the amount of it's max stack value.

Let's look at a complex example:
/rm filter 1-5 6-9:32 10-20,22,24:stack 27-35:8-32
Set each of the items 1-5 to the amount of 1.
Set each of the items 6-9 to the amount of 32.
Set each of the items 10-20,22(lapis_block),24(sandstone) to the amount of it's max stack value.
Set each of the items 27-35 to the amount of 8-32.

/rm [id] filter random [amount] [material/id]/all/block/item:[amount/stack]
Designate items from which to choose. Randomly pick [amount] of items and add them to game filter.
/rm filter random 10 all:32 - Choose from all items. Randomly pick 10 and set each of those items to the amount of 32.
/rm filter random 20 1-100,260,264 266 270 - Choose items 1-100,260(apple),264(diamond),266(gold_ingot),270(wooden_pickaxe). Randomly pick 20 and set each of those items to the amount of 1.

/rm [id] filter add [material/id]/all/block/item
Add desired amount of items to those already in filter.
/rm filter add 4,6,stone,dirt:20 - Add an amount of 20 to items 4(cobblestone),6(sapling),1(stone) and 3(dirt).
/rm filter add 20-30 torch chest:20 - Add an amount of 1 to items 20-30,50(torch) and an amount of 20 to 54(chest).

/rm [id] filter subtract [material/id]/all/block/item
Subtract desired amount of items from those already in filter.
/rm filter subtract 1,4,glass,wood:20 - Subtract an amount of 20 from items 1,4,20(glass),5(wood).
/rm filter subtract 1-10 glass coal:20 - Subtract an amount of 1 from items 1-10,20(glass) and an amount of 20 from 263(coal).

/rm [id] filter clear [material/id]/all/block/item
Clear desired items from game filter.
/rm filter clear 1-100 280 288 - Remove items 1-100,280(stick) and 288(feather) from filter.
/rm filter clear - Remove all items from filter.

/rm [id] reward
Show the reward commands.

/rm [id] reward info
Show a game's reward.

/rm [id] reward [material/id]/all/block/item:[amount/stack]
This command adds and sets the reward items to the amount specified. If infinite reward is disabled, the items are taken from your inventory.
/rm reward 20,6,dirt,log - Set each of the items 20(glass),6(sapling),3(dirt),17(log) to the amount of 1.
/rm reward block:48 - Set each of the items that are blocks to the amount of 48.

/rm [id] reward add [material/id]/all/block/item
Add desired amount of items to those already in reward.
/rm reward add 1,3,4:10 5,6:20 - Add an amount of 10 to items 1(stone),3(dirt),4(cobblestone) and an amount of 20 to 5(wood),6(sapling).
/rm reward add 10-40 wool 344:20 - Add an amount of 1 to items 10-40,35(wool) and an amount of 20 to 344(egg).

/rm [id] reward subtract [material/id]/all/block/item
Subtract desired amount of items from those already in reward.
/rm reward subtract diamond_sword,stick:5 - Subtract an amount of 5 from items 276(diamond_sword) and 280(stick).
/rm reward subtract egg,200-300:stack 50:40 - Subtract an amount of the item's max stack value from items 344(egg),200-300 and an amount of 40 from 50(torch).

/rm [id] reward clear
Clear desired items from game reward. If infinite reward is disabled, the items are put into your inventory.
/rm reward clear 20-80,96 - Remove items 20-80 and 96(trapdoor) from filter.
/rm reward clear - Remove all items from reward.

/rm [id] tools
Show the tools commands.

/rm [id] tools info
Show a game's tools.

/rm [id] tools [material/id]/all/block/item:[amount/stack]
This command adds and sets the tools items to the amount specified. If infinite tools are disabled, the items are taken from your inventory.
/rm tools 256,257 - Set each of the items 256(iron_shovel) and 257(iron_pickaxe) to the amount of 1.
/rm tools feather,stick 256,257:2 - Set each of the items (288)feather,(280)stick to the amount of 1 and each of the items 256(iron_shovel),257(iron_pickaxe) to the amount of 2.

/rm [id] tools add [material/id]/all/block/item
Add desired amount of items to those already in tools.
/rm tools add 5,17,20:100 - Add an amount of 100 to items 5(wood),17(log) and 20(glass).
/rm tools add 319-321:stack 323:10 - Add an amount of the item's max stack value to items 319-321 and an amount of 10 to 323(sign).

/rm [id] tools subtract [material/id]/all/block/item
Subtract desired amount of items from those already in tools.
/rm tools subtract 295,289:16 - Subtract an amount of 16 from items 295(seeds) and 289(sulphur).
/rm tools subtract 32-64:128 - Subtract an amount of 128 from items 32-64.

/rm [id] tools clear
Clear desired items from game tools. If infinite tools are disabled, the items are put into your inventory.
/rm tools clear 264,266 - Remove items 264(diamond) and 266(gold_ingot) from filter.
/rm tools clear - Remove all items from tools.

/rm template
Show the template commands.

/rm template list [page]
Show a list of all your saved templates.
/rm template list - Show the first page of the list.
/rm template list 3 - Show the third page.

/rm [id] template load [template]
Save a game's filter/reward/tools from a template.
/rm template load 3v3_fast - Load the 3v3_fast template.
/rm template load 1v1v1v1_match - Load the 1v1v1v1_match template.

/rm [id] template save [template]
Save a game's filter/reward/tools to a template.
/rm template save 3v3_fast - Save the 3v3_fast template.
/rm template save 1v1v1v1_match - Save the 1v1v1v1_match template.

/rm template remove [template]
Remova a template.
/rm template remove 3v3_fast - Remove the 3v3_fast template.
/rm template remove 3v3_fast 1v1v1v1_match projectd - Remove templates 3v3_fast, 1v1v1v1_match and projectd.

/rm [id] start
Start a game.

/rm [id] start [amount]
Start a game and pick [amount] of items randomly from filter on the fly.
/rm start 10 - For example, if filter contains more than 10 items, this will pick 10 items randomly on match start.

/rm [id] restart
Restart a game.

/rm [id] stop
Stop a game.

/rm [id] pause
Pause a game.

/rm [id] resume
Resume a game.

/rm [id] restore
Restore world changes for a game. Can only be used when a game is not in progress.

/rm [id] join [team color]
Join a game.
/rm join - Join a team.
/rm 3 join green - Join the green team of game id 3.

/rm quit
Quit a team.

/rm ready
Get ready.

/rm items
Show items you need to gather. This works only in-game.

/rm item
Show item commands.

/rm item [material/id]
Find material's id or id's material.
/rm item 1,glass,3,coal - Show items 1(stone),20(glass),3(dirt),263(coal). Result: 1:stone, glass:20, 3:dirt, coal:263
/rm item stone 20 dirt 263 - Show items 1(stone),20(glass),3(dirt),263(coal). Result: stone:1, 20:glass, dirt:3, 263:coal
/rm item 1-4 - Show items 1-4. Result: 1:stone, 2:grass, 3:dirt, 4.cobblestone

/rm chat
Show chat commands. Chat works only in-game.

/rm chat world [message]
Regular world chat. Chat with everyone on the server.
/rm chat world - Switch to world chat. All chat messages will be sent to everyone on the server.
/rm chat world hello there - Send message "hello there" to everyone on the server.

/rm chat game [message]
Chat with all team in the game.
/rm chat game - Switch to game chat. All chat messages will be sent to all teams in the game.
/rm chat game hello there - Send message "hello there" to all teams in the game.

/rm chat team [message]
Chat with your team.
/rm chat team - Switch to team chat. All chat messages will be sent to your team.
/rm chat team hello there - Send message "hello there" to your team.

/rm claim
Show claim commands.

/rm [id] claim found
Claim items a game contains. Only the game owner can do this.
/rm claim found - Claim all items a game contains.
/rm claim found sapling:20 - Claim the item 6(sapling) with an amount of 20 from a games's found items.

/rm [id] claim found chest
Claim items a game contains to a chest. Only the game owner can do this.
/rm claim found chest - Claim all items a game contains to a chest.
/rm claim found chest 200-300:stack - Claim the items 20-35, each with an amount of it's max stack value, from a game's found items to a chest.

/rm claim items
Claim your items.
/rm claim items - Claim all your items.
/rm claim items coal:50 280:stack - Claim the item 263(coal) with an amount of 50 and the item 280(stick) with an amount of it's max stack value from your items.

/rm claim items chest
Claim your items to a chest.
/rm claim items chest - Claim all your items to a chest.
/rm claim items chest 1-100 - Claim the items 1-100, each with an amount of 1, from your items to a chest.

/rm claim reward
Claim your reward.
/rm claim reward - Claim your reward.
/rm claim reward glass:20 torch:5 - Claim the items 20(glass) nad 5(torch), each with an amount of 64, from your reward.

/rm claim reward chest
Claim your reward to a chest.
/rm claim reward chest - Claim your reward to a chest.
/rm claim reward chest 4,3:15 - Claim the items 4(cobblestone) and 3(dirt), each with an amount of 15, from your reward to a chest.

/rm claim tools
Claim your tools.
/rm claim tools - Claim your tools.
/rm claim tools stone:64 - Claim the item 1(stone) with an amount of 64 from your tools.

/rm claim tools chest
Claim your tools to a chest.
/rm claim tools chest - Claim your tools to a chest.
/rm claim tools chest wood:10 - Claim the item 5(wood) with an amount of 10 from your tools to a chest.

/rm save
Admin command to save game data. Can be used by ops if permissions plugin is not found.

Permissions:
If you're using permissions and you want to have access to all of your game's functions, use the resourcemadness.owner permission.

resourcemadness - Get the right to use ResourceMadness.
resourcemadness.add - Access to /rm add.
resourcemadness.remove - Access to /rm remove.
resourcemadness.list - Access to /rm list.
resourcemadness.commands - Access to /rm commands.
resourcemadness.info - Access to /rm info.
resourcemadness.info.found - Access to /rm info found.
resourcemadness.info.items - Access to /rm info items.
resourcemadness.info.reward - Access to /rm info reward.
resourcemadness.info.tools - Access to /rm info tools.
resourcemadness.info.claim - Access to /rm info claim.
resourcemadness.settings - Access to /rm settings.
resourcemadness.settings.reset - Access to /rm settings reset.
resourcemadness.set - Access to /rm set.
resourcemadness.set.minplayers - Access to /rm set minplayers.
resourcemadness.set.maxplayers - Access to /rm set maxplayers.
resourcemadness.set.minteamplayers - Access to /rm set minteamplayers.
resourcemadness.set.maxteamplayers - Access to /rm set maxteamplayers.
resourcemadness.set.timelimit - Access to /rm set timelimit.
resourcemadness.set.random - Access to /rm set random.
resourcemadness.set.advertise - Access to /rm set advertise.
resourcemadness.set.restore - Access to /rm set restore.
resourcemadness.set.warp - Access to /rm set warp.
resourcemadness.set.midgamejoin - Access to /rm set midgamejoin.
resourcemadness.set.healplayer - Access to /rm set healplayer.
resourcemadness.set.clearinventory - Access to /rm set clearinventory.
resourcemadness.set.foundasreward - Access to /rm set foundasreward.
resourcemadness.set.warnunequal - Access to /rm set warnunequal.
resourcemadness.set.allowunequal - Access to /rm set allowunequal.
resourcemadness.set.warnhacked - Access to /rm set warnhacked.
resourcemadness.set.allowhacked - Access to /rm set allowhacked.
resourcemadness.set.infinitereward - Access to /rm set infinitereward.
resourcemadness.set.infinitetools - Access to /rm set infinitetools.
resourcemadness.mode - Access to /rm mode and right to change filter mode.
resourcemadness.mode.filter - Access to /rm mode filter and right to change filter mode to filter.
resourcemadness.mode.reward - Access to /rm mode reward and right to change filter mode to reward.
resourcemadness.mode.tools - Access to /rm mode tools and right to change filter mode to tools.
resourcemadness.filter - Access to /rm filter and the right to set filter items by chest.
resourcemadness.filter.info - Access to /rm filter info.
resourcemadness.filter.byhand - Get the right to add items to filter by hand.
resourcemadness.filter.random - Access to /rm filter random.
resourcemadness.filter.add - Access to /rm filter add and the right to add items to filter by chest.
resourcemadness.filter.subtract - Access to /rm filter subtract and the right to subtract items from filter by chest.
resourcemadness.filter.clear - Access to /rm filter clear and the right to clear items from filter by chest.
resourcemadness.reward - Access to /rm reward and the right to set reward by chest.
resourcemadness.reward.info - Access to /rm reward info.
resourcemadness.reward.byhand - Get the right to add items to reward by hand.
resourcemadness.reward.add - Access to /rm reward add and the right to add items to reward by chest.
resourcemadness.reward.subtract - Access to /rm reward subtract and the right to subtract items from reward by chest.
resourcemadness.reward.clear - Access to /rm reward clear and the right to clear items from reward by chest.
resourcemadness.tools - Access to /rm tools and the right to set tools by chest.
resourcemadness.tools.info - Access to /rm tools info.
resourcemadness.tools.byhand - Get the right to add items to tools by hand.
resourcemadness.tools.add - Access to /rm tools add and the right to add items to tools by chest.
resourcemadness.tools.subtract - Access to /rm tools subtract and the right to subtract items from tools by chest.
resourcemadness.tools.clear - Access to /rm tools clear and the right to clear items from tools by chest.
resourcemadness.template - Access to /rm template.
resourcemadness.template.list - Access to /rm template list.
resourcemadness.template.load - Access to /rm template load.
resourcemadness.template.save - Access to /rm template save.
resourcemadness.template.remove - Access to /rm template remove.
resourcemadness.start - Access to /rm start.
resourcemadness.start.random - Access to /rm start random.
resourcemadness.stop - Access to /rm stop.
resourcemadness.pause - Access to /rm pause and /rm resume.
resourcemadness.restore - Access to /rm restore.
resourcemadness.join - Access to /rm join.
resourcemadness.quit - Access to /rm quit.
resourcemadness.ready - Access to /rm ready.
resourcemadness.items - Access to /rm items.
resourcemadness.item - Access to /rm item.
resourcemadness.chat - Access to /rm chat.
resourcemadness.chat.world - Access to /rm chat world.
resourcemadness.chat.game - Access to /rm chat game.
resourcemadness.chat.team - Access to /rm chat team.
resourcemadness.claim - Access to /rm claim.
resourcemadness.claim.found - Access to /rm claim found.
resourcemadness.claim.found.chest - Access to /rm claim found chest.
resourcemadness.claim.items - Access to /rm claim items.
resourcemadness.claim.items.chest - Access to /rm claim items chest.
resourcemadness.claim.reward - Access to /rm claim reward.
resourcemadness.claim.reward.chest - Access to /rm claim reward chest.
resourcemadness.claim.tools - Access to /rm claim tools.
resourcemadness.claim.tools.chest - Access to /rm claim tools chest.
resourcemadness.owner - Access to all commands except /rm save. (default owner-only)
resourcemadness.admin - Access to all games and all commands except /rm save. (default op-only)
resourcemadness.admin.save - Access to /rm save. (default op-only)

Tips:
When creating a match, be careful that you don't add too many of the complicated items to the filter. Gathering 10 maps takes a lot of patience, so know that it's better to start small and then increase the amount of items needed. Preparing a good match takes time - but it will yield greater results. When you're satisfied with your filter, reward and tools, don't hesitate to save your template.

Changelog:
Version 0.1.3
 Fixed autosaving happening 1 second later than it should
 Fixed aliases not working because of a last-minute ==/!= switch up. How could I miss that?

Version 0.1.2
 Updated to bukkit 1185
 Fixed certain settings not getting saved or loaded properly (minPlayers, maxPlayers, minTeamPlayers, maxTeamPlayers, autoRandomizeAmount)
 Added option to use gathered items as reward (foundAsReward)
 Added world/game/team chat
 Added support for command aliases
 Added admin command /rm save, which saves all data
 Bug fix

Version 0.1.1
 Added Minecraft 1.8.1 hacked materials
 Added /rm filter info, /rm reward info, /rm tools info
 Added /rm info claim
 Fixed infinite reward/tools items not getting added properly
 Minor text fix

Version 0.1
 Initial release

To do:
 Option to hide how many items the other teams have left.
 Option to randomize players to teams
 Economy support
 Support for just one team matches (best player wins variant or last man standing)
 Proper stats

This plugin is using the Ning LZF compression library (https://github.com/ning/compress)
Made by M-Taye (mtaye.tumblr.com)
