From cfb12dfb75ac6adb38752e7e4a1c4910a20e538c Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Sun, 15 Nov 2020 20:45:34 +0100 Subject: [PATCH] Fixing Ban extended --- src/de/steamwar/bungeecore/sql/Punishment.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/de/steamwar/bungeecore/sql/Punishment.java b/src/de/steamwar/bungeecore/sql/Punishment.java index f6f1c2c..31e3934 100644 --- a/src/de/steamwar/bungeecore/sql/Punishment.java +++ b/src/de/steamwar/bungeecore/sql/Punishment.java @@ -117,22 +117,22 @@ public class Punishment { return perma; } - public void updateEndTime(int from, String reason, Timestamp newUpdate, boolean perma) { - StringBuilder newReason = new StringBuilder(reason); - if(newUpdate.before(endTime)) - newReason.append(" verkürtz vom ") + 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(reason); + .append(newreason); else - newReason.append(" verlängert vom ") + newReason.append("verlängert vo" + (this.perma?"n":"m") + " ") .append(getBantime()) .append(" von ") .append(SteamwarUser.get(from).getUserName()) .append(" Grund: ") - .append(reason); + .append(newreason); SQL.update("UPDATE Punishments SET EndTime = ?, Reason = ?, Perma = ? WHERE PunishmentId = ?", newUpdate, newReason.toString(), perma, id); this.reason = newReason.toString();