Пример #1
0
 void handleCustomPacket(
     Packet250CustomPayload packet, NetworkManager network, NetHandler handler) {
   if ("REGISTER".equals(packet.channel)) {
     handleRegistrationPacket(packet, (Player) handler.getPlayer());
   } else if ("UNREGISTER".equals(packet.channel)) {
     handleUnregistrationPacket(packet, (Player) handler.getPlayer());
   } else {
     handlePacket(packet, network, (Player) handler.getPlayer());
   }
 }