Take the 2-minute tour ×
Arqade is a question and answer site for passionate videogamers on all platforms. It's 100% free, no registration required.

Is it possible to change the difficulty of a Minecraft server while it is running?

share|improve this question
    
I'm interested about this matter as well... –  Lysarion Mar 24 '11 at 16:11
    
The problem with being able to change difficulty while keeping the server up is that it requires the server to know when the server.properties file changes. That capability is largely OS dependent. Java might handle the OS dependent part (I'm no expert), but Notch likely hasn't considered it an issue with the server. –  Sadly Not Mar 24 '11 at 20:11
    
do you mean like in "whether monsters are spawned or not"? Because you can obviously change the difficulty setting to change how much damage is caused. But actually I never tested what peaceful + spawn.mobs=true does.. –  Zommuter Mar 24 '11 at 20:42
    
peaceful + spawn.mobs=true used to spawn agressive non-killable monsters (it was like that last time i tried, about 4 months ago). The problem was, while being unkillable, they could still inflict you some damage... –  Lysarion Mar 25 '11 at 10:14

7 Answers 7

up vote 6 down vote accepted

No, it's not possible. You have to edit the server.properties file and restart the server.

share|improve this answer
    
this should not be the chosen answer –  Panomosh Apr 28 at 11:26
    
@Panomosh Today, yes, but at the time it was answered, it was 100% correct. –  Bryan Apr 28 at 11:41
    
@Bryan didn't notice the 1 year time gap between answers ¬.¬ I'll be going now... –  Panomosh Apr 29 at 9:47

It's possible as of version 1.4.2 (12w32a) with the /difficulty x server command, where x is a number from 0 to 3:

0 = peaceful
1 = easy
2 = normal
3 = hard 

The setting will be saved across restarts.

share|improve this answer
2  
Does this persist across a restart, or does the server.properties file need to be manually edited to match? –  SevenSidedDie Dec 28 '12 at 5:51
1  
From Anonymous "Remove: 4 = hardcore because you can't change to hardcore in game" –  Michel Jan 11 '13 at 11:30
    
@SevenSidedDie No you do not need to restart the server, It is like you are clicking on the Difficulty button in the pause menu. –  Eisler 485 Apr 28 at 4:33
    
@Eisler485 I know you don't have to; I'm asking if it will update the settings file for next restart, or if the change will be forgotten. –  SevenSidedDie Apr 28 at 4:34
1  
@Eisler485 Excellent! Thanks for confirming that. :) –  SevenSidedDie Apr 28 at 4:40

Yes you can change difficulty 'adhoc' using the /difficulty command,

However this does nothing to the server.properties file and upon server restart, the difficulty is reset to that of the properties file.

share|improve this answer

On bukkit servers you can say /server reload.

share|improve this answer

You can try the /difficulty command.


Alternatively, you can edit the server.properties file.

Go to Finder.
Find the server.properties file.
Find difficulty=
Put in any number from 1 to 3.

Then I save it, close the window, and restart the server.

share|improve this answer

Of course it is, /difficulty peaceful, if you are not opped open the command console for your server and type the same thing.

share|improve this answer

I use the command /difficulty _____ (peaceful, easy, normal, hard) all the time on my server. It works instantly.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.