#ifndef GAMESERVER_H #define GAMESERVER_H #include "commands/CommandManager.h" #include "common/world/World.h" #include "memory/UniquePointer.h" #include "network/Packet.h" #include "raw-terminal/RawReader.h" #include "server/commands/ServerState.h" #include "utils/Clock.h" #include "utils/List.h" class GameServer final { ServerState state; Clock tps; RawReader<256, 10> reader; CommandManager commandManager; BlockRegistry blocks; List> worlds; public: GameServer(Server& server); void tick(); void onConnect(Server::Client& client); void onDisconnect(Server::Client& client); void onPacket(Server::Client& client, InPacket& in); bool isRunning() const; private: void handleCommands(); }; #endif