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

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


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


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.