Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Minecraft:Commands/difficulty: Difference between revisions

From SAS Gaming Wiki
SyncBot (talk | contribs)
Fix template calls: add MC/ prefix
SyncBot (talk | contribs)
Sync: updated from Minecraft
 
Line 4: Line 4:
* 2 {{only|java|short=1}}
* 2 {{only|java|short=1}}
* 1 {{only|bedrock|short=1}}
* 1 {{only|bedrock|short=1}}
|others=Cheat only{{only|bedrock|short=1}}
|others=[[Minecraft:Cheat]] only{{only|bedrock|short=1}}
}}
}}


Line 12: Line 12:
On a multiplayer server difficulty lasts only until the server is restarted — on restart, difficulty is reloaded from [[Minecraft:server.properties]].  
On a multiplayer server difficulty lasts only until the server is restarted — on restart, difficulty is reloaded from [[Minecraft:server.properties]].  


In Hardcore mode, the difficulty doesn't change even when successful.{{only|java}}
In [[Minecraft:Hardcore]] mode, the difficulty doesn't change even when successful.{{only|java}}


== Syntax ==
== Syntax ==
Line 23: Line 23:


== Arguments ==
== Arguments ==
{{MC/El|je|short=1}}: {{code|peaceful{{!}}easy{{!}}normal{{!}}hard}}<br>
{{el|je|short=1}}: {{code|peaceful{{!}}easy{{!}}normal{{!}}hard}}<br>
{{MC/El|be|short=1}}: {{MC/Argument|be=1|difficulty: Difficulty|enum}} and {{MC/Argument|be=1|difficulty: int|int}}
{{el|be|short=1}}: {{argument|be=1|difficulty: Difficulty|enum}} and {{argument|be=1|difficulty: int|int}}
: Specifies the new difficulty level. Must be one of the following:
: Specifies the new difficulty level. Must be one of the following:
:* <code>peaceful</code> (can be abbreviated as <code>p</code> or <code>0</code>{{only|bedrock}}) for Peaceful difficulty
:* <code>peaceful</code> (can be abbreviated as <code>p</code> or <code>0</code>{{only|bedrock}}) for [[Minecraft:Peaceful]] difficulty
:* <code>easy</code> (can be abbreviated as <code>e</code> or <code>1</code>{{only|bedrock}}) for Easy difficulty
:* <code>easy</code> (can be abbreviated as <code>e</code> or <code>1</code>{{only|bedrock}}) for [[Minecraft:Easy]] difficulty
:* <code>normal</code> (can be abbreviated as <code>n</code> or <code>2</code>{{only|bedrock}}) for Normal difficulty
:* <code>normal</code> (can be abbreviated as <code>n</code> or <code>2</code>{{only|bedrock}}) for [[Minecraft:Normal]] difficulty
:* <code>hard</code> (can be abbreviated as <code>h</code> or <code>3</code>{{only|bedrock}}) for Hard difficulty
:* <code>hard</code> (can be abbreviated as <code>h</code> or <code>3</code>{{only|bedrock}}) for [[Minecraft:Hard]] difficulty
: If unspecified, queries the current difficulty instead of changing it.{{only|java}}
: If unspecified, queries the current difficulty instead of changing it.{{only|java}}


Line 40: Line 40:


== Output ==
== Output ==
{{MC/Output table}}
{{Output table}}
{{MC/Output table|edition=je|On fail|0|0|0}}
{{Output table|edition=je|On fail|0|0|0}}
{{MC/Output table|cmd=/difficulty ...|On success|1|1|0}}
{{Output table|cmd=/difficulty ...|On success|1|1|0}}
{{Output table|cmd=/difficulty|On success|1|1|the number id of current difficulty (peaceful {{=}} 0, easy {{=}} 1, normal {{=}} 2, hard {{=}} 3)}}
{{Output table|cmd=/difficulty|On success|1|1|the number id of current difficulty (peaceful {{=}} 0, easy {{=}} 1, normal {{=}} 2, hard {{=}} 3)}}
{{MC/Output table|cmd=|edition=be|On fail|0}}
{{Output table|cmd=|edition=be|On fail|0}}
{{MC/Output table|On success|1}}
{{Output table|On success|1}}
{{MC/Output table}}
{{Output table}}


== Examples ==
== Examples ==
Line 52: Line 52:


== History ==
== History ==
{{MC/Expand section|type=old}}
{{Expand section|type=old}}


