The answers you are looking for can be found on the Minecraft Wiki entries for scoreboard and commands.
Setting up teams
To assign a player to a team you have to set up the teams first, using
/scoreboard teams add <team> [display name]
/scoreboard teams option <team> color <value>
<team>
is the name of the team, e.g. red
or blue
. [display name]
is an optional longer name, used in the scoreboard display, e.g. Team Ocelot
or Team Jacob
. The second command sets the team color, use [tab] after color
to see your options, e.g. red
, blue
.
The command to assign someone to a team is
/scoreboard teams join <team> [players]
I suggest using simple pressure plates at the cave entrances, with the command blocks right below. You can then use @p
fpr [players]
to select the nearest player, who is normally the one that triggered the plate. Alternatively, you can use @a[r=X]
to assign everyone in an X
block radius sphere around the command block at once, or specify a block range with the selectors x
, y
, z
, dx
, dy
and dz
.
Teleport by team
To teleport every player on a specific team, you can use the @a
selector with the team
specifier, i.e.
/tp @a[team=<team>] <x> <y> <z>
You can use command blocks. Place a redstone torch under the block you want to break and a command block above. Then, the command is:
/setblock ~ ~-1 ~ minecraft:air 0 destroy
Other than that, there is no vanilla way. (this is also not very vanilla)
To pick it up by a hopper place the torch on a wall under it and place the hopper at least 2 blocks under the cobble to make sure that you don't power the hopper
Best Answer
Have you tried searching in YouTube? There is a huge amount of tutorials on this topic. Here is one that I like (remember: creating a clock is not a trivial matter):
Note: this is not a perfect solution since seconds are being skipped Part 1: