SteamWar/BungeeCore
Archiviert
13
2

Fixing Ban extended

Dieser Commit ist enthalten in:
Chaoscaot 2020-11-15 20:45:34 +01:00
Ursprung aa73889ffe
Commit cfb12dfb75

Datei anzeigen

@ -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();