Class DelegatedErrorReporter

java.lang.Object
com.comphenix.protocol.error.DelegatedErrorReporter
All Implemented Interfaces:
ErrorReporter

public class DelegatedErrorReporter extends Object implements ErrorReporter
Construct an error reporter that delegates to another error reporter.
  • Constructor Details

    • DelegatedErrorReporter

      public DelegatedErrorReporter(ErrorReporter delegated)
      Construct a new error reporter that forwards all reports to a given reporter.
      Parameters:
      delegated - - the delegated reporter.
  • Method Details

    • getDelegated

      public ErrorReporter getDelegated()
      Retrieve the underlying error reporter.
      Returns:
      Underlying error reporter.
    • reportMinimal

      public void reportMinimal(org.bukkit.plugin.Plugin sender, String methodName, Throwable error)
      Description copied from interface: ErrorReporter
      Prints a small minimal error report regarding an exception from another plugin.
      Specified by:
      reportMinimal in interface ErrorReporter
      Parameters:
      sender - - the other plugin.
      methodName - - name of the caller method.
      error - - the exception itself.
    • reportMinimal

      public void reportMinimal(org.bukkit.plugin.Plugin sender, String methodName, Throwable error, Object... parameters)
      Description copied from interface: ErrorReporter
      Prints a small minimal error report regarding an exception from another plugin.
      Specified by:
      reportMinimal in interface ErrorReporter
      Parameters:
      sender - - the other plugin.
      methodName - - name of the caller method.
      error - - the exception itself.
      parameters - - any relevant parameters to print.
    • reportDebug

      public void reportDebug(Object sender, Report report)
      Description copied from interface: ErrorReporter
      Prints a debug message from the current sender.

      Most users will not see this message.

      Specified by:
      reportDebug in interface ErrorReporter
      Parameters:
      sender - - the sender.
      report - - the report.
    • reportWarning

      public void reportWarning(Object sender, Report report)
      Description copied from interface: ErrorReporter
      Prints a warning message from the current plugin.
      Specified by:
      reportWarning in interface ErrorReporter
      Parameters:
      sender - - the object containing the caller method.
      report - - an error report to include.
    • reportDetailed

      public void reportDetailed(Object sender, Report report)
      Description copied from interface: ErrorReporter
      Prints a detailed error report about an unhandled exception.
      Specified by:
      reportDetailed in interface ErrorReporter
      Parameters:
      sender - - the object containing the caller method.
      report - - an error report to include.
    • filterReport

      protected Report filterReport(Object sender, Report report, boolean detailed)
      Invoked before an error report is passed on to the underlying error reporter.

      To cancel a report, return NULL.

      Parameters:
      sender - - the sender instance or class.
      report - - the error report.
      detailed - - whether or not the report will be displayed in detail.
      Returns:
      The report to pass on, or NULL to cancel it.
    • reportWarning

      public void reportWarning(Object sender, Report.ReportBuilder reportBuilder)
      Description copied from interface: ErrorReporter
      Prints a warning message from the current plugin.
      Specified by:
      reportWarning in interface ErrorReporter
      Parameters:
      sender - - the object containing the caller method.
      reportBuilder - - an error report builder that will be used to get the report.
    • reportDetailed

      public void reportDetailed(Object sender, Report.ReportBuilder reportBuilder)
      Description copied from interface: ErrorReporter
      Prints a detailed error report about an unhandled exception.
      Specified by:
      reportDetailed in interface ErrorReporter
      Parameters:
      sender - - the object containing the caller method.
      reportBuilder - - an error report builder that will be used to get the report.
    • reportDebug

      public void reportDebug(Object sender, Report.ReportBuilder builder)
      Description copied from interface: ErrorReporter
      Prints a debug message from the current sender.
      Specified by:
      reportDebug in interface ErrorReporter
      Parameters:
      sender - - the sender.
      builder - - the report builder.