Thursday, April 21, 2016

Minecraft Farm Project













Command Block Security

After a while we ended up with other players entering our world. I devised a security system to prevent that. What it does, is it executes a /kill command every 20 seconds that affects all players who are not in a designated team. Since it kills them so quickly, you don't need to worry about them using commands; they can only use commands and chat while they're alive. So here are the commands I typed in chat, and the command I typed in the command block. Everything in caps are names that can be changed to suit your needs. Example: TEAMNAME, PLAYERNAME.

/scoreboard teams add TEAMNAME

/scoreboard teams join TEAMNAME PLAYERNAME
     you can add more people at a time by adding a comma and another PLAYERNAME. Example:          /scoreboard teams join TEAMNAME PLAYERNAME, PLAYERNAME2, PLAYERNAME3


/give @p minecraft:command_block
     This gives you, the person making the security, a command block. 

In the command block, you will type /kill @a[team=!TEAMNAME]
     This means "kill(/kill) everyone(@a) not(!) in the team(team=TEAMNAME)". The "!" is very important, otherwise it will kill everyone who IS in the team.

Lastly, to make it as compact as possible, you will need to configure the three buttons on the bottom of the command block UI so that it shows "repeat" and "always active".


"Repeat" makes the command execute 20 times per second or so. "always active" means it does not need a redstone signal to activate.

Follow these steps correctly and everyone else who enters your world will die.

Please note that I am not responsible for any mistakes, unintentional deaths, or screw-ups of any sort.

Have fun. :)

No comments:

Post a Comment