49        if(count($args) === 0){
 
   50            if($sender instanceof 
Player){
 
   51                $location = $sender->getPosition();
 
   52                $world = $location->getWorld();
 
   53                $pos = $location->asVector3()->floor();
 
   55                $sender->sendMessage(TextFormat::RED . 
"You can only perform this command as a player");
 
   59        }elseif(count($args) === 3){
 
   60            if($sender instanceof 
Player){
 
   61                $base = $sender->getPosition();
 
   62                $world = $base->getWorld();
 
   64                $base = 
new Vector3(0.0, 0.0, 0.0);
 
   65                $world = $sender->getServer()->getWorldManager()->getDefaultWorld();
 
   68                $this->getRelativeDouble($base->x, $sender, $args[0]),
 
   69                $this->getRelativeDouble($base->y, $sender, $args[1], World::Y_MIN, World::Y_MAX),
 
   70                $this->getRelativeDouble($base->z, $sender, $args[2]),
 
   76        $world->setSpawnLocation($pos);
 
   78        Command::broadcastCommandMessage($sender, KnownTranslationFactory::commands_setworldspawn_success((
string) $pos->x, (
string) $pos->y, (
string) $pos->z));