Package net.glowstone

Class ServerProvider

java.lang.Object
net.glowstone.ServerProvider

public final class ServerProvider extends Object
Used to replace the GlowServer instance for testing purposes, when Bukkit.setServer(Server) has already been called.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.bukkit.Server
    The current mock GlowServer instance, or null if not using a mock server.
    static org.bukkit.Server
    Returns the current GlowServer instance.
    static void
    setMockServer(org.bukkit.Server mockServer)
    The current mock GlowServer instance, or null if not using a mock server.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ServerProvider

      public ServerProvider()
  • Method Details

    • getServer

      public static org.bukkit.Server getServer()
      Returns the current GlowServer instance.
      Returns:
      the GlowServer instance
    • getMockServer

      public static org.bukkit.Server getMockServer()
      The current mock GlowServer instance, or null if not using a mock server.
    • setMockServer

      public static void setMockServer(org.bukkit.Server mockServer)
      The current mock GlowServer instance, or null if not using a mock server.