One Command Block UHC Setup is at the end of this thread, scroll down
UHC Set Up Video plus Commands for Copy and Paste
The second video in this thread is slower and more comprehensive.
The third video in this thread is higher quality.
List of Basic UHC Commands
Health Regen Off
/gamerule naturalRegeneration false
Set World Spawn
If you want zero zero to be spawn, you can set it with this command. If you are using command blocks instead of chat commands, the command blocks will need to be in the same chunk as spawn so they continue to operate even when players are not around.
/setworldspawn X Y Z (use any coordinate)
/setworldspawn 0.0 0.0 0.0
World Border Set and Add and Subtract value
/worldborder center X Z Use the coordinates for the center of your map or spawnpoint. You don't need the Y coordinate.
/worldborder set 2000
/worldborder add 500
/worldborder add -500
Create Teams
/scoreboard teams add blue
/scoreboard teams add red
Assign Random Players to Teams
Team Blue
/scoreboard teams join blue @r[team=,c=3]
Team Red
/scoreboard teams join red @r[team=,c=3]
(the last value, here a "3", is the amount of players to be put on that team)
(if you want to assign players to specific teams, just put their name after the color. You can do this in chat)
Color the Names in the Sidebar blue or red to Display Teams
/scoreboard teams option blue color blue
/scoreboard teams option red color red
Clear Teams for Reset
/scoreboard teams remove red
/scoreboard teams remove blue
Spread Players
/spreadplayers X Y <value for how far apart the players will be> <value for how far players will be from center> <true or false (true for teams) @a
The X Y is the location where the players will be spread from, followed by far apart value, followed by distance from center.
/spreadplayers 0.0 0.0 100 500 false @a
Show Hearts in the Tab
/scoreboard objectives add Hearts health
/scoreboard objectives setdisplay list Hearts
(After the commands are entered, the hearts will not show up in the tab until you take some damage.)
If you want to customize your UHC, try out these scoreboard commands
Add Gold Ingot Objective to Scoreboard
/scoreboard objectives add gold_ingots dummy
Scan Inventory for gold ingots: 4 Command BlocK
Tracking gold_ingots is not a default scoreboard objective; you will need these four commands in command blocks running in a circuit for continuous scanning to update the scores.
I redid the video, with a few mistakes, because I was getting some complaints about the quality of the earlier videos. The earlier videos were my first YouTube videos.
One Command Block UHC Setup is at the end of this thread, scroll down
UHC Set Up Video plus Commands for Copy and Paste
The second video in this thread is slower and more comprehensive.
The third video in this thread is higher quality.
List of Basic UHC Commands
Health Regen Off
/gamerule naturalRegeneration false
Set World Spawn
If you want zero zero to be spawn, you can set it with this command. If you are using command blocks instead of chat commands, the command blocks will need to be in the same chunk as spawn so they continue to operate even when players are not around.
/setworldspawn X Y Z (use any coordinate)
/setworldspawn 0.0 0.0 0.0
World Border Set and Add and Subtract value
/worldborder center X Z Use the coordinates for the center of your map or spawnpoint. You don't need the Y coordinate.
/worldborder set 2000
/worldborder add 500
/worldborder add -500
Create Teams
/scoreboard teams add blue
/scoreboard teams add red
Assign Random Players to Teams
Team Blue
/scoreboard teams join blue @r[team=,c=3]
Team Red
/scoreboard teams join red @r[team=,c=3]
(the last value, here a "3", is the amount of players to be put on that team)
(if you want to assign players to specific teams, just put their name after the color. You can do this in chat)
Color the Names in the Sidebar blue or red to Display Teams
/scoreboard teams option blue color blue
/scoreboard teams option red color red
Clear Teams for Reset
/scoreboard teams remove red
/scoreboard teams remove blue
Spread Players
/spreadplayers X Y <value for how far apart the players will be> <value for how far players will be from center> <true or false (true for teams) @a
The X Y is the location where the players will be spread from, followed by far apart value, followed by distance from center.
/spreadplayers 0.0 0.0 100 500 false @a
Show Hearts in the Tab
/scoreboard objectives add Hearts health
/scoreboard objectives setdisplay list Hearts
(After the commands are entered, the hearts will not show up in the tab until you take some damage.)
If you want to customize your UHC, try out these scoreboard commands
Add Gold Ingot Objective to Scoreboard
/scoreboard objectives add gold_ingots dummy
Scan Inventory for gold ingots: 4 Command BlocK
Tracking gold_ingots is not a default scoreboard objective; you will need these four commands in command blocks running in a circuit for continuous scanning to update the scores.
/testfor @a[r=1000] {Inventory:[{id:"minecraft:gold_ingot"}]}
/stats entity @a set AffectedItems @p gold_ingots
/execute @a ~ ~ ~ clear @a minecraft:gold_ingot 0 0
/scoreboard objectives setdisplay sidebar gold_ingots
Add Player Kills to Scoreboard
/scoreboard objectives add Kills playerKillCount
Display Player Kills Objective to Sidebar
/scoreboard objectives setdisplay sidebar Kills
Add Players to Scoreboard Individually
/scoreboard players add "their IGN" gold_ingots 0
You have to put each player's name followed by the scoreboard objective you are adding them to followed by a value, here the value is zero.
You have to add each player individually to each scoreboard you are running.
Add all Players to a Specific Scoreboard
/scoreboard players add @a Kills 0
You still have to run this command for each scoreboard, but it will add all the players.
Clear a Scoreboard Objective so you can Reset the Game
/scoreboard objectives remove Kills
Mute Command Block Output in Chat
/gamerule commandBlockOutput <true/false>
If you need help setting up your own UHC server/map, I will help. If there are other commands you are interested in, feel free to ask.
I added some more commands. If you are using Realms, you need to enable command blocks in the world options.
I added some more team commands, and some commands for clearing scoreboards in case you need to reset the game.
For a slower more A to Z overview of setting up a UHC map on Realms.
Thank you for the help!
A higher quality tutorial video.
I redid the video, with a few mistakes, because I was getting some complaints about the quality of the earlier videos. The earlier videos were my first YouTube videos.
One Command Block Basic UHC
Setup and begin a basic UHC with one command block, see command below for copy and paste.
Please note, the command must be used at 0.0 0.0, and the players must be near 0.0 0.0 when the command is used.
The all-in-one command will:
Tutorial for use of one command
summon falling_block ~ ~1 ~ {Block:stone,Time:1,Passengers:[{id:falling_block,Block:redstone_block,Time:1,Passengers:[{id:falling_block,Block:activator_rail,Time:1,Passengers:[{id:commandblock_minecart,Command:"gamerule commandBlockOutput false"},{id:commandblock_minecart,Command:"fill ~2 ~-13 ~-2 ~8 ~-11 ~2 stained_glass 0 hollow"},{id:commandblock_minecart,Command:"fill ~2 ~-12 ~-2 ~8 ~-12 ~2 stained_glass 0 0 stained_glass"},{id:commandblock_minecart,Command:"setblock ~1 ~-12 ~ wall_sign 4 0 {Text1:\"{\\\"text\\\":\\\"Destroy\\\"}\",Text2:\"{\\\"text\\\":\\\"\\\"}\",Text3:\"{\\\"text\\\":\\\"\\\"}\",Text4:\"{\\\"text\\\":\\\"\\\",\\\"clickEvent\\\":{\\\"action\\\":\\\"run_command\\\",\\\"value\\\":\\\"fill ~ ~-1 ~-2 ~7 ~1 ~2 air\\\"}}\"}"},{id:commandblock_minecart,Command:"summon armor_stand ~3 ~-12 ~-1 {CustomName:TogAct,Marker:1,NoGravity:1,Invisible:1}"},{id:commandblock_minecart,Command:"scoreboard objectives add dvfOI8_A dummy"},{id:commandblock_minecart,Command:"fill ~3 ~-12 ~-1 ~7 ~-12 ~1 chain_command_block 5"},{id:commandblock_minecart,Command:"fill ~3 ~-12 ~1 ~4 ~-12 ~1 command_block 5"},{id:commandblock_minecart,Command:"setblock ~3 ~-12 ~ command_block 3"},{id:commandblock_minecart,Command:"fill ~7 ~-12 ~ ~4 ~-12 ~ command_block 4"},{id:commandblock_minecart,Command:"setblock ~7 ~-12 ~-1 command_block 3"},{id:commandblock_minecart,Command:"fill ~4 ~-12 ~-1 ~6 ~-12 ~-1 command_block 5"},{id:commandblock_minecart,Command:"setblock ~3 ~-12 ~-1 command_block 5"},{id:commandblock_minecart,Command:"blockdata ~4 ~-12 ~1 {auto:1,Command:\"/effect @a regeneration 30\"}"},{id:commandblock_minecart,Command:"blockdata ~3 ~-12 ~1 {auto:1,Command:\"/scoreboard objectives add Hearts health\"}"},{id:commandblock_minecart,Command:"blockdata ~3 ~-12 ~ {auto:1,Command:\"/scoreboard objectives setdisplay list Hearts\"}"},{id:commandblock_minecart,Command:"blockdata ~4 ~-12 ~ {auto:1,Command:\"/gamemode 0 @a\"}"},{id:commandblock_minecart,Command:"blockdata ~5 ~-12 ~ {auto:1,Command:\"/worldborder center 0.0 0.0\"}"},{id:commandblock_minecart,Command:"blockdata ~6 ~-12 ~ {auto:1,Command:\"/worldborder set 700\"}"},{id:commandblock_minecart,Command:"blockdata ~7 ~-12 ~ {auto:1,Command:\"/setworldspawn 0.0 0.0 0.0\"}"},{id:commandblock_minecart,Command:"blockdata ~7 ~-12 ~-1 {auto:1,Command:\"/gamerule naturalRegeneration false\"}"},{id:commandblock_minecart,Command:"blockdata ~6 ~-12 ~-1 {auto:1,Command:\"/spreadplayers 0.0 0.0 100 200 false @a\"}"},{id:commandblock_minecart,Command:"blockdata ~5 ~-12 ~-1 {auto:1,Command:\"/fill 1.0 ~16 1.0 -2.0 ~16 -2.0 redstone_block \"}"},{id:commandblock_minecart,Command:"blockdata ~4 ~-12 ~-1 {auto:1,Command:\"/fill 0.0 ~ 0.0 -1.0 ~15 -1.0 glowstone\"}"},{id:commandblock_minecart,Command:"blockdata ~3 ~-12 ~-1 {auto:1,Command:\"/tellraw @a {\\\"color\\\":\\\"red\\\",\\\"text\\\":\\\"Makingroceries' UHC\\\"}\"}"},{id:commandblock_minecart,Command:"setblock ~ ~ ~1 command_block 0 0 {Command:\"fill ~ ~-3 ~-1 ~ ~ ~ air\"}"},{id:commandblock_minecart,Command:"setblock ~ ~-1 ~1 redstone_block"},{id:commandblock_minecart,Command:"kill @e[type=commandblock_minecart,r=1]"}]}]}]}
can you make a command that the map will reset?
Sounds interesting.
To accomplish the following?
I can do that, is there anything I am missing?