Package com.comphenix.protocol.events

Examples of com.comphenix.protocol.events.PacketOutputHandler


      marker.getOutputHandlers();
    byte[] output = input;
   
    // Let each handler prepare the actual output
    while (!handlers.isEmpty()) {
      PacketOutputHandler handler = handlers.poll();
     
      try {
        byte[] changed = handler.handle(event, output);
       
        // Don't break just because a plugin returned NULL
        if (changed != null) {
          output = changed;
        } else {
          throw new IllegalStateException("Handler cannot return a NULL array.");
        }
      } catch (OutOfMemoryError e) {
        throw e;
      } catch (ThreadDeath e) {
        throw e;
      } catch (Throwable e) {
        reporter.reportMinimal(handler.getPlugin(), "PacketOutputHandler.handle()", e);
      }
    }
    return output;
  }
View Full Code Here

TOP

Related Classes of com.comphenix.protocol.events.PacketOutputHandler

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.