Ban System Rework #150
@ -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: ")
|
||||
Lixfel
hat
Schreib doch nur name(), dann kannst du beim Type-Getten auch einfach valueOf() machen. Schreib doch nur name(), dann kannst du beim Type-Getten auch einfach valueOf() machen.
|
||||
.append(reason);
|
||||
.append(newreason);
|
||||
|
||||
SQL.update("UPDATE Punishments SET EndTime = ?, Reason = ?, Perma = ? WHERE PunishmentId = ?", newUpdate, newReason.toString(), perma, id);
|
||||
this.reason = newReason.toString();
|
||||
Lixfel
hat
Siehe toDb() Siehe toDb()
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren
Offenes TODO?