Class HytaleServer

java.lang.Object
com.hypixel.hytale.server.core.HytaleServer

public class HytaleServer extends Object
This class is the core of the server and is the main reference point.
  • Field Details

    • DEFAULT_PORT

      public static final int DEFAULT_PORT
      See Also:
    • SCHEDULED_EXECUTOR

      public static final ScheduledExecutorService SCHEDULED_EXECUTOR
      Shared scheduled executor. TODO: Is there maybe already a shared scheduled executor as part of the JDK we can use?
    • METRICS_REGISTRY

      @Nonnull public static final MetricsRegistry<HytaleServer> METRICS_REGISTRY
      The metrics registry for the HytaleServer class.
  • Constructor Details

    • HytaleServer

      public HytaleServer()
  • Method Details

    • getEventBus

      @Nonnull public EventBus getEventBus()
    • getPluginManager

      @Nonnull public PluginManager getPluginManager()
    • getCommandManager

      @Nonnull public CommandManager getCommandManager()
    • getConfig

      @Nonnull public HytaleServerConfig getConfig()
    • shutdownServer

      public void shutdownServer()
    • shutdownServer

      public void shutdownServer(@Nonnull ShutdownReason reason)
      Start the shutdown sequence. This method is called from: - StopCommand - JavaPlugin
    • doneSetup

      public void doneSetup(PluginBase plugin)
    • doneStart

      public void doneStart(PluginBase plugin)
    • doneStop

      public void doneStop(PluginBase plugin)
    • sendSingleplayerProgress

      public void sendSingleplayerProgress()
    • getServerName

      public String getServerName()
    • isBooting

      public boolean isBooting()
    • isBooted

      public boolean isBooted()
    • isShuttingDown

      public boolean isShuttingDown()
    • getBoot

      @Nonnull public Instant getBoot()
    • getBootStart

      public long getBootStart()
    • getShutdownReason

      @Nullable public ShutdownReason getShutdownReason()
    • reportSingleplayerStatus

      public void reportSingleplayerStatus(@Nonnull Message message)
    • reportSingleplayerStatus

      public void reportSingleplayerStatus(@Nonnull Message message, double progress)
    • reportSaveProgress

      public void reportSaveProgress(@Nonnull World world, int saved, int total)
    • get

      public static HytaleServer get()
      Get the server instance.
      Returns:
      The instance of the server.