code: public PacketHandler getHandler(byte[] packet) {
          synchronized (this.handlers) {
              // Search for the first handler capable of processing the packet
              for (PacketHandler protocolHandler : this.handlers) {
                  if (protocolHandler.canHandle(packet)) {
                      return protocolHandler;
                  }
              }
  
              // Return null in case no handler is capable of decoding the packet
              return null;
          }
      }
docs: Gets the protocol handler capable of processing the packet.
  
  @param packet The packet to be processed
  @return The protocol handler capable of processing the packet.<br>
  Returns null in case no capable handler exists.