(WORK IN PROGRESS) Command Block Tutorial Fully-Automatic Mining Simulator

**This tutorial is not done!**

Mining simulators were not fully automatic, even the best one (and the most popular) is still not fully automatic. If you want a special role, you had to ask an admin. This tutorial will show you how to make a fully automatic mining simulator!

## Building a spawn

A good spawn should have a Beacon, signs (for instructions, and please credit Jmooroof), and some decoration.

## Giving a player a role

There are two ways to give players roles when they first join in. In the colony linked above, it uses the "Giving a role when one favourites the colony" to give roles.

### Creating the role

Before you can give a role, you must create a role. Create the beginner role you get at the start of the game, and give it whatever permissions you want. You must enable "Mine Asteroids" because it is a mining simulator. In this example, it is "BasicMiner."

#### **Instantly giving a role**

To instantly give a player a role, open command blocks (press k), and add a new trigger by pressing the "plus sign" next to the "New trigger." Add a "PlayerJoined" trigger (it should be at the top of the "Add Trigger Menu") Add a new action "commands" (also at the top). Click the "plus sign" next to the "Commands" and a new box will appear. Type in the box "/role player [roleName]" and replace "[roleName]" with whatever you named basic the role.

#### **Giving a role when one favourites the colony**

This way lets you get lots of favourites, and can quickly make your colony the top. Open command blocks (press k) and add a new trigger. Add a "ColonyLike" trigger.

Be careful in these next steps, because it will become somewhat complicated. Add an "Ifthenelse" action. In "Value1", type $getRole($player). Change the operator to "=~".

**Small Warning** (ignore if you are not a programmer)**:** Although the operators are supposed to be like many programming languages, the "=~" does not exist in them, use "==" to compare two strings.

In "Value2" add "Guest." (do not add the period) Click the "plus sign" next to "Then", and add a "commands" action. In the box, add "/role $player [roleName]" and replace "[roleName]" to whatever you named the basic role. This will make sure people who un-favourite the colony and favourite again will not lose their hard-earned role.

### Role messages

This is an optional thing that tells everybody in the server a new person joined! It is probably the best to not use this with instantly giving a role.

Under the give role command, add a new command and type "/caption title $player has became a miner!" or whatever you want after title. It should look like this:

## Making the mines and a regenerate script

Making the mines are easy, unless you want to bury ores.

The first mine should consist only of iron ore, because it is the most basic ore. Build a sealed door to enter a mine and set it so only your basic miner and administrators can open the door. Build a second mine, but make sure the second mine cannot be mined from the previous mine. You can bury ores, but make sure the ores are placed in rectangles/squares or the game will take a very long time to make.

We can make more later.

### Making a regen script

Before you do anything, type /timer regen [time between each regen]. I recommend 175 seconds. Then go into command blocks, and