3.3 update to 4.0-DEV

This commit is contained in:
JaTiTV 2024-10-10 16:41:58 +02:00
parent 621458f59a
commit ac44919662
2 changed files with 11 additions and 10 deletions

View File

@ -6,7 +6,7 @@
<groupId>net.t2code</groupId> <groupId>net.t2code</groupId>
<artifactId>T2C-OPSecurity</artifactId> <artifactId>T2C-OPSecurity</artifactId>
<version>3.3_DEV-24</version> <version>4.0_DEV</version>
<packaging>jar</packaging> <packaging>jar</packaging>

View File

@ -21,16 +21,17 @@ public class PermissionCheck {
public static Boolean onCheck(Player player, Boolean join, String debug) { public static Boolean onCheck(Player player, Boolean join, String debug) {
if (!(boolean) PermissionWhitelist.VALUES.enable.getValue()) return false; if (!(boolean) PermissionWhitelist.VALUES.enable.getValue()) return false;
for (String perm : (List<String>) PermissionWhitelist.VALUES.permissions.getValue()) { for (String perm : (List<String>) PermissionWhitelist.VALUES.permissions.getValue()) {
if (!player.hasPermission(perm)) return false; if (!player.hasPermission(perm))continue;
T2C_Debug.debug(Main.getPlugin(), "[" + debug + "] check Permission: " + perm); T2C_Debug.debug(Main.getPlugin(), "[" + debug + "] check Permission: " + perm);
if (permWhitelist(player, debug)) return false; if (permWhitelist(player, debug)){
Bukkit.getScheduler().runTask(Main.getPlugin(), new Runnable() { Bukkit.getScheduler().runTask(Main.getPlugin(), new Runnable() {
@Override @Override
public void run() { public void run() {
execute(player, join, perm, debug); execute(player, join, perm, debug);
} }
}); });
return true; return true;
}
} }
return false; return false;
} }