Direct answer

Use difficulty for world difficulty and defaultgamemode for the gamemode assigned to new logins; they are separate controls.

Recommended procedure

  1. For a Java server, check the current difficulty with /difficulty and set a supported choice such as /difficulty hard.
  2. Check /defaultgamemode and optionally set /defaultgamemode survival. Existing players may keep their current gamemode unless separately changed.
  3. When editing server.properties offline, use the documented difficulty, gamemode and force-gamemode properties for your version.

Why this matters

Most server properties are simple, but their meaning can change between releases and software forks. Use the current reference for the version you actually run.

Important limitation: Changing difficulty or gamemode can affect gameplay and data; announce the change and back up before large policy changes.

How to verify the result

  • Join with a new test player and then an existing player; verify the intended behavior rather than assuming every account was changed.

Version and compatibility notes

  • When a setting, command, or file name differs from this guide, stop and check the documentation for your exact Minecraft/server-software version instead of forcing an old example.

Official references

These sources were checked for the current MSH revision. Version-sensitive details should always be confirmed against the project documentation for the release you run.

Was this article helpful?
Help us improve this article

Tell us what is missing, unclear, outdated, or incorrect. You can also suggest something we should add.

What could we improve?
Do not include passwords, server IPs, or other private information.0 / 1000