Class McServer
java.lang.Object
com.shanebeestudios.nms.api.server.McServer
Wrapper for Minecraft (Dedicated) Server
Provides easy-to-use mapped methods for Minecraft Server
-
Method Summary
Modifier and TypeMethodDescriptionList<net.minecraft.server.level.ServerLevel> Get all server LevelsGet the Level ID namenet.minecraft.server.dedicated.DedicatedPlayerListGet the server's player listnet.minecraft.server.dedicated.DedicatedServerPropertiesGet the properties associated with the serverGet the name of the servernet.minecraft.network.protocol.status.ServerStatusGet the status of the serverbooleanisReady()Check if the server is readybooleanCheck if the server is runningbooleanCheck if the server is shutdownstatic McServerwrap()Wrap the Bukkit server as MinecraftServerstatic McServerWrap a Bukkit Server as MinecraftServer
-
Method Details
-
wrap
Wrap a Bukkit Server as MinecraftServer- Parameters:
bukkitServer- Bukkit Server to wrap- Returns:
- Wrapped MinecraftServer
-
wrap
Wrap the Bukkit server as MinecraftServer- Returns:
- Wrapped MinecraftServer
-
isRunning
public boolean isRunning()Check if the server is running- Returns:
- True if server is running
-
isReady
public boolean isReady()Check if the server is ready- Returns:
- True if server is ready
-
isShutdown
public boolean isShutdown()Check if the server is shutdown- Returns:
- True if server is shutdown
-
getServerName
Get the name of the server- Returns:
- Name of server
-
getProperties
public net.minecraft.server.dedicated.DedicatedServerProperties getProperties()Get the properties associated with the server- Returns:
- Properties of server
-
getLevelIdName
Get the Level ID name- Returns:
- Level ID name
-
getPlayerList
public net.minecraft.server.dedicated.DedicatedPlayerList getPlayerList()Get the server's player list- Returns:
- Player list
-
getServerStatus
public net.minecraft.network.protocol.status.ServerStatus getServerStatus()Get the status of the server- Returns:
- Status of the server
-
getAllLevels
Get all server Levels- Returns:
- All server levels
-