Package net.minecraft.server
Class MinecraftServer
- java.lang.Object
-
- net.minecraft.util.concurrent.ThreadTaskExecutor<R>
-
- net.minecraft.util.concurrent.RecursiveEventLoop<TickDelayedTask>
-
- net.minecraft.server.MinecraftServer
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,java.util.concurrent.Executor
,ICommandSource
,ISnooperInfo
,ITaskExecutor<TickDelayedTask>
- Direct Known Subclasses:
DedicatedServer
,IntegratedServer
public abstract class MinecraftServer extends RecursiveEventLoop<TickDelayedTask> implements ISnooperInfo, ICommandSource, java.lang.AutoCloseable
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
allowFlight
private float
averageTickTime
private CommandStorage
commandStorage
private NetworkSystem
connection
private TimeTracker
continousProfiler
private CustomServerBossInfoManager
customBossEvents
private long
delayedTasksMaxNextTickTime
private boolean
delayProfilerStart
static WorldSettings
DEMO_SETTINGS
private boolean
enforceWhitelist
private java.util.concurrent.Executor
executor
private com.mojang.datafixers.DataFixer
fixerUpper
private boolean
forceGameType
private FrameTimer
frameTimer
private FunctionManager
functionManager
private boolean
hasWorldScreenshot
private boolean
isDemo
private boolean
isReady
private java.security.KeyPair
keyPair
private long
lastOverloadWarning
private long
lastServerStatus
private java.util.Map<RegistryKey<World>,ServerWorld>
levels
private java.lang.String
localIp
private static org.apache.logging.log4j.Logger
LOGGER
private int
maxBuildHeight
private boolean
mayHaveDelayedTasks
private java.lang.String
motd
protected long
nextTickTime
private boolean
onlineMode
private ResourcePackList
packRepository
private java.util.Map<RegistryKey<World>,long[]>
perWorldTickTimes
protected PlayerData
playerDataStorage
private int
playerIdleTimeout
private PlayerList
playerList
private int
port
private boolean
preventProxyConnections
private PlayerProfileCache
profileCache
private IProfiler
profiler
private com.mojang.authlib.GameProfileRepository
profileRepository
private IChunkStatusListenerFactory
progressListenerFactory
protected java.net.Proxy
proxy
private boolean
pvp
private java.util.Random
random
protected DynamicRegistries.Impl
registryHolder
private java.lang.String
resourcePack
private java.lang.String
resourcePackHash
private DataPackRegistries
resources
private boolean
running
private ServerScoreboard
scoreboard
private java.lang.String
serverId
private java.lang.Thread
serverThread
private com.mojang.authlib.minecraft.MinecraftSessionService
sessionService
private java.lang.String
singleplayerName
private Snooper
snooper
private ServerStatusResponse
status
private boolean
stopped
protected SaveFormat.LevelSave
storageSource
private TemplateManager
structureManager
private java.util.List<java.lang.Runnable>
tickables
private int
tickCount
long[]
tickTimes
static java.io.File
USERID_CACHE_FILE
private ServerWorld[]
worldArray
private int
worldArrayLast
private int
worldArrayMarker
protected IServerConfiguration
worldData
-
Fields inherited from interface net.minecraft.command.ICommandSource
NULL
-
-
Constructor Summary
Constructors Constructor Description MinecraftServer(java.lang.Thread p_i232576_1_, DynamicRegistries.Impl p_i232576_2_, SaveFormat.LevelSave p_i232576_3_, IServerConfiguration p_i232576_4_, ResourcePackList p_i232576_5_, java.net.Proxy p_i232576_6_, com.mojang.datafixers.DataFixer p_i232576_7_, DataPackRegistries p_i232576_8_, com.mojang.authlib.minecraft.MinecraftSessionService p_i232576_9_, com.mojang.authlib.GameProfileRepository p_i232576_10_, PlayerProfileCache p_i232576_11_, IChunkStatusListenerFactory p_i232576_12_)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
acceptsFailure()
boolean
acceptsSuccess()
void
addTickable(java.lang.Runnable p_82010_1_)
boolean
areNpcsEnabled()
void
close()
static DatapackCodec
configurePackRepository(ResourcePackList p_240772_0_, DatapackCodec p_240772_1_, boolean p_240772_2_)
static void
convertFromRegionFormatIfNeeded(SaveFormat.LevelSave p_240777_0_)
CommandSource
createCommandSourceStack()
protected void
createLevels(IChunkStatusListener p_240787_1_)
IChatFilter
createTextFilterForPlayer(ServerPlayerEntity p_244435_1_)
protected void
detectBundledResources()
protected void
doRunTask(TickDelayedTask p_213166_1_)
private void
dumpClasspath(java.nio.file.Path p_223706_1_)
private void
dumpCrashCategory(java.nio.file.Path p_223709_1_)
private void
dumpGameRules(java.nio.file.Path p_223708_1_)
private void
dumpMiscStats(java.nio.file.Path p_223710_1_)
private void
dumpThreads(java.nio.file.Path p_223712_1_)
private void
endProfilerTick(LongTickDetector p_240795_1_)
CrashReport
fillReport(CrashReport p_71230_1_)
IProfileResult
finishProfiling()
protected void
forceDifficulty()
boolean
forceSynchronousWrites()
java.util.Map<RegistryKey<World>,ServerWorld>
forgeGetWorldMap()
Deprecated.int
getAbsoluteMaxWorldSize()
AdvancementManager
getAdvancements()
java.lang.Iterable<ServerWorld>
getAllLevels()
float
getAverageTickTime()
Commands
getCommands()
CommandStorage
getCommandStorage()
int
getCompressionThreshold()
NetworkSystem
getConnection()
CustomServerBossInfoManager
getCustomBossEvents()
DataPackRegistries
getDataPackRegistries()
GameType
getDefaultGameType()
java.io.File
getFile(java.lang.String p_71209_1_)
com.mojang.datafixers.DataFixer
getFixerUpper()
boolean
getForceGameType()
FrameTimer
getFrameTimer()
abstract int
getFunctionCompilationLevel()
FunctionManager
getFunctions()
GameRules
getGameRules()
java.security.KeyPair
getKeyPair()
ServerWorld
getLevel(RegistryKey<World> p_71218_1_)
java.lang.String
getLocalIp()
LootTableManager
getLootTables()
int
getMaxBuildHeight()
int
getMaxPlayers()
abstract java.util.Optional<java.lang.String>
getModdedStatus()
java.lang.String
getMotd()
long
getNextTickTime()
abstract int
getOperatorUserPermissionLevel()
ResourcePackList
getPackRepository()
int
getPlayerCount()
int
getPlayerIdleTimeout()
PlayerList
getPlayerList()
java.lang.String[]
getPlayerNames()
int
getPort()
LootPredicateManager
getPredicateManager()
boolean
getPreventProxyConnections()
PlayerProfileCache
getProfileCache()
int
getProfilePermissions(com.mojang.authlib.GameProfile p_211833_1_)
IProfiler
getProfiler()
com.mojang.authlib.GameProfileRepository
getProfileRepository()
abstract int
getRateLimitPacketsPerSecond()
RecipeManager
getRecipeManager()
java.lang.String
getResourcePack()
java.lang.String
getResourcePackHash()
java.lang.Thread
getRunningThread()
int
getScaledTrackingDistance(int p_230512_1_)
ServerScoreboard
getScoreboard()
private static DatapackCodec
getSelectedPacks(ResourcePackList p_240771_0_)
java.io.File
getServerDirectory()
java.lang.String
getServerModName()
java.lang.String
getServerVersion()
com.mojang.authlib.minecraft.MinecraftSessionService
getSessionService()
java.lang.String
getSingleplayerName()
Snooper
getSnooper()
int
getSpawnProtectionRadius()
int
getSpawnRadius(ServerWorld p_184108_1_)
ServerStatusResponse
getStatus()
TemplateManager
getStructureManager()
ITagCollectionSupplier
getTags()
int
getTickCount()
long[]
getTickTime(RegistryKey<World> dim)
private ServerWorld[]
getWorldArray()
IServerConfiguration
getWorldData()
java.nio.file.Path
getWorldPath(FolderName p_240776_1_)
java.io.File
getWorldScreenshotFile()
void
halt(boolean p_71263_1_)
boolean
hasGui()
boolean
hasWorldScreenshot()
private boolean
haveTime()
protected void
initializeKeyPair()
protected abstract boolean
initServer()
void
invalidateStatus()
abstract boolean
isCommandBlockEnabled()
abstract boolean
isDedicatedServer()
boolean
isDemo()
boolean
isEnforceWhitelist()
abstract boolean
isEpollEnabled()
boolean
isFlightAllowed()
boolean
isHardcore()
boolean
isNetherEnabled()
boolean
isProfiling()
abstract boolean
isPublished()
boolean
isPvpAllowed()
boolean
isReady()
boolean
isRunning()
boolean
isShutdown()
boolean
isSingleplayer()
abstract boolean
isSingleplayerOwner(com.mojang.authlib.GameProfile p_213199_1_)
boolean
isSpawningAnimals()
protected boolean
isSpawningMonsters()
boolean
isStopped()
boolean
isUnderSpawnProtection(ServerWorld p_175579_1_, BlockPos p_175579_2_, PlayerEntity p_175579_3_)
void
kickUnlistedPlayers(CommandSource p_205743_1_)
java.util.Set<RegistryKey<World>>
levelKeys()
protected void
loadLevel()
void
markWorldsDirty()
Deprecated.protected void
onServerCrash(CrashReport p_71228_1_)
protected void
onServerExit()
ServerWorld
overworld()
boolean
pollTask()
private boolean
pollTaskInternal()
void
populateSnooper(Snooper p_70000_1_)
private void
prepareLevels(IChunkStatusListener p_213186_1_)
abstract boolean
publishServer(GameType p_195565_1_, boolean p_195565_2_, int p_195565_3_)
private void
readScoreboard(DimensionSavedDataManager p_213204_1_)
DynamicRegistries
registryAccess()
java.util.concurrent.CompletableFuture<java.lang.Void>
reloadResources(java.util.Collection<java.lang.String> p_240780_1_)
boolean
repliesToStatus()
protected void
runServer()
boolean
saveAllChunks(boolean p_213211_1_, boolean p_213211_2_, boolean p_213211_3_)
void
saveDebugReport(java.nio.file.Path p_223711_1_)
boolean
scheduleExecutables()
private void
sendDifficultyUpdate(ServerPlayerEntity p_213189_1_)
void
sendMessage(ITextComponent p_145747_1_, java.util.UUID p_145747_2_)
void
setDefaultGameType(GameType p_71235_1_)
void
setDemo(boolean p_71204_1_)
void
setDifficulty(Difficulty p_147139_1_, boolean p_147139_2_)
void
setDifficultyLocked(boolean p_213209_1_)
void
setEnforceWhitelist(boolean p_205741_1_)
void
setFlightAllowed(boolean p_71245_1_)
void
setForceGameType(boolean p_104055_1_)
protected void
setId(java.lang.String p_213208_1_)
private static void
setInitialSpawn(ServerWorld p_240786_0_, IServerWorldInfo p_240786_1_, boolean p_240786_2_, boolean p_240786_3_, boolean p_240786_4_)
void
setLocalIp(java.lang.String p_71189_1_)
void
setMaxBuildHeight(int p_71191_1_)
void
setMotd(java.lang.String p_71205_1_)
void
setPlayerIdleTimeout(int p_143006_1_)
void
setPlayerList(PlayerList p_184105_1_)
void
setPort(int p_71208_1_)
void
setPreventProxyConnections(boolean p_190517_1_)
void
setPvpAllowed(boolean p_71188_1_)
void
setResourcePack(java.lang.String p_180507_1_, java.lang.String p_180507_2_)
void
setSingleplayerName(java.lang.String p_71224_1_)
private void
setupDebugLevel(IServerConfiguration p_240778_1_)
void
setUsesAuthentication(boolean p_71229_1_)
abstract boolean
shouldRconBroadcast()
protected boolean
shouldRun(TickDelayedTask p_212874_1_)
static <S extends MinecraftServer>
Sspin(java.util.function.Function<java.lang.Thread,S> p_240784_0_)
private void
startProfilerTick(LongTickDetector p_240773_1_)
void
startProfiling()
protected void
stopServer()
protected void
tickChildren(java.util.function.BooleanSupplier p_71190_1_)
protected void
tickServer(java.util.function.BooleanSupplier p_71217_1_)
private void
updateMobSpawningFlags()
private void
updateStatusIcon(ServerStatusResponse p_184107_1_)
boolean
usesAuthentication()
protected void
waitUntilNextTick()
protected TickDelayedTask
wrapRunnable(java.lang.Runnable p_212875_1_)
-
Methods inherited from class net.minecraft.util.concurrent.RecursiveEventLoop
runningTask
-
Methods inherited from class net.minecraft.util.concurrent.ThreadTaskExecutor
dropAllTasks, execute, executeBlocking, getPendingTasksCount, isSameThread, managedBlock, name, runAllTasks, submit, submit, submitAsync, tell, waitForTasks
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.minecraft.command.ICommandSource
shouldInformAdmins
-
Methods inherited from interface net.minecraft.util.concurrent.ITaskExecutor
ask, askEither
-
-
-
-
Field Detail
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER
-
USERID_CACHE_FILE
public static final java.io.File USERID_CACHE_FILE
-
DEMO_SETTINGS
public static final WorldSettings DEMO_SETTINGS
-
storageSource
protected final SaveFormat.LevelSave storageSource
-
playerDataStorage
protected final PlayerData playerDataStorage
-
snooper
private final Snooper snooper
-
tickables
private final java.util.List<java.lang.Runnable> tickables
-
continousProfiler
private final TimeTracker continousProfiler
-
profiler
private IProfiler profiler
-
connection
private final NetworkSystem connection
-
progressListenerFactory
private final IChunkStatusListenerFactory progressListenerFactory
-
status
private final ServerStatusResponse status
-
random
private final java.util.Random random
-
fixerUpper
private final com.mojang.datafixers.DataFixer fixerUpper
-
localIp
private java.lang.String localIp
-
port
private int port
-
registryHolder
protected final DynamicRegistries.Impl registryHolder
-
levels
private final java.util.Map<RegistryKey<World>,ServerWorld> levels
-
playerList
private PlayerList playerList
-
running
private volatile boolean running
-
stopped
private boolean stopped
-
tickCount
private int tickCount
-
proxy
protected final java.net.Proxy proxy
-
onlineMode
private boolean onlineMode
-
preventProxyConnections
private boolean preventProxyConnections
-
pvp
private boolean pvp
-
allowFlight
private boolean allowFlight
-
motd
@Nullable private java.lang.String motd
-
maxBuildHeight
private int maxBuildHeight
-
playerIdleTimeout
private int playerIdleTimeout
-
tickTimes
public final long[] tickTimes
-
keyPair
@Nullable private java.security.KeyPair keyPair
-
singleplayerName
@Nullable private java.lang.String singleplayerName
-
isDemo
private boolean isDemo
-
resourcePack
private java.lang.String resourcePack
-
resourcePackHash
private java.lang.String resourcePackHash
-
isReady
private volatile boolean isReady
-
lastOverloadWarning
private long lastOverloadWarning
-
delayProfilerStart
private boolean delayProfilerStart
-
forceGameType
private boolean forceGameType
-
sessionService
private final com.mojang.authlib.minecraft.MinecraftSessionService sessionService
-
profileRepository
private final com.mojang.authlib.GameProfileRepository profileRepository
-
profileCache
private final PlayerProfileCache profileCache
-
lastServerStatus
private long lastServerStatus
-
serverThread
private final java.lang.Thread serverThread
-
nextTickTime
protected long nextTickTime
-
delayedTasksMaxNextTickTime
private long delayedTasksMaxNextTickTime
-
mayHaveDelayedTasks
private boolean mayHaveDelayedTasks
-
hasWorldScreenshot
private boolean hasWorldScreenshot
-
packRepository
private final ResourcePackList packRepository
-
scoreboard
private final ServerScoreboard scoreboard
-
commandStorage
@Nullable private CommandStorage commandStorage
-
customBossEvents
private final CustomServerBossInfoManager customBossEvents
-
functionManager
private final FunctionManager functionManager
-
frameTimer
private final FrameTimer frameTimer
-
enforceWhitelist
private boolean enforceWhitelist
-
averageTickTime
private float averageTickTime
-
executor
private final java.util.concurrent.Executor executor
-
serverId
@Nullable private java.lang.String serverId
-
resources
private DataPackRegistries resources
-
structureManager
private final TemplateManager structureManager
-
worldData
protected final IServerConfiguration worldData
-
perWorldTickTimes
private java.util.Map<RegistryKey<World>,long[]> perWorldTickTimes
-
worldArrayMarker
private int worldArrayMarker
-
worldArrayLast
private int worldArrayLast
-
worldArray
private ServerWorld[] worldArray
-
-
Constructor Detail
-
MinecraftServer
public MinecraftServer(java.lang.Thread p_i232576_1_, DynamicRegistries.Impl p_i232576_2_, SaveFormat.LevelSave p_i232576_3_, IServerConfiguration p_i232576_4_, ResourcePackList p_i232576_5_, java.net.Proxy p_i232576_6_, com.mojang.datafixers.DataFixer p_i232576_7_, DataPackRegistries p_i232576_8_, com.mojang.authlib.minecraft.MinecraftSessionService p_i232576_9_, com.mojang.authlib.GameProfileRepository p_i232576_10_, PlayerProfileCache p_i232576_11_, IChunkStatusListenerFactory p_i232576_12_)
-
-
Method Detail
-
spin
public static <S extends MinecraftServer> S spin(java.util.function.Function<java.lang.Thread,S> p_240784_0_)
-
readScoreboard
private void readScoreboard(DimensionSavedDataManager p_213204_1_)
-
initServer
protected abstract boolean initServer() throws java.io.IOException
- Throws:
java.io.IOException
-
convertFromRegionFormatIfNeeded
public static void convertFromRegionFormatIfNeeded(SaveFormat.LevelSave p_240777_0_)
-
loadLevel
protected void loadLevel()
-
forceDifficulty
protected void forceDifficulty()
-
createLevels
protected void createLevels(IChunkStatusListener p_240787_1_)
-
setInitialSpawn
private static void setInitialSpawn(ServerWorld p_240786_0_, IServerWorldInfo p_240786_1_, boolean p_240786_2_, boolean p_240786_3_, boolean p_240786_4_)
-
setupDebugLevel
private void setupDebugLevel(IServerConfiguration p_240778_1_)
-
prepareLevels
private void prepareLevels(IChunkStatusListener p_213186_1_)
-
detectBundledResources
protected void detectBundledResources()
-
getDefaultGameType
public GameType getDefaultGameType()
-
isHardcore
public boolean isHardcore()
-
getOperatorUserPermissionLevel
public abstract int getOperatorUserPermissionLevel()
-
getFunctionCompilationLevel
public abstract int getFunctionCompilationLevel()
-
shouldRconBroadcast
public abstract boolean shouldRconBroadcast()
-
saveAllChunks
public boolean saveAllChunks(boolean p_213211_1_, boolean p_213211_2_, boolean p_213211_3_)
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfaceITaskExecutor<TickDelayedTask>
-
stopServer
protected void stopServer()
-
getLocalIp
public java.lang.String getLocalIp()
-
setLocalIp
public void setLocalIp(java.lang.String p_71189_1_)
-
isRunning
public boolean isRunning()
-
halt
public void halt(boolean p_71263_1_)
-
runServer
protected void runServer()
-
haveTime
private boolean haveTime()
-
waitUntilNextTick
protected void waitUntilNextTick()
-
wrapRunnable
protected TickDelayedTask wrapRunnable(java.lang.Runnable p_212875_1_)
- Specified by:
wrapRunnable
in classThreadTaskExecutor<TickDelayedTask>
-
shouldRun
protected boolean shouldRun(TickDelayedTask p_212874_1_)
- Specified by:
shouldRun
in classThreadTaskExecutor<TickDelayedTask>
-
pollTask
public boolean pollTask()
- Overrides:
pollTask
in classThreadTaskExecutor<TickDelayedTask>
-
pollTaskInternal
private boolean pollTaskInternal()
-
doRunTask
protected void doRunTask(TickDelayedTask p_213166_1_)
- Overrides:
doRunTask
in classRecursiveEventLoop<TickDelayedTask>
-
updateStatusIcon
private void updateStatusIcon(ServerStatusResponse p_184107_1_)
-
hasWorldScreenshot
public boolean hasWorldScreenshot()
-
getWorldScreenshotFile
public java.io.File getWorldScreenshotFile()
-
getServerDirectory
public java.io.File getServerDirectory()
-
onServerCrash
protected void onServerCrash(CrashReport p_71228_1_)
-
onServerExit
protected void onServerExit()
-
tickServer
protected void tickServer(java.util.function.BooleanSupplier p_71217_1_)
-
tickChildren
protected void tickChildren(java.util.function.BooleanSupplier p_71190_1_)
-
isNetherEnabled
public boolean isNetherEnabled()
-
addTickable
public void addTickable(java.lang.Runnable p_82010_1_)
-
setId
protected void setId(java.lang.String p_213208_1_)
-
isShutdown
public boolean isShutdown()
-
getFile
public java.io.File getFile(java.lang.String p_71209_1_)
-
overworld
public final ServerWorld overworld()
-
getLevel
@Nullable public ServerWorld getLevel(RegistryKey<World> p_71218_1_)
-
levelKeys
public java.util.Set<RegistryKey<World>> levelKeys()
-
getAllLevels
public java.lang.Iterable<ServerWorld> getAllLevels()
-
getServerVersion
public java.lang.String getServerVersion()
-
getPlayerCount
public int getPlayerCount()
-
getMaxPlayers
public int getMaxPlayers()
-
getPlayerNames
public java.lang.String[] getPlayerNames()
-
getServerModName
public java.lang.String getServerModName()
-
fillReport
public CrashReport fillReport(CrashReport p_71230_1_)
-
getModdedStatus
public abstract java.util.Optional<java.lang.String> getModdedStatus()
-
sendMessage
public void sendMessage(ITextComponent p_145747_1_, java.util.UUID p_145747_2_)
- Specified by:
sendMessage
in interfaceICommandSource
-
getKeyPair
public java.security.KeyPair getKeyPair()
-
getPort
public int getPort()
-
setPort
public void setPort(int p_71208_1_)
-
getSingleplayerName
public java.lang.String getSingleplayerName()
-
setSingleplayerName
public void setSingleplayerName(java.lang.String p_71224_1_)
-
isSingleplayer
public boolean isSingleplayer()
-
initializeKeyPair
protected void initializeKeyPair()
-
setDifficulty
public void setDifficulty(Difficulty p_147139_1_, boolean p_147139_2_)
-
getScaledTrackingDistance
public int getScaledTrackingDistance(int p_230512_1_)
-
updateMobSpawningFlags
private void updateMobSpawningFlags()
-
setDifficultyLocked
public void setDifficultyLocked(boolean p_213209_1_)
-
sendDifficultyUpdate
private void sendDifficultyUpdate(ServerPlayerEntity p_213189_1_)
-
isSpawningMonsters
protected boolean isSpawningMonsters()
-
isDemo
public boolean isDemo()
-
setDemo
public void setDemo(boolean p_71204_1_)
-
getResourcePack
public java.lang.String getResourcePack()
-
getResourcePackHash
public java.lang.String getResourcePackHash()
-
setResourcePack
public void setResourcePack(java.lang.String p_180507_1_, java.lang.String p_180507_2_)
-
populateSnooper
public void populateSnooper(Snooper p_70000_1_)
- Specified by:
populateSnooper
in interfaceISnooperInfo
-
isDedicatedServer
public abstract boolean isDedicatedServer()
-
getRateLimitPacketsPerSecond
public abstract int getRateLimitPacketsPerSecond()
-
usesAuthentication
public boolean usesAuthentication()
-
setUsesAuthentication
public void setUsesAuthentication(boolean p_71229_1_)
-
getPreventProxyConnections
public boolean getPreventProxyConnections()
-
setPreventProxyConnections
public void setPreventProxyConnections(boolean p_190517_1_)
-
isSpawningAnimals
public boolean isSpawningAnimals()
-
areNpcsEnabled
public boolean areNpcsEnabled()
-
isEpollEnabled
public abstract boolean isEpollEnabled()
-
isPvpAllowed
public boolean isPvpAllowed()
-
setPvpAllowed
public void setPvpAllowed(boolean p_71188_1_)
-
isFlightAllowed
public boolean isFlightAllowed()
-
setFlightAllowed
public void setFlightAllowed(boolean p_71245_1_)
-
isCommandBlockEnabled
public abstract boolean isCommandBlockEnabled()
-
getMotd
public java.lang.String getMotd()
-
setMotd
public void setMotd(java.lang.String p_71205_1_)
-
getMaxBuildHeight
public int getMaxBuildHeight()
-
setMaxBuildHeight
public void setMaxBuildHeight(int p_71191_1_)
-
isStopped
public boolean isStopped()
-
getPlayerList
public PlayerList getPlayerList()
-
setPlayerList
public void setPlayerList(PlayerList p_184105_1_)
-
isPublished
public abstract boolean isPublished()
-
setDefaultGameType
public void setDefaultGameType(GameType p_71235_1_)
-
getConnection
@Nullable public NetworkSystem getConnection()
-
isReady
public boolean isReady()
-
hasGui
public boolean hasGui()
-
publishServer
public abstract boolean publishServer(GameType p_195565_1_, boolean p_195565_2_, int p_195565_3_)
-
getTickCount
public int getTickCount()
-
getSnooper
public Snooper getSnooper()
-
getSpawnProtectionRadius
public int getSpawnProtectionRadius()
-
isUnderSpawnProtection
public boolean isUnderSpawnProtection(ServerWorld p_175579_1_, BlockPos p_175579_2_, PlayerEntity p_175579_3_)
-
setForceGameType
public void setForceGameType(boolean p_104055_1_)
-
getForceGameType
public boolean getForceGameType()
-
repliesToStatus
public boolean repliesToStatus()
-
getPlayerIdleTimeout
public int getPlayerIdleTimeout()
-
setPlayerIdleTimeout
public void setPlayerIdleTimeout(int p_143006_1_)
-
getSessionService
public com.mojang.authlib.minecraft.MinecraftSessionService getSessionService()
-
getProfileRepository
public com.mojang.authlib.GameProfileRepository getProfileRepository()
-
getProfileCache
public PlayerProfileCache getProfileCache()
-
getStatus
public ServerStatusResponse getStatus()
-
invalidateStatus
public void invalidateStatus()
-
getAbsoluteMaxWorldSize
public int getAbsoluteMaxWorldSize()
-
scheduleExecutables
public boolean scheduleExecutables()
- Overrides:
scheduleExecutables
in classRecursiveEventLoop<TickDelayedTask>
-
getRunningThread
public java.lang.Thread getRunningThread()
- Specified by:
getRunningThread
in classThreadTaskExecutor<TickDelayedTask>
-
getCompressionThreshold
public int getCompressionThreshold()
-
getNextTickTime
public long getNextTickTime()
-
getFixerUpper
public com.mojang.datafixers.DataFixer getFixerUpper()
-
getSpawnRadius
public int getSpawnRadius(@Nullable ServerWorld p_184108_1_)
-
getAdvancements
public AdvancementManager getAdvancements()
-
getFunctions
public FunctionManager getFunctions()
-
reloadResources
public java.util.concurrent.CompletableFuture<java.lang.Void> reloadResources(java.util.Collection<java.lang.String> p_240780_1_)
-
configurePackRepository
public static DatapackCodec configurePackRepository(ResourcePackList p_240772_0_, DatapackCodec p_240772_1_, boolean p_240772_2_)
-
getSelectedPacks
private static DatapackCodec getSelectedPacks(ResourcePackList p_240771_0_)
-
kickUnlistedPlayers
public void kickUnlistedPlayers(CommandSource p_205743_1_)
-
getPackRepository
public ResourcePackList getPackRepository()
-
getCommands
public Commands getCommands()
-
createCommandSourceStack
public CommandSource createCommandSourceStack()
-
acceptsSuccess
public boolean acceptsSuccess()
- Specified by:
acceptsSuccess
in interfaceICommandSource
-
acceptsFailure
public boolean acceptsFailure()
- Specified by:
acceptsFailure
in interfaceICommandSource
-
getRecipeManager
public RecipeManager getRecipeManager()
-
getTags
public ITagCollectionSupplier getTags()
-
getScoreboard
public ServerScoreboard getScoreboard()
-
getCommandStorage
public CommandStorage getCommandStorage()
-
getLootTables
public LootTableManager getLootTables()
-
getPredicateManager
public LootPredicateManager getPredicateManager()
-
getGameRules
public GameRules getGameRules()
-
getCustomBossEvents
public CustomServerBossInfoManager getCustomBossEvents()
-
isEnforceWhitelist
public boolean isEnforceWhitelist()
-
setEnforceWhitelist
public void setEnforceWhitelist(boolean p_205741_1_)
-
getAverageTickTime
public float getAverageTickTime()
-
getProfilePermissions
public int getProfilePermissions(com.mojang.authlib.GameProfile p_211833_1_)
-
getFrameTimer
public FrameTimer getFrameTimer()
-
getProfiler
public IProfiler getProfiler()
-
isSingleplayerOwner
public abstract boolean isSingleplayerOwner(com.mojang.authlib.GameProfile p_213199_1_)
-
getTickTime
@Nullable public long[] getTickTime(RegistryKey<World> dim)
-
forgeGetWorldMap
@Deprecated public java.util.Map<RegistryKey<World>,ServerWorld> forgeGetWorldMap()
Deprecated.
-
markWorldsDirty
@Deprecated public void markWorldsDirty()
Deprecated.
-
getWorldArray
private ServerWorld[] getWorldArray()
-
saveDebugReport
public void saveDebugReport(java.nio.file.Path p_223711_1_) throws java.io.IOException
- Throws:
java.io.IOException
-
dumpMiscStats
private void dumpMiscStats(java.nio.file.Path p_223710_1_) throws java.io.IOException
- Throws:
java.io.IOException
-
dumpCrashCategory
private void dumpCrashCategory(java.nio.file.Path p_223709_1_) throws java.io.IOException
- Throws:
java.io.IOException
-
dumpGameRules
private void dumpGameRules(java.nio.file.Path p_223708_1_) throws java.io.IOException
- Throws:
java.io.IOException
-
dumpClasspath
private void dumpClasspath(java.nio.file.Path p_223706_1_) throws java.io.IOException
- Throws:
java.io.IOException
-
dumpThreads
private void dumpThreads(java.nio.file.Path p_223712_1_) throws java.io.IOException
- Throws:
java.io.IOException
-
startProfilerTick
private void startProfilerTick(@Nullable LongTickDetector p_240773_1_)
-
endProfilerTick
private void endProfilerTick(@Nullable LongTickDetector p_240795_1_)
-
isProfiling
public boolean isProfiling()
-
startProfiling
public void startProfiling()
-
finishProfiling
public IProfileResult finishProfiling()
-
getWorldPath
public java.nio.file.Path getWorldPath(FolderName p_240776_1_)
-
forceSynchronousWrites
public boolean forceSynchronousWrites()
-
getStructureManager
public TemplateManager getStructureManager()
-
getWorldData
public IServerConfiguration getWorldData()
-
getDataPackRegistries
public DataPackRegistries getDataPackRegistries()
-
registryAccess
public DynamicRegistries registryAccess()
-
createTextFilterForPlayer
@Nullable public IChatFilter createTextFilterForPlayer(ServerPlayerEntity p_244435_1_)
-
-