=== ''Java Edition'' ===
=== ''Java Edition'' ===
{{HistoryTable
{{HistoryTable
|{{MC/HistoryLine|java}}|{{HistoryLine||1.4.2|dev=12w32a|Added {{MC/Cmd|difficulty|link=none}}.}}
|{{HistoryLine|java}}|{{HistoryLine||1.4.2|dev=12w32a|Added {{cmd|difficulty|link=none}}.}}
|{{HistoryLine||1.13|dev=17w45a|{{MC/Cmd|difficulty [<value>]|link=none}} now only accepts string IDs, not shorthand or numeric.|{{MC/Cmd|difficulty 2|link=none}} is now {{MC/Cmd|difficulty normal|link=none}}.|{{MC/Cmd|difficulty p|link=none}} is now {{MC/Cmd|difficulty peaceful|link=none}}.|The player can now query for the current difficulty by using {{MC/Cmd|difficulty|link=none}} without any arguments.}}
|{{HistoryLine||1.13|dev=17w45a|{{cmd|difficulty [<value>]|link=none}} now only accepts string IDs, not shorthand or numeric.|{{cmd|difficulty 2|link=none}} is now {{cmd|difficulty normal|link=none}}.|{{cmd|difficulty p|link=none}} is now {{cmd|difficulty peaceful|link=none}}.|The player can now query for the current difficulty by using {{cmd|difficulty|link=none}} without any arguments.}}
}}
}}


=== ''Bedrock Edition'' ===
=== ''Bedrock Edition'' ===
{{HistoryTable
{{HistoryTable
|{{MC/HistoryLine|pocket}}
|{{HistoryLine|pocket}}
|{{HistoryLine||1.0.5|dev=alpha 1.0.5.0|Added {{MC/Cmd|difficulty|link=none}}.}}
|{{HistoryLine||1.0.5|dev=alpha 1.0.5.0|Added {{cmd|difficulty|link=none}}.}}
}}
}}


== See also ==
== See also ==
* {{MC/Cmd|gamemode}} – changes a player's game mode (Creative, Survival, etc.)
* {{cmd|gamemode}} – changes a player's game mode (Creative, Survival, etc.)


== External links ==
== External links ==
Line 74: Line 74:


== Navigation ==
== Navigation ==
{{MC/Navbox commands}}
{{Navbox commands}}


de:Befehl/difficulty
[[Minecraft:de:Befehl/difficulty]]
es:Comandos/difficulty
[[Minecraft:es:Comandos/difficulty]]
ja:コマンド/difficulty
[[Minecraft:fr:Commandes/difficulty]]
ko:명령어/difficulty
[[Minecraft:ja:コマンド/difficulty]]
pt:Comandos/difficulty
[[Minecraft:ko:명령어/difficulty]]
ru:Команды консоли/difficulty
[[Minecraft:pt:Comandos/difficulty]]
uk:Команди консолі/difficulty
[[Minecraft:ru:Команды консоли/difficulty]]
zh:命令/difficulty
[[Minecraft:uk:Команди консолі/difficulty]]
[[Minecraft:zh:命令/difficulty]]

Latest revision as of 11:04, 9 May 2026

Template:Infobox command

Sets or queries the difficulty level (peaceful, easy, etc.).

Usage

On a multiplayer server difficulty lasts only until the server is restarted — on restart, difficulty is reloaded from Minecraft:server.properties.

In Minecraft:Hardcore mode, the difficulty doesn't change even when successful.Template:Only

Syntax

  • Java Edition
difficulty [peaceful|easy|normal|hard]
  • Bedrock Edition
difficulty <difficulty: Difficulty>
difficulty <difficulty: int>

Arguments

Template:El: Template:Code
Template:El: Template:Argument and Template:Argument

Specifies the new difficulty level. Must be one of the following:
If unspecified, queries the current difficulty instead of changing it.Template:Only

Result

Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table

Output

Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table

Examples

History

Template:Expand section

Java Edition

Template:HistoryTable

Bedrock Edition

Template:HistoryTable

See also

  • Template:Cmd – changes a player's game mode (Creative, Survival, etc.)

External links

Navigation

Template:Navbox commands

Minecraft:de:Befehl/difficulty Minecraft:es:Comandos/difficulty Minecraft:fr:Commandes/difficulty Minecraft:ja:コマンド/difficulty Minecraft:ko:명령어/difficulty Minecraft:pt:Comandos/difficulty Minecraft:ru:Команды консоли/difficulty Minecraft:uk:Команди консолі/difficulty Minecraft:zh:命令/difficulty