public void handlePacket ( final JsonNode packet ) { if ( async ) { executorService . submit ( ( ) -> { try { handle ( packet ) ; } catch ( Throwable t ) { logger . warn ( "Couldn't handle packet of type {}. Please contact the developer! (packet: {})" , getType ( ) , packet , t ) ; } } ) ; } else { try { handle ( packet ) ; } catch ( Throwable t ) { logger . warn ( "Couldn't handle packet of type {}. Please contact the developer! (packet: {})" , getType ( ) , packet , t ) ; } } }
Handles the packet .