/tc <message> doesnt work

This commit is contained in:
grng 2024-07-25 11:21:28 +01:00
parent 6dec52a317
commit 696e2b09aa

View file

@ -70,14 +70,14 @@ public class TeamChatCommand implements CommandExecutor {
civilCore.teamChatRegister.remove(p);
}*/
String formatted = String.format("%s%s: %s", getPrefix(player_name, inTeamChat) + " ", player_name, message);
if (!inTeamChat) {
civilCore.teamChatRegister.remove(p);
String formatted = String.format("%s%s: %s", getPrefix(player_name, inTeamChat) + " ", player_name, message);
Bukkit.broadcastMessage(formatted);
civilCore.teamChatRegister.add(p);
} else {
civilCore.teamChatRegister.add(p);
String formatted = String.format("%s%s: %s", getPrefix(player_name, inTeamChat) + " ", player_name, message);
List<DbPlayer> players = civilCore.db.getPlayersInTeam(dbPlayer.team.name);
if (players == null) return true;