Class McServer

java.lang.Object
com.shanebeestudios.nms.api.server.McServer

public class McServer extends Object
Wrapper for Minecraft (Dedicated) Server

Provides easy-to-use mapped methods for Minecraft Server

  • Method Details

    • wrap

      public static McServer wrap(Server bukkitServer)
      Wrap a Bukkit Server as MinecraftServer
      Parameters:
      bukkitServer - Bukkit Server to wrap
      Returns:
      Wrapped MinecraftServer
    • wrap

      public static McServer 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

      public String 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

      public String 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

      public List<net.minecraft.server.level.ServerLevel> getAllLevels()
      Get all server Levels
      Returns:
      All server levels