}
}
@EventHandler(priority = EventPriority.LOW)
public void onPlayerChat(final AsyncPlayerChatEvent event) {
Team team = Team.getTeamByPlayerName(event.getPlayer().getName());
if (team != null && team.isInTeamChat(event.getPlayer())) {
event.setCancelled(true);
team.sendTeamChatMessage(event.getPlayer(), event.getMessage());
}
}