63 void Start(std::unique_ptr<cSettingsRepositoryInterface> a_OverridesRepo);
70 cWorld * GetDefaultWorld(
void);
78 return static_cast<int>(std::chrono::duration_cast<std::chrono::seconds>(std::chrono::steady_clock::now() - m_StartTime).count());
104 static int GetFurnaceFuelBurnTime(
const cItem & a_Fuel);
131 void QueueExecuteConsoleCommand(
const AString & a_Cmd);
137 void KickUser(
int a_ClientID,
const AString & a_Reason);
140 void AuthenticateUser(
int a_ClientID,
const AString & a_Name,
const cUUID & a_UUID,
const Json::Value & a_Properties);
143 void TickCommands(
void);
146 int GetTotalChunkCount(
void);
149 void SaveAllChunks(
void);
152 void SetSavingEnabled(
bool a_SavingEnabled);
167 void SendPlayerLists(
cPlayer * a_DestPlayer);
170 void BroadcastPlayerListsAddPlayer(
const cPlayer & a_Player,
const cClientHandle * a_Exclude =
nullptr);
173 void BroadcastPlayerListsRemovePlayer(
const cPlayer & a_Player,
const cClientHandle * a_Exclude =
nullptr);
190 static AString GetProtocolVersionTextFromInt(
int a_ProtocolVersionNum);
193 static int GetVirtualRAMUsage(
void);
196 static int GetPhysicalRAMUsage(
void);
205 m_Command(a_Command),
252 void LoadGlobalSettings();
256 void LoadPalettes(
const AString & aProtocolFolder);
268 void UnloadWorlds(
void);
271 void DoExecuteConsoleCommand(
const AString & a_Cmd);
275 static void InputThread(
cRoot & a_Params);
cAuthenticator m_Authenticator
BlockTypeRegistry m_BlockTypeRegistry
The storage for all registered block types.
cCriticalSection m_CSPendingCommands
std::unique_ptr< cRankManager > m_RankManager
Stores information on all known block types.
cMonsterConfig * m_MonsterConfig
void BroadcastChatInfo(const AString &a_Message)
cPluginManager * m_PluginManager
std::vector< cCommand > cCommandQueue
AString m_SettingsFilename
which ini file to load settings from, default is settings.ini
void BroadcastChatFailure(const AString &a_Message)
ProtocolPalettes & GetProtocolPalettes() const
Returns the per-protocol palettes manager.
cRankManager * GetRankManager(void)
std::thread m_InputThread
cBrewingRecipes * GetBrewingRecipes(void)
Holds a palette that maps between block type + state and numbers.
void BroadcastChatWarning(const AString &a_Message)
static bool m_TerminateEventRaised
If something has told the server to stop; checked periodically in cRoot.
std::vector< AString > AStringVector
static bool m_RunAsService
If set to true, binary will attempt to run as a service on Windows.
void BroadcastChatFatal(const AString &a_Message)
Container for a single chat message composed of multiple functional parts.
void BroadcastChatSuccess(const AString &a_Message)
const BlockTypePalette & GetUpgradeBlockTypePalette() const
Returns the block type palette used for upgrading blocks from pre-1.13 data.
std::map< AString, cWorld * > WorldMap
cFurnaceRecipe * m_FurnaceRecipe
cCraftingRecipes * m_CraftingRecipes
Loads the protocol-specific palettes on startup and provides them to the individual protocol instance...
cMojangAPI & GetMojangAPI(void)
void BroadcastChatJoin(const AString &a_Message)
BlockTypeRegistry & GetBlockTypeRegistry()
Returns the (read-write) storage for registered block types.
cCommandOutputCallback * m_Output
int GetServerUpTime(void)
Returns the up time of the server in seconds.
The root of the object hierarchy.
void BroadcastChatLeave(const AString &a_Message)
cCraftingRecipes * GetCraftingRecipes(void)
std::atomic_flag m_InputThreadRunFlag
std::chrono::steady_clock::time_point m_StartTime
The current time where the startup of the server has been completed.
cMonsterConfig * GetMonsterConfig(void)
cServer * GetServer(void)
cCommand(const AString &a_Command, cCommandOutputCallback *a_Output)
void BroadcastChatDeath(const AString &a_Message)
std::unique_ptr< ProtocolPalettes > m_ProtocolPalettes
The per-protocol palettes manager.
cAuthenticator & GetAuthenticator(void)
cWebAdmin * GetWebAdmin(void)
cFurnaceRecipe * GetFurnaceRecipe(void)
std::unique_ptr< cBrewingRecipes > m_BrewingRecipes
Interface for a callback that receives command output The Out() function is called for any output the...
std::unique_ptr< BlockTypePalette > m_UpgradeBlockTypePalette
The upgrade palette for pre-1.13 blocks.
cCommandQueue m_PendingCommands
cPluginManager * GetPluginManager(void)