Example #1
0
 protected function run(Session $ses, array $args)
 {
     if (!$ses->switchSession(Session::SESSION_GAME_HUB)) {
         return TextFormat::RED . "Failed to quit - you are not in a game, or your game refused to let you go.";
     }
     $ses->teleport(Settings::loginSpawn($this->getPlugin()->getServer()));
     return TextFormat::GREEN . "You are now at hub.";
 }