Dieser Commit ist enthalten in:
Ursprung
a0aea29b1b
Commit
a5669ef7e2
@ -51,7 +51,7 @@ public class AlertCommand extends BasicCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Message.broadcast("ALERT", ChatColor.translateAlternateColorCodes('&', s));
|
Message.broadcast("ALERT", ChatColor.translateAlternateColorCodes('&', s));
|
||||||
if (discordAnnounce) {
|
if (discordAnnounce && SteamwarDiscordBot.instance() != null) {
|
||||||
SteamwarDiscordBot.instance().getAnnouncementListener().announce(s);
|
SteamwarDiscordBot.instance().getAnnouncementListener().announce(s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -54,11 +54,13 @@ public class ServerTeamchatCommand extends BasicCommand {
|
|||||||
String msg = msgBuilder.toString();
|
String msg = msgBuilder.toString();
|
||||||
msg = ChatColor.translateAlternateColorCodes('&', msg);
|
msg = ChatColor.translateAlternateColorCodes('&', msg);
|
||||||
|
|
||||||
|
if (SteamwarDiscordBot.instance() != null) {
|
||||||
try {
|
try {
|
||||||
SteamwarDiscordBot.instance().getServerTeamChatListener().send("<t:" + (System.currentTimeMillis() / 1000) + "> " + (player.getName() + "» " + msg).replaceAll("§[a-f0-9r]", ""));
|
SteamwarDiscordBot.instance().getServerTeamChatListener().send("<t:" + (System.currentTimeMillis() / 1000) + "> " + (player.getName() + "» " + msg).replaceAll("§[a-f0-9r]", ""));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
BungeeCore.get().getLogger().log(Level.SEVERE, "Could not send stc message to discord", e);
|
BungeeCore.get().getLogger().log(Level.SEVERE, "Could not send stc message to discord", e);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
sendToTeam(msg, player);
|
sendToTeam(msg, player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -212,11 +212,13 @@ public class ChatListener extends BasicListener {
|
|||||||
msg = "§" + team.getTeamColor() + team.getTeamKuerzel() + " §r" + msg;
|
msg = "§" + team.getTeamColor() + team.getTeamKuerzel() + " §r" + msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (SteamwarDiscordBot.instance() != null) {
|
||||||
try {
|
try {
|
||||||
SteamwarDiscordBot.instance().getIngameChatListener().send("<t:" + (System.currentTimeMillis() / 1000) + "> " + msg.replaceAll("§[a-f0-9r]", ""));
|
SteamwarDiscordBot.instance().getIngameChatListener().send("<t:" + (System.currentTimeMillis() / 1000) + "> " + msg.replaceAll("§[a-f0-9r]", ""));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
BungeeCore.get().getLogger().log(Level.SEVERE, "Could not send chat message to discord", e);
|
BungeeCore.get().getLogger().log(Level.SEVERE, "Could not send chat message to discord", e);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
for(ProxiedPlayer target : ProxyServer.getInstance().getPlayers()){
|
for(ProxiedPlayer target : ProxyServer.getInstance().getPlayers()){
|
||||||
Subserver targetServer = Subserver.getSubserver(target);
|
Subserver targetServer = Subserver.getSubserver(target);
|
||||||
if(!(targetServer == null || targetServer.getType() != Servertype.ARENA || targetServer.getServer() != target.getServer().getInfo())) continue;
|
if(!(targetServer == null || targetServer.getType() != Servertype.ARENA || targetServer.getServer() != target.getServer().getInfo())) continue;
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren