Ejemplo n.º 1
0
 public void onClientConnect(TeamSpeakUser user) {
   TeamSpeak.addChat(
       null,
       null,
       Color.cl("9") + user.getNickName() + Color.cl("7") + " connected to the Server.",
       EnumTargetMode.SERVER);
 }
Ejemplo n.º 2
0
 public void onClientTimout(TeamSpeakUser user) {
   if (user == null) {
     return;
   }
   TeamSpeak.addChat(
       null,
       null,
       Color.cl("9") + user.getNickName() + Color.cl("7") + " timed out.",
       EnumTargetMode.SERVER);
 }
Ejemplo n.º 3
0
 public void onPokeRecieved(TeamSpeakUser user, String pokeMessage) {
   if (user == null) {
     return;
   }
   String m = Color.cl("9") + user.getNickName() + Color.cl("a") + " pokes you.";
   if (!pokeMessage.isEmpty()) {
     m = Color.cl("9") + user.getNickName() + Color.cl("a") + " pokes you: " + pokeMessage;
   }
   TeamSpeak.infoAll(m);
   if (ConfigManager.settings.teamSpeakAlertTypeChat) {
     if (ConfigManager.settings.alertsTeamSpeak) {
       LabyMod.getInstance().displayMessageInChat(TeamSpeak.chatPrefix + m);
     }
   } else {
     LabyMod.getInstance()
         .achievementGui
         .displayBroadcast(
             user.getNickName(), TeamSpeak.url(pokeMessage), EnumAlertType.TEAMSPEAK);
   }
   TeamSpeak.overlayWindows.openInfo(user.getClientId(), "You Have Been Poked", m);
 }
Ejemplo n.º 4
0
 public void onChannelMessageRecieved(TeamSpeakUser user, String message) {
   TeamSpeak.addChat(null, user, message, EnumTargetMode.CHANNEL);
   if ((TeamSpeakController.getInstance().me != null)
       && (TeamSpeakController.getInstance().me.getClientId() != user.getClientId())) {
     if (ConfigManager.settings.teamSpeakAlertTypeChat) {
       if (ConfigManager.settings.alertsTeamSpeak) {
         LabyMod.getInstance()
             .displayMessageInChat(
                 TeamSpeak.chatPrefix
                     + Color.cl("9")
                     + user.getNickName()
                     + Color.cl("7")
                     + ": "
                     + TeamSpeak.url(message));
       }
     } else {
       LabyMod.getInstance()
           .achievementGui
           .displayBroadcast(user.getNickName(), TeamSpeak.url(message), EnumAlertType.TEAMSPEAK);
     }
   }
 }
Ejemplo n.º 5
0
 public void onClientDisconnected(TeamSpeakUser user, String reason) {
   if (user == null) {
     return;
   }
   TeamSpeak.addChat(
       null,
       null,
       Color.cl("9")
           + user.getNickName()
           + Color.cl("7")
           + " disconnected from the Server ("
           + reason
           + ")",
       EnumTargetMode.SERVER);
   for (Chat chat : TeamSpeak.chats) {
     if ((chat.getChatOwner() != null)
         && (chat.getTargetMode() == EnumTargetMode.USER)
         && (chat.getChatOwner().getClientId() == user.getClientId())) {
       chat.addMessage(null, Color.cl("7") + "Your chat partner has disconnected.");
     }
   }
 }
Ejemplo n.º 6
0
 public void onError(int errorId, String errorMessage) {
   String m = Color.cl("c") + TeamSpeak.fix(errorMessage) + " (Error " + errorId + ")";
   TeamSpeak.error(m);
 }