The dedicated server / integrated server class.
More...
#include <SDK.h>
|
| ServerLevel * | getLevel (int dimension) |
| | Get the ServerLevel for a dimension.
|
|
PlayerList * | getPlayers () |
| | Get the PlayerList containing all connected ServerPlayers.
|
|
class CommandDispatcher * | getCommandDispatcher () |
| | Get the server's CommandDispatcher.
|
|
bool | isPvpAllowed () |
| | Check if PvP is currently allowed.
|
|
void | setPvpAllowed (bool pvp) |
| | Enable or disable PvP.
|
|
bool | isFlightAllowed () |
| | Check if flight is allowed.
|
|
void | setFlightAllowed (bool allowFlight) |
| | Enable or disable flight.
|
|
bool | isNetherEnabled () |
| | Check if the Nether is enabled.
|
|
bool | isHardcore () |
| | Check if hardcore mode is active.
|
|
bool | isCommandBlockEnabled () |
| | Check if command blocks are enabled.
|
|
int | getMaxBuildHeight () |
| | Get the max build height (default 256).
|
|
void | setMaxBuildHeight (int height) |
| | Set the max build height.
|
|
int | getPlayerIdleTimeout () |
| | Get player idle timeout in minutes.
|
|
void | setPlayerIdleTimeout (int minutes) |
| | Set player idle timeout.
|
|
void | broadcastStartSavingPacket () |
| | Broadcast start-saving packet to all clients.
|
|
void | broadcastStopSavingPacket () |
| | Broadcast stop-saving packet to all clients.
|
|
void | info (const wstring &string) |
| | Log an info message to the server console.
|
|
void | warn (const wstring &string) |
| | Log a warning to the server console.
|
|
void | handleConsoleInput (const wstring &msg, class ConsoleInputSource *source) |
| | Handle a console command string.
|
|
|
static MinecraftServer * | getInstance () |
| | Returns the global MinecraftServer instance.
|
| static void | SetTimeOfDay (__int64 time) |
| | Set the world time at the end of the current tick.
|
| static void | SetTime (__int64 time) |
| | Set the absolute world time at the end of the current tick.
|
|
static bool | serverHalted () |
| | Whether the server has been halted.
|
|
static void | HaltServer (bool bPrimaryPlayerSignedOut=false) |
| | Halt the server.
|
|
|
int | tickCount |
| | Current tick count.
|
|
bool | animals |
| | True if animals spawn.
|
|
bool | npcs |
| | True if NPCs (villagers etc.) spawn.
|
|
bool | pvp |
| | True if PvP is allowed.
|
|
bool | allowFlight |
| | True if flight is allowed.
|
|
wstring | motd |
| | Server MOTD string.
|
The dedicated server / integrated server class.
Obtain via SDK::GetServer() or MinecraftServer::getInstance().
Definition at line 29 of file MinecraftServer.h.
◆ getLevel()
| ServerLevel * MinecraftServer::getLevel |
( |
int | dimension | ) |
|
Get the ServerLevel for a dimension.
- Parameters
-
| dimension | 0 = Overworld, -1 = Nether, 1 = End. |
- Returns
- ServerLevel pointer or nullptr.
◆ SetTime()
| void MinecraftServer::SetTime |
( |
__int64 | time | ) |
|
|
static |
Set the absolute world time at the end of the current tick.
- Parameters
-
◆ SetTimeOfDay()
| void MinecraftServer::SetTimeOfDay |
( |
__int64 | time | ) |
|
|
static |
Set the world time at the end of the current tick.
- Parameters
-
| time | Ticks (0=dawn, 6000=noon, 12000=dusk, 18000=midnight). |
The documentation for this class was generated from the following files: