Mineserver
A rewrite of Minecraft 1.8.9 in C++ !
Loading...
Searching...
No Matches
server.h
Go to the documentation of this file.
1
12#ifndef MINESERVER_SERVER_H
13#define MINESERVER_SERVER_H
14
15#include <plugins/plugins.h>
16#include <plugins/event.h>
17#include <utils/network.h>
18#include <types/chatmessage.h>
19#include <cmd/commands.h>
20#include <cmd/console.h>
21#include <client.h>
22#include <atomic>
23#include <list>
24
32class Server
33{
34private:
35 static Server *INSTANCE;
36 std::list<Client *> connectedClients;
37 PluginsManager pluginsManager;
38 EventsManager eventsManager;
39 CommandsManager commandsManager;
40 ConsoleManager consoleManager;
41 ServerSocket sock;
42 std::atomic<bool> running;
43
51 static void checks();
52
53public:
58 Server();
63 ~Server();
64
71 void start();
78 void stop();
79
80 bool isRunning() const {
81 return running;
82 }
83
90 static Server *inst()
91 {
92 return INSTANCE;
93 }
94};
95
96#endif // MINESERVER_SERVER_H
The file containing minecraft chat message implementation.
Commands Manager.
Definition commands.h:138
Console manager.
Definition console.h:25
Manager for Events.
Definition event.h:224
Plugin Manager.
Definition plugins.h:71
Network POSIX Server.
Definition network.h:164
Server Class.
Definition server.h:33
void stop()
Stops the server.
Definition server.cpp:109
static Server * inst()
Get the instance of the server.
Definition server.h:90
~Server()
Destroy the Server object.
Definition server.cpp:47
void start()
Starts the server, blocking.
Definition server.cpp:67
Server()
Construct a new Server object.
Definition server.cpp:20
The file containing the logic for client handling.
The file handling commands logic.
The file handling console logic.
The header-only containing event logic.
The network (TCP) cross-platform implementation.
The file handling plugin system.