Fixing...
Dieser Commit ist enthalten in:
Ursprung
cfb12dfb75
Commit
4137ebb61b
@ -56,7 +56,7 @@ public class BanCommand extends BasicCommand {
|
|||||||
}
|
}
|
||||||
String msg = banReason.toString();
|
String msg = banReason.toString();
|
||||||
target.ban(banTime, msg, SteamwarUser.get(sender.getName()).getId(), args[1].equalsIgnoreCase("perma"));
|
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){
|
public static Timestamp parseTime(CommandSender sender, String arg){
|
||||||
|
@ -52,6 +52,6 @@ public class MuteCommand extends BasicCommand {
|
|||||||
}
|
}
|
||||||
String msg = muteReason.toString();
|
String msg = muteReason.toString();
|
||||||
target.mute(muteTime, msg, SteamwarUser.get(sender.getName()).getId(), args[1].equalsIgnoreCase("perma"));
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -119,20 +119,14 @@ public class Punishment {
|
|||||||
|
|
||||||
public void updateEndTime(int from, String newreason, Timestamp newUpdate, boolean perma) {
|
public void updateEndTime(int from, String newreason, Timestamp newUpdate, boolean perma) {
|
||||||
StringBuilder newReason = new StringBuilder(this.reason);
|
StringBuilder newReason = new StringBuilder(this.reason);
|
||||||
if(newUpdate.before(endTime) || this.perma)
|
newReason.append("verändert von ")
|
||||||
newReason.append("verkürtz vo" + (this.perma?"n":"m") + " ")
|
.append(SteamwarUser.get(from).getUserName())
|
||||||
.append(getBantime())
|
.append(" von ")
|
||||||
.append(" von ")
|
.append(getBantime(endTime, this.perma))
|
||||||
.append(SteamwarUser.get(from).getUserName())
|
.append(" auf ")
|
||||||
.append(" Grund: ")
|
.append(getBantime(newUpdate, perma))
|
||||||
.append(newreason);
|
.append(" wegen ")
|
||||||
else
|
.append(newreason);
|
||||||
newReason.append("verlängert vo" + (this.perma?"n":"m") + " ")
|
|
||||||
.append(getBantime())
|
|
||||||
.append(" von ")
|
|
||||||
.append(SteamwarUser.get(from).getUserName())
|
|
||||||
.append(" Grund: ")
|
|
||||||
.append(newreason);
|
|
||||||
|
|
||||||
SQL.update("UPDATE Punishments SET EndTime = ?, Reason = ?, Perma = ? WHERE PunishmentId = ?", newUpdate, newReason.toString(), perma, id);
|
SQL.update("UPDATE Punishments SET EndTime = ?, Reason = ?, Perma = ? WHERE PunishmentId = ?", newUpdate, newReason.toString(), perma, id);
|
||||||
this.reason = newReason.toString();
|
this.reason = newReason.toString();
|
||||||
@ -140,7 +134,7 @@ public class Punishment {
|
|||||||
this.endTime = newUpdate;
|
this.endTime = newUpdate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getBantime() {
|
public String getBantime(Timestamp endTime, boolean perma) {
|
||||||
if(perma)
|
if(perma)
|
||||||
return "Permanent";
|
return "Permanent";
|
||||||
else
|
else
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren