Class Server
在Nukkit
中被实例化,后通过getInstance()
获取实例对象.
Server
的构造方法进行了一系列操作,包括但不限于初始化配置文件,创建线程、线程池,开启插件,注册配方、方块、实体、物品等.
Represents a server object, global singleton.
is instantiated in Nukkit
and later the instance object is obtained via getInstance()
.
The constructor method of Server
performs a number of operations, including but not limited to initializing configuration files, creating threads, thread pools, start plugins, registering recipes, blocks, entities, items, etc.
- Author:
- MagicDroidX, Box
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
boolean
配置项是否检查登录时间.final ForkJoinPool
负责地形生成,数据压缩等计算任务的FJP线程池boolean
int
网络压缩级别 -
Method Summary
Modifier and TypeMethodDescriptionint
addBusying
(long busyTime) 将服务器设置为繁忙状态,这可以阻止相关代码认为服务器处于无响应状态。 请牢记,必须在设置之后清除。void
addOnlinePlayer
(Player player) void
void
addPlayer
(InetSocketAddress socketAddress, Player player) void
注册配方到配方管理器void
addWhitelist
(String name) void
batchPackets
(Player[] players, DataPacket[] packets) Deprecated.void
batchPackets
(Player[] players, DataPacket[] packets, boolean forceSync) Deprecated.int
broadcast
(TextContainer message, String permissions) int
int
broadcastMessage
(TextContainer message) int
broadcastMessage
(TextContainer message, Collection<? extends CommandSender> recipients) int
broadcastMessage
(String message) 广播一条消息给所有玩家int
broadcastMessage
(String message, CommandSender[] recipients) 广播一条消息给指定的recipients
int
broadcastMessage
(String message, Collection<? extends CommandSender> recipients) static void
broadcastPacket
(Player[] players, DataPacket packet) 广播一个数据包给指定的玩家们.static void
broadcastPacket
(Collection<Player> players, DataPacket packet) void
broadcastPacketsCallback
(byte[] data, List<InetSocketAddress> targets) void
禁用全部插件boolean
dispatchCommand
(CommandSender sender, String commandLine) Deprecated.void
void
enablePlugin
(Plugin plugin) 启用一个指定插件void
enablePlugins
(PluginLoadOrder type) 以指定插件加载顺序启用插件int
executeCommand
(CommandSender sender, String commandLine) 以sender身份执行一行命令void
强制关闭服务器boolean
generateLevel
(String name) boolean
generateLevel
(String name, long seed) boolean
generateLevel
(String name, long seed, Class<? extends Generator> generator) boolean
generateLevel
(String name, long seed, Class<? extends Generator> generator, Map<String, Object> options) boolean
generateLevel
(String name, long seed, Class<? extends Generator> generator, Map<String, Object> options, DimensionData givenDimensionData) boolean
generateLevel
(String name, long seed, Class<? extends Generator> generator, Map<String, Object> options, DimensionData givenDimensionData, Class<? extends LevelProvider> provider) boolean
boolean
long
<T> T
<T> T
得到控制台发送者int
int
获得服务器游戏难度static int
从字符串获取游戏难度boolean
boolean
boolean
int
得到服务器的gamemodestatic int
从字符串获取gamemodestatic String
getGamemodeString
(int mode) 默认direct=false
static String
getGamemodeString
(int mode, boolean direct) 从gamemode id获取游戏模式字符串.boolean
static Server
getIp()
long
getLevel
(int levelId) 从世界id得到世界,0主世界 1 地狱 2 末地getLevelByName
(String name) 从世界名得到世界,overworld 主世界 nether 地狱 the_end 末地Deprecated.int
int
int
getMotd()
getName()
long
getOfflinePlayer
(String name) getOfflinePlayer
(UUID uuid) 从指定的UUID得到一个玩家实例,可以是在线玩家也可以是离线玩家.getOfflinePlayerData
(String name) Deprecated.getOfflinePlayerData
(String name, boolean create) Deprecated.getOfflinePlayerData
(UUID uuid) create为falsegetOfflinePlayerData
(UUID uuid, boolean create) 获得UUID指定的玩家的NBT数据获得所有在线的玩家Map.getOps()
从玩家名获得一个在线玩家,这个方法是模糊匹配,只要玩家名带有name前缀就会被返回.从指定的UUID得到玩家实例.getPlayerExact
(String name) 从玩家名获得一个在线玩家,这个方法是精确匹配,当玩家名字符串完全相同时返回.int
getPluginCommand
(String name) int
getPort()
getProperty
(String variable) getProperty
(String variable, Object defaultValue) boolean
getPropertyBoolean
(String variable) boolean
getPropertyBoolean
(String variable, Object defaultValue) int
getPropertyInt
(String variable) int
getPropertyInt
(String variable, Integer defaultValue) getPropertyString
(String variable) getPropertyString
(String variable, String defaultValue) int
int
int
getTick()
float
float
float
float
int
void
handlePacket
(InetSocketAddress address, io.netty.buffer.ByteBuf payload) boolean
boolean
boolean
boolean
boolean
boolean
boolean
isIgnoredPacket
(Class<? extends DataPacket> clazz) boolean
boolean
isLevelGenerated
(String name) boolean
isLevelLoaded
(String name) boolean
boolean
final boolean
Checks the current thread against the expected primary thread for the server.boolean
boolean
boolean
boolean
boolean
boolean
isWhitelisted
(String name) boolean
lookupName
(String name) 从数据库中查找指定玩家名对应的UUID.Player[]
matchPlayer
(String partialName) 指定一个部分玩家名,返回所有包含或者等于该名称的玩家.void
onPlayerCompleteLoginSequence
(Player player) void
onPlayerLogin
(Player player) void
reload()
重载服务器void
void
removeBusying
(int index) void
removeOnlinePlayer
(Player player) void
void
removePlayer
(Player player) 删除一个玩家,可以让一个玩家离线.void
removePlayerListData
(UUID uuid) void
removePlayerListData
(UUID uuid, Player player) 移除这个玩家的玩家列表数据.void
removePlayerListData
(UUID uuid, Player[] players) 移除玩家数组中所有玩家的玩家列表数据.void
removePlayerListData
(UUID uuid, Collection<Player> players) void
removeWhitelist
(String name) void
saveOfflinePlayerData
(String name, CompoundTag tag) void
saveOfflinePlayerData
(String name, CompoundTag tag, boolean async) 保存玩家数据,玩家在线离线都行.void
saveOfflinePlayerData
(UUID uuid, CompoundTag tag) void
saveOfflinePlayerData
(UUID uuid, CompoundTag tag, boolean async) void
sendFullPlayerListData
(Player player) 发送玩家列表数据包给一个玩家.void
sendRecipeList
(Player player) 发送配方列表数据包给一个玩家.void
setAutoSave
(boolean autoSave) 设置服务器自动保存void
setDefaultLevel
(Level defaultLevel) 设置默认游戏世界void
setDifficulty
(int difficulty) 设置服务器游戏难度void
setMaxPlayers
(int maxPlayers) void
setPlayerDataSerializer
(PlayerDataSerializer playerDataSerializer) void
setPropertyBoolean
(String variable, boolean value) void
setPropertyInt
(String variable, int value) void
setPropertyString
(String variable, String value) void
setRedstoneEnabled
(boolean redstoneEnabled) boolean
void
shutdown()
关闭服务器void
silentExecuteCommand
(Player sender, String... commands) 以该玩家身份静音执行这些命令无视权限void
silentExecuteCommand
(String... commands) 以该控制台身份静音执行这些命令,无视权限void
start()
void
void
boolean
unloadLevel
(Level level) boolean
unloadLevel
(Level level, boolean forceUnload) 卸载世界void
updatePlayerListData
(UUID uuid, long entityId, String name, Skin skin) void
updatePlayerListData
(UUID uuid, long entityId, String name, Skin skin, Player[] players) void
updatePlayerListData
(UUID uuid, long entityId, String name, Skin skin, String xboxUserId) void
updatePlayerListData
(UUID uuid, long entityId, String name, Skin skin, String xboxUserId, Player[] players) 更新指定玩家们(players)的PlayerListPacket
数据包(即玩家列表数据)void
updatePlayerListData
(UUID uuid, long entityId, String name, Skin skin, String xboxUserId, Collection<Player> players)
-
Field Details
-
BROADCAST_CHANNEL_ADMINISTRATIVE
- See Also:
-
BROADCAST_CHANNEL_USERS
- See Also:
-
computeThreadPool
负责地形生成,数据压缩等计算任务的FJP线程池
FJP thread pool responsible for terrain generation, data compression and other computing tasks
-
checkLoginTime
public boolean checkLoginTime配置项是否检查登录时间.Does the configuration item check the login time.
-
networkCompressionLevel
public int networkCompressionLevel网络压缩级别Network compression level
-
enabledNetworkEncryption
-
-
Method Details
-
reload
public void reload()重载服务器Reload Server
-
shutdown
public void shutdown()关闭服务器Shut down the server
-
forceShutdown
public void forceShutdown()强制关闭服务器Force Shut down the server
-
start
public void start() -
tickProcessor
public void tickProcessor() -
doAutoSave
public void doAutoSave() -
getNextTick
public long getNextTick() -
getTick
public int getTick()- Returns:
- 返回服务器经历过的tick数
Returns the number of ticks recorded by the server
-
getTicksPerSecond
public float getTicksPerSecond() -
getTicksPerSecondAverage
public float getTicksPerSecondAverage() -
getTickUsage
public float getTickUsage() -
getTickUsageAverage
public float getTickUsageAverage() -
titleTick
public void titleTick() -
isRunning
public boolean isRunning() -
addBusying
public int addBusying(long busyTime) 将服务器设置为繁忙状态,这可以阻止相关代码认为服务器处于无响应状态。 请牢记,必须在设置之后清除。- Parameters:
busyTime
- 单位为毫秒- Returns:
- id
-
removeBusying
public void removeBusying(int index) -
getBusyingTime
public long getBusyingTime() -
getTickingAreaManager
-
getLaunchTime
-
getInstance
-
broadcastMessage
广播一条消息给所有玩家Broadcast a message to all players
- Parameters:
message
- 消息- Returns:
- int 玩家数量
Number of players
-
broadcastMessage
- See Also:
-
broadcastMessage
广播一条消息给指定的recipients
Broadcast a message to the specified
recipients
- Parameters:
message
- 消息- Returns:
- int
recipients
数量
Number ofrecipients
-
broadcastMessage
-
broadcastMessage
-
broadcast
从指定的许可名获取发送者们,广播一条消息给他们.可以指定多个许可名,以 ; 分割.
一个permission在PluginManager.permSubs
对应一个发送者
Set.Get the sender to broadcast a message from the specified permission name, multiple permissions can be specified, split by ;
The permission corresponds to aSender
set inPluginManager.permSubs
.- Parameters:
message
- 消息内容
Message contentpermissions
- 许可名,需要先通过subscribeToPermission
注册
Permissions name, need to register first throughsubscribeToPermission
- Returns:
- int 接受到消息的
发送者
数量
Number ofsenders
who received the message
-
broadcast
- See Also:
-
dispatchCommand
@Deprecated @DeprecationDetails(since="1.19.60-r1", reason="use Server#executeCommand") public boolean dispatchCommand(CommandSender sender, String commandLine) throws ServerException Deprecated.- Throws:
ServerException
-
executeCommand
以sender身份执行一行命令Execute one line of command as sender
- Parameters:
sender
- 命令执行者commandLine
- 一行命令- Returns:
- 返回0代表执行失败, 返回大于等于1代表执行成功
Returns 0 for failed execution, greater than or equal to 1 for successful execution - Throws:
ServerException
- 服务器异常
-
silentExecuteCommand
以该控制台身份静音执行这些命令,无视权限Execute these commands silently as the console, ignoring permissions.
- Parameters:
commands
- the commands- Throws:
ServerException
- 服务器异常
-
silentExecuteCommand
以该玩家身份静音执行这些命令无视权限Execute these commands silently as this player, ignoring permissions.
- Parameters:
sender
- 命令执行者
command sendercommands
- the commands- Throws:
ServerException
- 服务器异常
-
getConsoleSender
得到控制台发送者Get the console sender
- Returns:
ConsoleCommandSender
-
getCommandMap
-
getPluginCommand
-
getCommandAliases
-
getScoreboardManager
-
getFunctionManager
-
broadcastPacket
- See Also:
-
broadcastPacket
广播一个数据包给指定的玩家们.Broadcast a packet to the specified players.
- Parameters:
players
- 接受数据包的所有玩家
All players receiving the data packagepacket
- 数据包
-
batchPackets
@DeprecationDetails(since="1.4.0.0-PN", by="Cloudburst Nukkit", reason="Packet management was refactored, batching is done automatically near the RakNet layer") @Deprecated public void batchPackets(Player[] players, DataPacket[] packets) Deprecated. -
batchPackets
@DeprecationDetails(since="1.4.0.0-PN", by="Cloudburst Nukkit", reason="Packet management was refactored, batching is done automatically near the RakNet layer") @Deprecated public void batchPackets(Player[] players, DataPacket[] packets, boolean forceSync) Deprecated. -
broadcastPacketsCallback
-
handlePacket
-
getQueryInformation
-
getNetwork
-
enablePlugins
以指定插件加载顺序启用插件Enable plugins in the specified plugin loading order
- Parameters:
type
- 插件加载顺序
Plugin loading order
-
enablePlugin
启用一个指定插件Enable a specified plugin
- Parameters:
plugin
- 插件实例
Plugin instance
-
disablePlugins
public void disablePlugins()禁用全部插件Disable all plugins
-
getPluginManager
-
getServiceManager
-
onPlayerCompleteLoginSequence
-
onPlayerLogin
-
addPlayer
-
addOnlinePlayer
-
removeOnlinePlayer
-
updatePlayerListData
-
updatePlayerListData
-
updatePlayerListData
-
updatePlayerListData
public void updatePlayerListData(UUID uuid, long entityId, String name, Skin skin, String xboxUserId, Player[] players) 更新指定玩家们(players)的PlayerListPacket
数据包(即玩家列表数据)Update
PlayerListPacket
data packets (i.e. player list data) for specified players- Parameters:
uuid
- uuidentityId
- 实体idname
- 名字skin
- 皮肤xboxUserId
- xbox用户idplayers
- 指定接受数据包的玩家
-
updatePlayerListData
-
removePlayerListData
-
removePlayerListData
移除玩家数组中所有玩家的玩家列表数据.Remove player list data for all players in the array.
- Parameters:
players
- 玩家数组
-
removePlayerListData
移除这个玩家的玩家列表数据.Remove this player's player list data.
- Parameters:
player
- 玩家
-
removePlayerListData
-
sendFullPlayerListData
发送玩家列表数据包给一个玩家.Send a player list packet to a player.
- Parameters:
player
- 玩家
-
getPlayer
从指定的UUID得到玩家实例.Get the player instance from the specified UUID.
- Parameters:
uuid
- uuid- Returns:
- 玩家实例,可为空
Player example, can be empty
-
lookupName
从数据库中查找指定玩家名对应的UUID.Find the UUID corresponding to the specified player name from the database.
- Parameters:
name
- 玩家名
player name- Returns:
- 玩家的UUID,可为空.
The player's UUID, which can be empty.
-
getOfflinePlayer
-
getOfflinePlayer
从指定的UUID得到一个玩家实例,可以是在线玩家也可以是离线玩家.Get a player instance from the specified UUID, either online or offline.
- Parameters:
uuid
- uuid- Returns:
- 玩家
player
-
getOfflinePlayerData
create为falsecreate is false
- See Also:
-
getOfflinePlayerData
获得UUID指定的玩家的NBT数据- Parameters:
uuid
- 要获取数据的玩家UUID
UUID of the player to get data fromcreate
- 如果玩家数据不存在是否创建
If player data does not exist whether to create.- Returns:
CompoundTag
-
getOfflinePlayerData
Deprecated. -
getOfflinePlayerData
Deprecated. -
saveOfflinePlayerData
-
saveOfflinePlayerData
-
saveOfflinePlayerData
-
saveOfflinePlayerData
保存玩家数据,玩家在线离线都行.Save player data, players can be offline.
- Parameters:
name
- 玩家名
player nametag
- NBT数据
nbt dataasync
- 是否异步保存
Whether to save asynchronously
-
getPlayer
从玩家名获得一个在线玩家,这个方法是模糊匹配,只要玩家名带有name前缀就会被返回.Get an online player from the player name, this method is a fuzzy match and will be returned as long as the player name has the name prefix.
- Parameters:
name
- 玩家名
player name- Returns:
- 玩家实例对象,获取失败为null
Player instance object,failed to get null
-
getPlayerExact
从玩家名获得一个在线玩家,这个方法是精确匹配,当玩家名字符串完全相同时返回.Get an online player from a player name, this method is an exact match and returns when the player name string is identical.
- Parameters:
name
- 玩家名
player name- Returns:
- 玩家实例对象,获取失败为null
Player instance object,failed to get null
-
matchPlayer
指定一个部分玩家名,返回所有包含或者等于该名称的玩家.Specify a partial player name and return all players with or equal to that name.
- Parameters:
partialName
- 部分玩家名
partial name- Returns:
- 匹配到的所有玩家, 若匹配不到则为一个空数组
All players matched, if not matched then an empty array
-
removePlayer
删除一个玩家,可以让一个玩家离线.Delete a player to take a player offline.
- Parameters:
player
- 需要删除的玩家
Players who need to be deleted
-
getPlayerDataSerializer
-
setPlayerDataSerializer
-
getOnlinePlayers
获得所有在线的玩家Map.Get all online players Map.
- Returns:
- 所有的在线玩家Map
-
getName
- Returns:
- 服务器名称
The name of server
-
getNukkitVersion
-
getBStatsNukkitVersion
-
getGitCommit
-
getCodename
-
getVersion
-
getApiVersion
-
getFilePath
-
getDataPath
-
getPluginPath
-
getServerUniqueId
- Returns:
- 服务器UUID
server UUID
-
getLogger
@Deprecated @DeprecationDetails(since="1.4.0.0-PN", by="PowerNukkit", reason="Use your own logger, sharing loggers makes bug analyses harder.", replaceWith="@Log4j2 annotation in the class and use the `log` static field that is generated by lombok, also make sure to log the exception as the last argument, don\'t concatenate it or use it as parameter replacement. Just put it as last argument and SLF4J will understand that the log message was caused by that exception/throwable.") public MainLogger getLogger()Deprecated. -
getEntityMetadata
-
getPlayerMetadata
-
getLevelMetadata
-
getResourcePackManager
-
getFreezableArrayManager
-
getPositionTrackingService
@PowerNukkitOnly @Since("1.4.0.0-PN") @NotNull public PositionTrackingService getPositionTrackingService() -
sendRecipeList
发送配方列表数据包给一个玩家.Send a recipe list packet to a player.
- Parameters:
player
- 玩家
-
addRecipe
注册配方到配方管理器Register Recipe to Recipe Manager
- Parameters:
recipe
- 配方
-
getCraftingManager
-
getLevels
- Returns:
- 获得所有游戏世界
Get all the game world
-
getDefaultLevel
- Returns:
- 获得默认游戏世界
Get the default world
-
setDefaultLevel
设置默认游戏世界Set default game world
- Parameters:
defaultLevel
- 默认游戏世界
default game world
-
isLevelLoaded
- Parameters:
name
- 世界名字- Returns:
- 世界是否已经加载
Is the world already loaded
-
getLevel
从世界id得到世界,0主世界 1 地狱 2 末地Get world from world id,0 OVERWORLD 1 NETHER 2 THE_END
- Parameters:
levelId
- 世界id
world id- Returns:
- level实例
level instance
-
getLevelByName
从世界名得到世界,overworld 主世界 nether 地狱 the_end 末地Get world from world name,
overworld nether the_end
- Parameters:
name
- 世界名
world name- Returns:
- level实例
level instance
-
unloadLevel
-
unloadLevel
卸载世界unload level
- Parameters:
level
- 世界forceUnload
- 是否强制卸载
whether to force uninstallation.- Returns:
- 卸载是否成功
-
loadLevel
-
generateLevel
-
generateLevel
-
generateLevel
-
generateLevel
-
generateLevel
@PowerNukkitXOnly @Since("1.19.20-r3") public boolean generateLevel(String name, long seed, Class<? extends Generator> generator, Map<String, Object> options, DimensionData givenDimensionData) -
generateLevel
public boolean generateLevel(String name, long seed, Class<? extends Generator> generator, Map<String, Object> options, DimensionData givenDimensionData, Class<? extends LevelProvider> provider) -
isLevelGenerated
-
getNameBans
-
getIPBans
-
addOp
-
removeOp
-
addWhitelist
-
removeWhitelist
-
isWhitelisted
-
isOp
-
getWhitelist
-
getOps
-
reloadWhitelist
public void reloadWhitelist() -
getMaxPlayers
public int getMaxPlayers() -
setMaxPlayers
public void setMaxPlayers(int maxPlayers) -
getPort
public int getPort()- Returns:
- 服务器端口
server port
-
getViewDistance
public int getViewDistance()- Returns:
- 可视距离
server view distance
-
getIp
- Returns:
- 服务器网络地址
server ip
-
getAutoSave
public boolean getAutoSave()- Returns:
- 服务器是否会自动保存
Does the server automatically save
-
setAutoSave
public void setAutoSave(boolean autoSave) 设置服务器自动保存Set server autosave
- Parameters:
autoSave
- 是否自动保存
Whether to save automatically
-
getLevelType
-
getGenerateStructures
public boolean getGenerateStructures()- Returns:
- 服务器是否生成结构
Whether the server generate the structure.
-
getGamemode
public int getGamemode()得到服务器的gamemodeGet the gamemode of the server
- Returns:
- gamemode id
-
getForceGamemode
public boolean getForceGamemode() -
getGamemodeString
默认direct=false
- See Also:
-
getGamemodeString
从gamemode id获取游戏模式字符串.Get game mode string from gamemode id.
- Parameters:
mode
- gamemode iddirect
- 如果为true就直接返回字符串,为false返回代表游戏模式的硬编码字符串.
If true, the string is returned directly, and if false, the hard-coded string representing the game mode is returned.- Returns:
- 游戏模式字符串
Game Mode String
-
getGamemodeFromString
从字符串获取gamemodeGet gamemode from string
- Parameters:
str
- 代表游戏模式的字符串,例如0,survival...
A string representing the game mode, e.g. 0,survival...- Returns:
- 游戏模式id
gamemode id
-
getDifficultyFromString
从字符串获取游戏难度Get game difficulty from string
- Parameters:
str
- 代表游戏难度的字符串,例如0,peaceful...
A string representing the game difficulty, e.g. 0,peaceful...- Returns:
- 游戏难度id
game difficulty id
-
getDifficulty
public int getDifficulty()获得服务器游戏难度Get server game difficulty
- Returns:
- 游戏难度id
game difficulty id
-
setDifficulty
public void setDifficulty(int difficulty) 设置服务器游戏难度set server game difficulty
- Parameters:
difficulty
- 游戏难度id
game difficulty id
-
hasWhitelist
public boolean hasWhitelist()- Returns:
- 是否开启白名单
Whether to start server whitelist
-
getSpawnRadius
public int getSpawnRadius()- Returns:
- 得到服务器出生点保护半径
Get server birth point protection radius
-
getAllowFlight
public boolean getAllowFlight()- Returns:
- 服务器是否允许飞行
Whether the server allows flying
-
isHardcore
public boolean isHardcore()- Returns:
- 服务器是否为硬核模式
Whether the server is in hardcore mode
-
getDefaultGamemode
public int getDefaultGamemode()- Returns:
- 获取默认gamemode
Get default gamemode
-
getMotd
- Returns:
- 得到服务器标题
Get server motd
-
getSubMotd
- Returns:
- 得到服务器子标题
Get the server subheading
-
getForceResources
public boolean getForceResources()- Returns:
- 是否强制使用服务器资源包
Whether to force the use of server resourcepack
-
getForceResourcesAllowOwnPacks
public boolean getForceResourcesAllowOwnPacks()- Returns:
- 是否强制使用服务器资源包的同时允许加载客户端资源包
Whether to force the use of server resourcepack while allowing the loading of client resourcepack
-
getLanguage
-
getLanguageCode
-
isLanguageForced
public boolean isLanguageForced() -
isRedstoneEnabled
-
setRedstoneEnabled
-
getConfig
-
getConfig
-
getConfig
-
getProperties
-
getProperty
-
getProperty
-
setPropertyString
-
getPropertyString
-
getPropertyString
-
getPropertyInt
-
getPropertyInt
-
setPropertyInt
-
getPropertyBoolean
-
getPropertyBoolean
-
setPropertyBoolean
-
shouldSavePlayerData
public boolean shouldSavePlayerData() -
getPlayerSkinChangeCooldown
public int getPlayerSkinChangeCooldown() -
isNetherAllowed
public boolean isNetherAllowed() -
isIgnoredPacket
-
isSafeSpawn
-
isForceSkinTrusted
-
isCheckMovement
-
isTheEndAllowed
-
isEnableExperimentMode
-
isWaterdogCapable
-
getMaximumStaleDatagrams
-
getMaximumSizePerChunk
-
getServerAuthoritativeMovement
-
isEnableSnappy
-
isPrimaryThread
public final boolean isPrimaryThread()Checks the current thread against the expected primary thread for the server.Note: this method should not be used to indicate the current synchronized state of the runtime. A current thread matching the main thread indicates that it is synchronized, but a mismatch does not preclude the same assumption.
- Returns:
- true if the current thread matches the expected primary thread, false otherwise
-
getPrimaryThread
-
getScheduler
-