Class ParseLogHandler

java.lang.Object
ch.njol.skript.log.LogHandler
ch.njol.skript.log.ParseLogHandler
All Implemented Interfaces:
OpenCloseable, Closeable, AutoCloseable

public class ParseLogHandler extends LogHandler
  • Constructor Details

    • ParseLogHandler

      public ParseLogHandler()
  • Method Details

    • backup

      @Internal @Contract("-> new") public ParseLogHandler backup()
      Internal method for creating a backup of this log.
      Returns:
      A new ParseLogHandler containing the contents of this ParseLogHandler.
    • restore

      @Internal public void restore(ParseLogHandler parseLogHandler)
      Internal method for restoring a backup of this log.
    • log

      public LogHandler.LogResult log(LogEntry entry)
      Specified by:
      log in class LogHandler
      Parameters:
      entry - entry to log
      Returns:
      Whether to print the specified entry or not.
    • start

      public ParseLogHandler start()
      Description copied from class: LogHandler
      A convenience method for SkriptLogger.startLogHandler(LogHandler).
      Implementations should override this to set the return type to the implementing class.
      Overrides:
      start in class LogHandler
    • error

      public void error(String error, ErrorQuality quality)
    • clear

      public void clear()
      Clears all log messages except for the error
    • clearError

      public void clearError()
    • printLog

      public void printLog()
      Prints the retained log
    • printLog

      public void printLog(boolean includeErrors)
    • printError

      public void printError()
    • printError

      public void printError(@Nullable @Nullable String def)
      Prints the best error or the given error if no error has been logged.
      Parameters:
      def - Error to log if no error has been logged so far, can be null
    • printError

      public void printError(String def, ErrorQuality quality)
    • getNumErrors

      public int getNumErrors()
    • hasError

      public boolean hasError()
    • getError

      @Nullable public @Nullable LogEntry getError()