Refactored Ban Command to only allow downwards bans
Dieser Commit ist enthalten in:
Ursprung
6483729608
Commit
349e67ed5c
@ -46,6 +46,14 @@ public class BanCommand extends BasicCommand {
|
|||||||
if(target == null)
|
if(target == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
SteamwarUser p = SteamwarUser.get(sender.getName());
|
||||||
|
if(p.getUserGroup().isHigherThen(target.getUserGroup())) {
|
||||||
|
BungeeCore.send(sender, BungeeCore.CHAT_PREFIX + "§cDu kannst diesen Spieler nicht muten");
|
||||||
|
BungeeCore.send(BungeeCore.get().getProxy().getPlayer(target.getUuid()),
|
||||||
|
BungeeCore.CHAT_PREFIX + "§c" + p.getUserName() + " hat versucht dich zu Muten!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Timestamp banTime = parseTime(sender, args[1]);
|
Timestamp banTime = parseTime(sender, args[1]);
|
||||||
if(banTime == null)
|
if(banTime == null)
|
||||||
return;
|
return;
|
||||||
|
@ -42,6 +42,14 @@ public class MuteCommand extends BasicCommand {
|
|||||||
if(target == null)
|
if(target == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
SteamwarUser p = SteamwarUser.get(sender.getName());
|
||||||
|
if(p.getUserGroup().isHigherThen(target.getUserGroup())) {
|
||||||
|
BungeeCore.send(sender, BungeeCore.CHAT_PREFIX + "§cDu kannst diesen Spieler nicht bannen");
|
||||||
|
BungeeCore.send(BungeeCore.get().getProxy().getPlayer(target.getUuid()),
|
||||||
|
BungeeCore.CHAT_PREFIX + "§c" + p.getUserName() + " hat versucht dich zu Bannen!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Timestamp muteTime = BanCommand.parseTime(sender, args[1]);
|
Timestamp muteTime = BanCommand.parseTime(sender, args[1]);
|
||||||
if(muteTime == null)
|
if(muteTime == null)
|
||||||
return;
|
return;
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren