47        if(count($args) !== 1){
 
   51        $difficulty = World::getDifficultyFromString($args[0]);
 
   53        if($sender->getServer()->isHardcore()){
 
   54            $difficulty = World::DIFFICULTY_HARD;
 
   57        if($difficulty !== -1){
 
   58            $sender->getServer()->getConfigGroup()->setConfigInt(ServerProperties::DIFFICULTY, $difficulty);
 
   61            foreach($sender->getServer()->getWorldManager()->getWorlds() as $world){
 
   62                $world->setDifficulty($difficulty);
 
   65            Command::broadcastCommandMessage($sender, KnownTranslationFactory::commands_difficulty_success((
string) $difficulty));