/difficulty does not change difficulty when used in singleplayer
when using the /difficulty command in single player the difficulty is not changed accordingly.
Steps to reproduce:
1. open world
2. in the game's menu set difficulty to peaceful
3. in the command box, type "/difficulty easy"
4. try to spawn a monster with a mob egg
the mob will appear and disappear, as it would in peaceful difficulty.