Package net.glowstone

Class ConsoleManager

java.lang.Object
net.glowstone.ConsoleManager

public final class ConsoleManager extends Object
A meta-class to handle all logging and input-related console improvements. Portions are heavily based on CraftBukkit.
  • Constructor Details

    • ConsoleManager

      public ConsoleManager(GlowServer server)
      Creates the instance for the given server.
      Parameters:
      server - the server
  • Method Details

    • startConsole

      public void startConsole(boolean jline)
      Starts the console.
      Parameters:
      jline - whether the console should use JLine
    • startFile

      public void startFile(String logfile)
      Adds a console-log handler writing to the given file.
      Parameters:
      logfile - the file path
    • stop

      public void stop()
      Stops all console-log handlers.
    • getSender

      public org.bukkit.command.ConsoleCommandSender getSender()
      Returns this ConsoleManager's console as a ConsoleCommandSender.
      Returns:
      the ConsoleCommandSender instance for this ConsoleManager's console