SteamWar/BungeeCore
Archiviert
13
2

Removed Ban Limiting

Dieser Commit ist enthalten in:
Chaoscaot 2020-10-30 21:46:20 +01:00
Ursprung 349e67ed5c
Commit be1aa30cd3
3 geänderte Dateien mit 8 neuen und 34 gelöschten Zeilen

Datei anzeigen

@ -46,14 +46,6 @@ public class BanCommand extends BasicCommand {
if(target == null)
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]);
if(banTime == null)
return;

Datei anzeigen

@ -42,14 +42,6 @@ public class MuteCommand extends BasicCommand {
if(target == null)
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]);
if(muteTime == null)
return;

Datei anzeigen

@ -21,26 +21,24 @@ package de.steamwar.bungeecore.sql;
public enum UserGroup {
Admin("§4", true, true, true, 6),
Developer("§3", true, true, true, 5),
Moderator("§c", true, true, true, 4),
Supporter("§6", false, true, true, 3),
Builder("§2", false, true, false, 2),
Youtuber("§5", false, false, false, 1),
Member("§7", false, false, false, 0);
Admin("§4", true, true, true),
Developer("§3", true, true, true),
Moderator("§c", true, true, true),
Supporter("§6", false, true, true),
Builder("§2", false, true, false),
Youtuber("§5", false, false, false),
Member("§7", false, false, false);
private final String colorCode;
private final boolean adminGroup;
private final boolean teamGroup;
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.adminGroup = adminGroup;
this.teamGroup = teamGroup;
this.checkSchematics = checkSchematics;
this.permissionlevel = permissionlevel;
}
public String getColorCode() {
@ -58,12 +56,4 @@ public enum UserGroup {
public boolean isCheckSchematics() {
return checkSchematics;
}
public int getPermissionlevel() {
return permissionlevel;
}
public boolean isHigherThen(UserGroup checkAgainst) {
return permissionlevel >= checkAgainst.permissionlevel;
}
}