Package com.comphenix.protocol.error

Examples of com.comphenix.protocol.error.ErrorReporter


  /**
   * Retrieve the default instance of the Bukkit unwrapper.
   * @return The default instance.
   */
  public static BukkitUnwrapper getInstance() {
    ErrorReporter currentReporter = ProtocolLibrary.getErrorReporter();
   
    // Also recreate the unwrapper if the error reporter has changed
    if (DEFAULT == null || DEFAULT.reporter != currentReporter) {
      DEFAULT = new BukkitUnwrapper(currentReporter);
    }
View Full Code Here


  /**
   * Retrieve the current class source.
   * @return The class source.
   */
  private static ClassSource getClassSource() {
    ErrorReporter reporter = ProtocolLibrary.getErrorReporter();
   
    // Lazy pattern again
    if (classSource == null) {
      // Attempt to use MCPC
      try {
        return classSource = new RemappedClassSource().initialize();
      } catch (RemapperUnavaibleException e) {
        if (e.getReason() != Reason.MCPC_NOT_PRESENT)
          reporter.reportWarning(MinecraftReflection.class, Report.newBuilder(REPORT_CANNOT_FIND_MCPC_REMAPPER));
      } catch (Exception e) {
        reporter.reportWarning(MinecraftReflection.class, Report.newBuilder(REPORT_CANNOT_LOAD_CPC_REMAPPER));
      }
     
      // Just use the default class loader
      classSource = ClassSource.fromClassLoader();
    }
View Full Code Here

TOP

Related Classes of com.comphenix.protocol.error.ErrorReporter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.