Fixing Everything
Dieser Commit ist enthalten in:
Ursprung
4137ebb61b
Commit
3cb5eac639
@ -54,7 +54,7 @@ public class BungeeCore extends Plugin {
|
||||
|
||||
public static final String SERVER_TEAMCHAT_PREFIX = "§8STC §e";
|
||||
public static final String TEAMCHAT_PREFIX = "§8TC §e";
|
||||
public static final DateTimeFormatter DATE_FORMAT = DateTimeFormatter.ofPattern("HH:mm dd.MM.yyyy");
|
||||
public static final DateTimeFormatter DATE_FORMAT = DateTimeFormatter.ofPattern("dd.MM.yyyy HH:mm");
|
||||
|
||||
public static String CHAT_PREFIX;
|
||||
public static String WORLD_FOLDER;
|
||||
|
@ -56,7 +56,7 @@ public class BanCommand extends BasicCommand {
|
||||
}
|
||||
String msg = banReason.toString();
|
||||
target.ban(banTime, msg, SteamwarUser.get(sender.getName()).getId(), args[1].equalsIgnoreCase("perma"));
|
||||
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);
|
||||
ServerTeamchatCommand.sendToTeam(BungeeCore.CHAT_PREFIX + "§c" + target.getUserName() + " wurde von " + 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){
|
||||
|
@ -52,6 +52,6 @@ public class MuteCommand extends BasicCommand {
|
||||
}
|
||||
String msg = muteReason.toString();
|
||||
target.mute(muteTime, msg, SteamwarUser.get(sender.getName()).getId(), args[1].equalsIgnoreCase("perma"));
|
||||
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);
|
||||
ServerTeamchatCommand.sendToTeam(BungeeCore.CHAT_PREFIX + "§c" + target.getUserName() + " wurde von " + sender.getName() + " §c" + (args[1].equalsIgnoreCase("perma")?"Permanent":"bis zum " + muteTime.toLocalDateTime().format(BungeeCore.DATE_FORMAT)) + " gemuted. §f§lGrund: §f" + muteReason);
|
||||
}
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ public class Punishment {
|
||||
}
|
||||
}
|
||||
|
||||
public static Punishment createPunishment(int user, int executor, PunishmentType type, String reason, Timestamp endTime, Boolean perma) {
|
||||
public static Punishment createPunishment(int user, int executor, PunishmentType type, String reason, Timestamp endTime, boolean perma) {
|
||||
SQL.update("INSERT INTO Punishments (UserId, Punisher, Type, Reason, EndTime, Perma) VALUES (?, ?, ?, ?, ?, ?)",
|
||||
user, executor, type.name(), reason, endTime, perma);
|
||||
return getPunishmentOfPlayer(user, type);
|
||||
|
@ -153,6 +153,7 @@ public class SteamwarUser {
|
||||
return false;
|
||||
if(!isCurrent(punishments.get(Punishment.PunishmentType.Ban))) {
|
||||
SQL.update("DELETE FROM BannedUserIPs WHERE UserID = ?", id);
|
||||
punishments.remove(Punishment.PunishmentType.Ban);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@ -210,7 +211,7 @@ public class SteamwarUser {
|
||||
|
||||
public void mute(Timestamp time, String muteReason, int from, boolean perma){
|
||||
if(isMuted()) {
|
||||
punishments.get(Punishment.PunishmentType.Ban).updateEndTime(from, muteReason, time, perma);
|
||||
punishments.get(Punishment.PunishmentType.Mute).updateEndTime(from, muteReason, time, perma);
|
||||
return;
|
||||
}
|
||||
punishments.remove(Punishment.PunishmentType.Mute);
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren