Package com.comphenix.protocol.error

Examples of com.comphenix.protocol.error.DetailedErrorReporter


    // Initialize executors
    executorAsync = BukkitExecutors.newAsynchronous(this);
    executorSync = BukkitExecutors.newSynchronous(this);
   
    // Add global parameters
    DetailedErrorReporter detailedReporter = new DetailedErrorReporter(this);
    reporter = getFilteredReporter(detailedReporter);
   
    try {
      config = new ProtocolConfig(this);
    } catch (Exception e) {
      reporter.reportWarning(this, Report.newBuilder(REPORT_CANNOT_LOAD_CONFIG).error(e));

      // Load it again
      if (deleteConfig()) {
        config = new ProtocolConfig(this);
      } else {
        reporter.reportWarning(this, Report.newBuilder(REPORT_CANNOT_DELETE_CONFIG));
      }
    }
   
    // Print the state of the debug mode
    if (config.isDebug()) {
      logger.warning("Debug mode is enabled!");
    }
    // And the state of the error reporter
    if (config.isDetailedErrorReporting()) {
      detailedReporter.setDetailedReporting(true);
      logger.warning("Detailed error reporting enabled!");
    }
   
    try {
      // Check for other versions
      checkConflictingVersions();
     
      // Handle unexpected Minecraft versions
      MinecraftVersion version = verifyMinecraftVersion();
     
      // Set updater - this will not perform any update automatically
      updater = new Updater(this, BUKKIT_DEV_ID, getFile(), UpdateType.NO_DOWNLOAD, true);
     
      unhookTask = new DelayedSingleTask(this);
      protocolManager = PacketFilterManager.newBuilder().
          classLoader(getClassLoader()).
          server(getServer()).
          library(this).
          minecraftVersion(version).
          unhookTask(unhookTask).
          reporter(reporter).
          build();     
     
      // Setup error reporter
      detailedReporter.addGlobalParameter("manager", protocolManager);
     
      // Update injection hook
      try {
        PlayerInjectHooks hook = config.getInjectionMethod();
View Full Code Here

TOP

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

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.