I purchased a Minecraft Realm and play regularly with my two sons. One of them is really freaked out by hostile mobs and the other really wants to fight them and collect what they drop. Can I set the frightened child to Peaceful and the other child to Easy? If so, what is the command? I have only had luck changing the difficulty level for everybody. Thank you!
Difficulty is set for the entire world, not individual players.
You might want to set your youngest's "game mode" to "creative", meaning he will be invulnerable to hostile mobs (also, they will completely ignore him). You'd use the command
/gamemode creative <player-name>.
I have the same issue, and I just had to make a rule that when they are playing together, the difficulty must be set to "peaceful".
While the overall difficulty of the game is set on a per-world basis, you could just go and automatically remove all hostile mobs from the vicinity of your younger son's character using command blocks.
To do so, set yourself to creative mode and give yourself a command block (
/give @p minecraft:command_block). You'll also need a scoreboard objective (you could do it without one, but it's cleaner with one):
scoreboard objectives add hostileMob dummy
Set up a 20Hz./fill clock close to the world's spawnpoint (so that they are always loaded), preferably in a bedrock cage as to be inaccessible in survival mode.
Place the following commands:
/scoreboard players set @e[type=Creeper] hostileMob 1 /scoreboard players set @e[type=Zombie] hostileMob 1 /scoreboard players set @e[type=Skeleton] hostileMob 1 ... /execute @p[name=<NAME>] ~ ~ ~ @e[score_hostileMob_min=1,r=<R>] ~ -10 ~
... represents additional scoreboard commands. You'll need one for every type of hostile mob from this list. Replace
<NAME> by your younger son's Minecraft name. This will teleport the mobs into the void if they are within
<R> blocks (I suggest something like 20) of that character.
Note that your son will still have to deal with the hunger bar depleting (unlike true peaceful mode).
I'm not aware of a command that can change the difficulty for individual players, but going on creative for your youngest son is a good idea. If they are very frightened, try playing mini-games as well as survival, it can be fun for children! :)