@EventHandler
 public void onDisconnect(DisconnectEvent event) {
   System.out.println(
       "[" + bot.getSession().getUsername() + "] Disconnected: " + event.getReason());
   bot.getService().shutdownNow();
 }
Beispiel #2
0
 @EventHandler
 public void onDisconnect(DisconnectEvent event) {
   String reason = event.getReason();
   log("[BOT] Disconnected" + (reason != null && reason.length() > 0 ? ": " + reason : "") + ".");
 }