geforkt von SteamWar/BungeeCore
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 SERVER_TEAMCHAT_PREFIX = "§8STC §e";
|
||||||
public static final String TEAMCHAT_PREFIX = "§8TC §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 CHAT_PREFIX;
|
||||||
public static String WORLD_FOLDER;
|
public static String WORLD_FOLDER;
|
||||||
|
@ -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 + 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){
|
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 + 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 (?, ?, ?, ?, ?, ?)",
|
SQL.update("INSERT INTO Punishments (UserId, Punisher, Type, Reason, EndTime, Perma) VALUES (?, ?, ?, ?, ?, ?)",
|
||||||
user, executor, type.name(), reason, endTime, perma);
|
user, executor, type.name(), reason, endTime, perma);
|
||||||
return getPunishmentOfPlayer(user, type);
|
return getPunishmentOfPlayer(user, type);
|
||||||
|
@ -153,6 +153,7 @@ public class SteamwarUser {
|
|||||||
return false;
|
return false;
|
||||||
if(!isCurrent(punishments.get(Punishment.PunishmentType.Ban))) {
|
if(!isCurrent(punishments.get(Punishment.PunishmentType.Ban))) {
|
||||||
SQL.update("DELETE FROM BannedUserIPs WHERE UserID = ?", id);
|
SQL.update("DELETE FROM BannedUserIPs WHERE UserID = ?", id);
|
||||||
|
punishments.remove(Punishment.PunishmentType.Ban);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -210,7 +211,7 @@ public class SteamwarUser {
|
|||||||
|
|
||||||
public void mute(Timestamp time, String muteReason, int from, boolean perma){
|
public void mute(Timestamp time, String muteReason, int from, boolean perma){
|
||||||
if(isMuted()) {
|
if(isMuted()) {
|
||||||
punishments.get(Punishment.PunishmentType.Ban).updateEndTime(from, muteReason, time, perma);
|
punishments.get(Punishment.PunishmentType.Mute).updateEndTime(from, muteReason, time, perma);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
punishments.remove(Punishment.PunishmentType.Mute);
|
punishments.remove(Punishment.PunishmentType.Mute);
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren