From 06d18866b64575a40510f5de38b53aba7966b62d Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Tue, 24 Nov 2020 16:38:47 +0100 Subject: [PATCH] Add Multilang --- src/de/steamwar/bungeecore/sql/Punishment.java | 13 ++++--------- src/de/steamwar/messages/BungeeCore.properties | 2 +- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/de/steamwar/bungeecore/sql/Punishment.java b/src/de/steamwar/bungeecore/sql/Punishment.java index e39f854..321fb87 100644 --- a/src/de/steamwar/bungeecore/sql/Punishment.java +++ b/src/de/steamwar/bungeecore/sql/Punishment.java @@ -119,15 +119,10 @@ public class Punishment { } public void updateEndTime(int from, String newreason, Timestamp newUpdate, boolean perma) { - StringBuilder newReason = new StringBuilder(this.reason); - 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); + String newReason = Message.parse("BAN_CHANGED", SteamwarUser.get(from).getPlayer(), SteamwarUser.get(from).getUserName(), + getBantime(endTime, this.perma), + getBantime(newUpdate, perma), + newreason); SQL.update("UPDATE Punishments SET EndTime = ?, Reason = ?, Perma = ? WHERE PunishmentId = ?", newUpdate, newReason.toString(), perma, id); this.reason = newReason.toString(); diff --git a/src/de/steamwar/messages/BungeeCore.properties b/src/de/steamwar/messages/BungeeCore.properties index 8d08c2c..63f47ac 100644 --- a/src/de/steamwar/messages/BungeeCore.properties +++ b/src/de/steamwar/messages/BungeeCore.properties @@ -73,7 +73,7 @@ BANNED_MESSAGE_UNTIL=Du bist bis zum {0} gebannt. §r§lGrund§r: §c{1} MUTE_TEAM_MUTED=§c {0} wurde von {1} {2} gemuted. §f§lGrund: §f{3} MUTED_MESSAGE_PERMA=§cDu bist permanent gemuted. §r§lGrund§r: §c{0} MUTED_MESSAGE_UNTIL=Du bist bis zum {0} gemuted. §r§lGrund§r: §c{1} -BAN_CHANGED={0} verändert von {1} von +BAN_CHANGED={0} verändert von {1} von {2} auf {3} wegen {4} BAN_INVALID_TIME=§cUngültige Zeitangabe. BAN_PERMA=Permanent BAN_UNTIL=bis zum