public class DedicatedServer extends MinecraftServer implements IServer
| Modifier and Type | Field and Description |
|---|---|
static boolean |
allowPlayerLogins |
java.util.List<PendingCommand> |
pendingCommandList |
commandManager, currentTask, futureTaskQueue, percentDone, serverProxy, theProfiler, tickTimeArray, USER_CACHE_FILE, worlds, worldTickTimes| Constructor and Description |
|---|
DedicatedServer(java.io.File anvilFileIn,
DataFixer dataFixerIn,
YggdrasilAuthenticationService authServiceIn,
MinecraftSessionService sessionServiceIn,
GameProfileRepository profileRepoIn,
PlayerProfileCache profileCacheIn) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPendingCommand(java.lang.String input,
ICommandSender sender) |
CrashReport |
addServerInfoToCrashReport(CrashReport report)
Adds the server info, including from theWorldServer, to the crash report.
|
void |
addServerStatsToSnooper(Snooper playerSnooper) |
boolean |
allowSpawnMonsters() |
boolean |
canStructuresSpawn() |
protected boolean |
convertFiles() |
void |
executePendingCommands() |
boolean |
getAllowNether() |
boolean |
getBooleanProperty(java.lang.String key,
boolean defaultValue)
Gets a boolean property.
|
EnumDifficulty |
getDifficulty()
Get the server's difficulty
|
GameType |
getGameType() |
boolean |
getGuiEnabled() |
java.lang.String |
getHostname()
Returns the server's hostname.
|
int |
getIntProperty(java.lang.String key,
int defaultValue)
Gets an integer property.
|
long |
getMaxTickTime() |
int |
getMaxWorldSize() |
java.lang.String |
getMotd()
Returns the server message of the day
|
int |
getNetworkCompressionThreshold()
The compression treshold.
|
int |
getOpPermissionLevel() |
DedicatedPlayerList |
getPlayerList() |
java.lang.String |
getPlugins()
Used by RCon's Query in the form of "MajorServerMod 1.2.3: MyPlugin 1.3; AnotherPlugin 2.1; AndSoForth 1.0".
|
int |
getPort()
Never used, but "getServerPort" is already taken.
|
java.lang.String |
getSettingsFilename()
Returns the filename where server properties are stored
|
int |
getSpawnProtectionSize()
Return the spawn protection area's size.
|
java.lang.String |
getStringProperty(java.lang.String key,
java.lang.String defaultValue)
Gets a string property.
|
java.lang.String |
handleRConCommand(java.lang.String command)
Handle a command received by an RCon instance
|
boolean |
init()
Initialises the server and starts it.
|
boolean |
isAnnouncingPlayerAchievements() |
boolean |
isBlockProtected(World worldIn,
BlockPos pos,
EntityPlayer playerIn) |
boolean |
isCommandBlockEnabled()
Return whether command blocks are enabled.
|
boolean |
isDedicatedServer() |
boolean |
isHardcore()
Defaults to false.
|
boolean |
isSnooperEnabled()
Returns whether snooping is enabled or not.
|
java.lang.String |
loadResourcePackSHA() |
void |
saveProperties()
Saves all of the server properties to the properties file.
|
void |
sendMessage(ITextComponent message)
Send a chat message to the CommandSender
|
void |
setGameType(GameType gameMode)
Sets the game type for all worlds.
|
void |
setGuiEnabled() |
void |
setPlayerIdleTimeout(int idleTimeout) |
void |
setProperty(java.lang.String key,
java.lang.Object value)
Saves an Object with the given property name.
|
java.lang.String |
shareToLAN(GameType type,
boolean allowCheats)
On dedicated does nothing.
|
boolean |
shouldBroadcastConsoleToOps()
Get if console command events should be broadcast to ops
|
boolean |
shouldBroadcastRconToOps()
Get if RCON command events should be broadcast to ops
|
boolean |
shouldUseNativeTransport()
Get if native transport should be used.
|
void |
systemExitNow()
Directly calls System.exit(0), instantly killing the program.
|
void |
updateTimeLightAndEntities() |
addScheduledTask, addServerTypeToSnooper, applyServerIconToResponse, callFromMainThread, canCreateBonusChest, canUseCommand, clearCurrentTask, convertMapIfNeeded, createCommandManager, enableProfiling, finalTick, getActiveAnvilConverter, getBuildLimit, getCanSpawnAnimals, getCanSpawnNPCs, getCommandManager, getCommandSenderEntity, getCurrentPlayerCount, getCurrentTime, getCurrentTimeMillis, getDataDirectory, getDataFixer, getDisplayName, getEntityFromUuid, getEntityWorld, getFile, getFolderName, getForceGamemode, getGameProfileRepository, getKeyPair, getMaxPlayerIdleMinutes, getMaxPlayers, getMinecraftSessionService, getMinecraftVersion, getMOTD, getName, getNetworkSystem, getOnlinePlayerNames, getOnlinePlayerProfiles, getPlayerProfileCache, getPlayerUsageSnooper, getPosition, getPositionVector, getPreventProxyConnections, getResourcePackHash, getResourcePackUrl, getServer, getServerHostname, getServerModName, getServerOwner, getServerPort, getServerProxy, getServerStatusResponse, getServerThread, getSpawnRadius, getTabCompletions, getTickCounter, getUserMessage, getWorldIconFile, getWorldName, initialWorldChunkLoad, initiateShutdown, isAnvilFileSet, isCallingFromMinecraftThread, isDebuggingEnabled, isDemo, isFlightAllowed, isPVPEnabled, isServerInOnlineMode, isServerRunning, isServerStopped, isSinglePlayer, isWorldIconSet, loadAllWorlds, logDebug, logInfo, logSevere, logWarning, main, outputPercentRemaining, refreshStatusNextTick, registerTickable, run, saveAllWorlds, sendCommandFeedback, serverIsInRunLoop, setAllowFlight, setAllowPvp, setBuildLimit, setCanSpawnAnimals, setCanSpawnNPCs, setCommandStat, setDemo, setDifficultyForAllWorlds, setFolderName, setForceGamemode, setHostname, setKeyPair, setMOTD, setOnlineMode, setPlayerList, setPreventProxyConnections, setResourcePack, setResourcePackFromWorld, setServerOwner, setServerPort, setUserMessage, setWorldName, startServerThread, stopServer, tick, worldServerForDimensionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCurrentPlayerCount, getFolderName, getMaxPlayers, getMinecraftVersion, getOnlinePlayerNames, isDebuggingEnabled, logDebug, logInfo, logSevere, logWarningpublic final java.util.List<PendingCommand> pendingCommandList
public static boolean allowPlayerLogins
public DedicatedServer(java.io.File anvilFileIn,
DataFixer dataFixerIn,
YggdrasilAuthenticationService authServiceIn,
MinecraftSessionService sessionServiceIn,
GameProfileRepository profileRepoIn,
PlayerProfileCache profileCacheIn)
public boolean init()
throws java.io.IOException
init in class MinecraftServerjava.io.IOExceptionpublic java.lang.String loadResourcePackSHA()
public void setGameType(GameType gameMode)
setGameType in class MinecraftServerpublic boolean canStructuresSpawn()
canStructuresSpawn in class MinecraftServerpublic GameType getGameType()
getGameType in class MinecraftServerpublic EnumDifficulty getDifficulty()
getDifficulty in class MinecraftServerpublic boolean isHardcore()
isHardcore in class MinecraftServerpublic CrashReport addServerInfoToCrashReport(CrashReport report)
addServerInfoToCrashReport in class MinecraftServerpublic void systemExitNow()
systemExitNow in class MinecraftServerpublic void updateTimeLightAndEntities()
updateTimeLightAndEntities in class MinecraftServerpublic boolean getAllowNether()
getAllowNether in class MinecraftServerpublic boolean allowSpawnMonsters()
allowSpawnMonsters in class MinecraftServerpublic void addServerStatsToSnooper(Snooper playerSnooper)
addServerStatsToSnooper in interface ISnooperInfoaddServerStatsToSnooper in class MinecraftServerpublic boolean isSnooperEnabled()
isSnooperEnabled in interface ISnooperInfoisSnooperEnabled in class MinecraftServerpublic void addPendingCommand(java.lang.String input,
ICommandSender sender)
public void executePendingCommands()
public boolean isDedicatedServer()
isDedicatedServer in class MinecraftServerpublic boolean shouldUseNativeTransport()
shouldUseNativeTransport in class MinecraftServerpublic DedicatedPlayerList getPlayerList()
getPlayerList in class MinecraftServerpublic int getIntProperty(java.lang.String key,
int defaultValue)
getIntProperty in interface IServerpublic java.lang.String getStringProperty(java.lang.String key,
java.lang.String defaultValue)
getStringProperty in interface IServerpublic boolean getBooleanProperty(java.lang.String key,
boolean defaultValue)
public void setProperty(java.lang.String key,
java.lang.Object value)
setProperty in interface IServerpublic void saveProperties()
saveProperties in interface IServerpublic java.lang.String getSettingsFilename()
getSettingsFilename in interface IServerpublic java.lang.String getHostname()
getHostname in interface IServerpublic int getPort()
public java.lang.String getMotd()
public void setGuiEnabled()
public boolean getGuiEnabled()
getGuiEnabled in class MinecraftServerpublic java.lang.String shareToLAN(GameType type, boolean allowCheats)
shareToLAN in class MinecraftServerpublic boolean isCommandBlockEnabled()
isCommandBlockEnabled in class MinecraftServerpublic int getSpawnProtectionSize()
getSpawnProtectionSize in class MinecraftServerpublic boolean isBlockProtected(World worldIn, BlockPos pos, EntityPlayer playerIn)
isBlockProtected in class MinecraftServerpublic int getOpPermissionLevel()
getOpPermissionLevel in class MinecraftServerpublic void setPlayerIdleTimeout(int idleTimeout)
setPlayerIdleTimeout in class MinecraftServerpublic boolean shouldBroadcastRconToOps()
shouldBroadcastRconToOps in class MinecraftServerpublic boolean shouldBroadcastConsoleToOps()
shouldBroadcastConsoleToOps in class MinecraftServerpublic boolean isAnnouncingPlayerAchievements()
isAnnouncingPlayerAchievements in class MinecraftServerpublic int getMaxWorldSize()
getMaxWorldSize in class MinecraftServerpublic int getNetworkCompressionThreshold()
getNetworkCompressionThreshold in class MinecraftServerpublic void sendMessage(ITextComponent message)
MinecraftServersendMessage in interface ICommandSendersendMessage in class MinecraftServerprotected boolean convertFiles()
throws java.io.IOException
java.io.IOExceptionpublic long getMaxTickTime()
public java.lang.String getPlugins()
getPlugins in interface IServerpublic java.lang.String handleRConCommand(java.lang.String command)
handleRConCommand in interface IServer