Set Difficulty to Peaceful
Switch to Peaceful mode so hostile mobs don't spawn
✅ Verified for Java 26.2 · Bedrock 26.32 — checked June 2026Sets the world to Peaceful difficulty — hostile mobs despawn immediately and won't spawn again, and your health regenerates passively. Passive mobs (cows, sheep, etc.) continue spawning and behaving normally. Switch back with /difficulty normal, hard, or easy.
/difficulty peaceful20 characters
- Java: yes
- Bedrock: yes
- Command block: yes
- Needs cheats / OP: yes
How to use
- Open chat (T on Java, / on Bedrock).
- Paste the command and press Enter.
- Peaceful mode is active; no hostile mobs spawn.
- Run /difficulty normal to restore hostile mob spawning.
Related commands
Add Experience Levels
Give yourself or a player XP levels
Start a Thunder Storm
Trigger a thunderstorm with lightning
Set Time to Night
Make it nighttime immediately
Display World Seed
See the world seed for reproducibility or map info
God Mode (Resistance + Regeneration)
Become nearly invincible
Set Gamemode to Creative
Switch yourself into Creative mode