From be1aa30cd3e10e21adbb9c1411ba48f1a38bad48 Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Fri, 30 Oct 2020 21:46:20 +0100 Subject: [PATCH] Removed Ban Limiting --- .../bungeecore/commands/BanCommand.java | 8 ------ .../bungeecore/commands/MuteCommand.java | 8 ------ src/de/steamwar/bungeecore/sql/UserGroup.java | 26 ++++++------------- 3 files changed, 8 insertions(+), 34 deletions(-) diff --git a/src/de/steamwar/bungeecore/commands/BanCommand.java b/src/de/steamwar/bungeecore/commands/BanCommand.java index 355efec..9ac7ff8 100644 --- a/src/de/steamwar/bungeecore/commands/BanCommand.java +++ b/src/de/steamwar/bungeecore/commands/BanCommand.java @@ -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; diff --git a/src/de/steamwar/bungeecore/commands/MuteCommand.java b/src/de/steamwar/bungeecore/commands/MuteCommand.java index 7ddd303..dc0d681 100644 --- a/src/de/steamwar/bungeecore/commands/MuteCommand.java +++ b/src/de/steamwar/bungeecore/commands/MuteCommand.java @@ -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; diff --git a/src/de/steamwar/bungeecore/sql/UserGroup.java b/src/de/steamwar/bungeecore/sql/UserGroup.java index 330f69d..632ef28 100644 --- a/src/de/steamwar/bungeecore/sql/UserGroup.java +++ b/src/de/steamwar/bungeecore/sql/UserGroup.java @@ -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; - } } \ No newline at end of file