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.DedicatedPlayerList
Get the server's player listnet.minecraft.server.dedicated.DedicatedServerProperties
Get the properties associated with the serverGet the name of the servernet.minecraft.network.protocol.status.ServerStatus
Get the status of the serverboolean
isReady()
Check if the server is readyboolean
Check if the server is runningboolean
Check if the server is shutdownstatic McServer
wrap()
Wrap the Bukkit server as MinecraftServerstatic McServer
Wrap 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
-