public function onCompletion(Server $server) { $hub = DynamicHub::getInstance($server); if ($hub !== null) { $game = $hub->getLoadedGame($this->gameName); if ($game instanceof MatchBasedGame) { $match = $game->getMatchById($this->matchId); if ($match !== null) { $match->onMapLoaded($this->getResult()); } } } }
public function onEnable() { $hub = DynamicHub::getInstance($this->getServer()); $hub->loadGame($this->game = new CTFGame($this)); }