Removed Ban Limiting
Dieser Commit ist enthalten in:
Ursprung
349e67ed5c
Commit
be1aa30cd3
@ -46,14 +46,6 @@ 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,14 +42,6 @@ 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;
|
||||||
|
@ -21,26 +21,24 @@ package de.steamwar.bungeecore.sql;
|
|||||||
|
|
||||||
public enum UserGroup {
|
public enum UserGroup {
|
||||||
|
|
||||||
Admin("§4", true, true, true, 6),
|
Admin("§4", true, true, true),
|
||||||
Developer("§3", true, true, true, 5),
|
Developer("§3", true, true, true),
|
||||||
Moderator("§c", true, true, true, 4),
|
Moderator("§c", true, true, true),
|
||||||
Supporter("§6", false, true, true, 3),
|
Supporter("§6", false, true, true),
|
||||||
Builder("§2", false, true, false, 2),
|
Builder("§2", false, true, false),
|
||||||
Youtuber("§5", false, false, false, 1),
|
Youtuber("§5", false, false, false),
|
||||||
Member("§7", false, false, false, 0);
|
Member("§7", false, false, false);
|
||||||
|
|
||||||
private final String colorCode;
|
private final String colorCode;
|
||||||
private final boolean adminGroup;
|
private final boolean adminGroup;
|
||||||
private final boolean teamGroup;
|
private final boolean teamGroup;
|
||||||
private final boolean checkSchematics;
|
private final boolean checkSchematics;
|
||||||
private final int permissionlevel;
|
|
||||||
|
|
||||||
UserGroup(String colorCode, boolean adminGroup, boolean teamGroup, boolean checkSchematics, int permissionlevel) {
|
UserGroup(String colorCode, boolean adminGroup, boolean teamGroup, boolean checkSchematics) {
|
||||||
this.colorCode = colorCode;
|
this.colorCode = colorCode;
|
||||||
this.adminGroup = adminGroup;
|
this.adminGroup = adminGroup;
|
||||||
this.teamGroup = teamGroup;
|
this.teamGroup = teamGroup;
|
||||||
this.checkSchematics = checkSchematics;
|
this.checkSchematics = checkSchematics;
|
||||||
this.permissionlevel = permissionlevel;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getColorCode() {
|
public String getColorCode() {
|
||||||
@ -58,12 +56,4 @@ public enum UserGroup {
|
|||||||
public boolean isCheckSchematics() {
|
public boolean isCheckSchematics() {
|
||||||
return checkSchematics;
|
return checkSchematics;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getPermissionlevel() {
|
|
||||||
return permissionlevel;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isHigherThen(UserGroup checkAgainst) {
|
|
||||||
return permissionlevel >= checkAgainst.permissionlevel;
|
|
||||||
}
|
|
||||||
}
|
}
|
In neuem Issue referenzieren
Einen Benutzer sperren