diff --git a/src/de/steamwar/bungeecore/commands/BanCommand.java b/src/de/steamwar/bungeecore/commands/BanCommand.java index ff4516bc..0e6e55b2 100644 --- a/src/de/steamwar/bungeecore/commands/BanCommand.java +++ b/src/de/steamwar/bungeecore/commands/BanCommand.java @@ -56,7 +56,7 @@ public class BanCommand extends BasicCommand { } String msg = banReason.toString(); target.ban(banTime, msg, SteamwarUser.get(sender.getName()).getId(), args[1].equalsIgnoreCase("perma")); - ServerTeamchatCommand.sendToTeam(BungeeCore.CHAT_PREFIX + "§c" + target.getUserName() + " wurde von " + sender.getName() + " " + (args[1].equalsIgnoreCase("perma")?"Permanent":"bis zum " + banTime.toLocalDateTime().format(BungeeCore.DATE_FORMAT)) + " gebannt. §f§lGrund: §f" + banReason); + ServerTeamchatCommand.sendToTeam(BungeeCore.CHAT_PREFIX + target.getUserGroup().getColorCode() + target.getUserName() + "§c wurde von " + SteamwarUser.get(sender.getName()).getUserGroup().getColorCode() + sender.getName() + " §c" + (args[1].equalsIgnoreCase("perma")?"Permanent":"bis zum " + banTime.toLocalDateTime().format(BungeeCore.DATE_FORMAT)) + " gebannt. §f§lGrund: §f" + banReason); } public static Timestamp parseTime(CommandSender sender, String arg){ diff --git a/src/de/steamwar/bungeecore/commands/MuteCommand.java b/src/de/steamwar/bungeecore/commands/MuteCommand.java index edd429a5..7590d228 100644 --- a/src/de/steamwar/bungeecore/commands/MuteCommand.java +++ b/src/de/steamwar/bungeecore/commands/MuteCommand.java @@ -52,6 +52,6 @@ public class MuteCommand extends BasicCommand { } String msg = muteReason.toString(); target.mute(muteTime, msg, SteamwarUser.get(sender.getName()).getId(), args[1].equalsIgnoreCase("perma")); - ServerTeamchatCommand.sendToTeam(BungeeCore.CHAT_PREFIX + "§c" + target.getUserName() + " wurde von " + sender.getName() + " " + (args[1].equalsIgnoreCase("perma")?"Permanent":"bis zum " + muteTime.toLocalDateTime().format(BungeeCore.DATE_FORMAT)) + " gemuted. §f§lGrund: §f" + muteReason); + ServerTeamchatCommand.sendToTeam(BungeeCore.CHAT_PREFIX + target.getUserGroup().getColorCode() + target.getUserName() + "§c wurde von " + SteamwarUser.get(sender.getName()).getUserGroup().getColorCode() + sender.getName() + " §c" + (args[1].equalsIgnoreCase("perma")?"Permanent":"bis zum " + muteTime.toLocalDateTime().format(BungeeCore.DATE_FORMAT)) + " gemuted. §f§lGrund: §f" + muteReason); } } diff --git a/src/de/steamwar/bungeecore/sql/Punishment.java b/src/de/steamwar/bungeecore/sql/Punishment.java index 31e3934f..abd3bee3 100644 --- a/src/de/steamwar/bungeecore/sql/Punishment.java +++ b/src/de/steamwar/bungeecore/sql/Punishment.java @@ -119,20 +119,14 @@ public class Punishment { public void updateEndTime(int from, String newreason, Timestamp newUpdate, boolean perma) { StringBuilder newReason = new StringBuilder(this.reason); - if(newUpdate.before(endTime) || this.perma) - newReason.append("verkürtz vo" + (this.perma?"n":"m") + " ") - .append(getBantime()) - .append(" von ") - .append(SteamwarUser.get(from).getUserName()) - .append(" Grund: ") - .append(newreason); - else - newReason.append("verlängert vo" + (this.perma?"n":"m") + " ") - .append(getBantime()) - .append(" von ") - .append(SteamwarUser.get(from).getUserName()) - .append(" Grund: ") - .append(newreason); + newReason.append("verändert von ") + .append(SteamwarUser.get(from).getUserName()) + .append(" von ") + .append(getBantime(endTime, this.perma)) + .append(" auf ") + .append(getBantime(newUpdate, perma)) + .append(" wegen ") + .append(newreason); SQL.update("UPDATE Punishments SET EndTime = ?, Reason = ?, Perma = ? WHERE PunishmentId = ?", newUpdate, newReason.toString(), perma, id); this.reason = newReason.toString(); @@ -140,7 +134,7 @@ public class Punishment { this.endTime = newUpdate; } - public String getBantime() { + public String getBantime(Timestamp endTime, boolean perma) { if(perma) return "Permanent"; else