diff --git a/src/main/java/net/h31ix/anticheat/Permission.java b/src/main/java/net/h31ix/anticheat/Permission.java index aca7759..15557cb 100644 --- a/src/main/java/net/h31ix/anticheat/Permission.java +++ b/src/main/java/net/h31ix/anticheat/Permission.java @@ -1,7 +1,7 @@ package net.h31ix.anticheat; - + import org.bukkit.command.CommandSender; - + public enum Permission { /* Check Nodes */ @@ -27,7 +27,7 @@ public enum Permission CHECK_LONGREACH, CHECK_FASTPROJECTILE, CHECK_ITEMSPAM, - + /* System Nodes */ SYSTEM_LOG, SYSTEM_XRAY, @@ -37,20 +37,16 @@ public enum Permission SYSTEM_UPDATE, SYSTEM_REPORT, SYSTEM_RELOAD; - + public boolean get(CommandSender cs) { - return cs.hasPermission(parsePermissionNode()); + return cs.hasPermission(toString()); } - - private String parsePermissionNode() + + @Override + public String toString() { - return "anticheat." + parse(); + return "anticheat." + this.name().toLowerCase().replace("_", "."); } - - private String parse() - { - return this.name().toLowerCase().replace("_", "."); - } - + } \ No newline at end of file diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 4e42b58..6a72a7f 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -47,95 +47,95 @@ permissions: anticheat.system.reload: true anticheat.system.reset: true anticheat.system.update: true - anticheat.zombe.fly: + anticheat.check.zombe.fly: description: Allow players to use zombe flymod default: false - anticheat.zombe.noclip: + anticheat.check.zombe.noclip: description: Allow players to use zombe noclip hack default: false - anticheat.zombe.cheat: + anticheat.check.zombe.cheat: description: Allow players to use zombe cheat hack default: false - anticheat.fly: + anticheat.check.fly: description: Allow players to fly default: false - anticheat.waterwalk: + anticheat.check.waterwalk: description: Allow players to walk on water default: false - anticheat.noswing: + anticheat.check.noswing: description: Allow players to not ever swing their arm default: false - anticheat.fastbreak: + anticheat.check.fastbreak: description: Allow players to quickly break blocks default: false - anticheat.fastplace: + anticheat.check.fastplace: description: Allow players to use build hacks and fastplace default: false - anticheat.spam: + anticheat.check.spam: description: Allow players to spam the server default: false - anticheat.sprint: + anticheat.check.sprint: description: Allow players to sprint when hungry default: false - anticheat.sneak: + anticheat.check.sneak: description: Allow players to use auto-sneak default: false - anticheat.speed: - description: Use this with anticheat.flyhack to allow more speed + anticheat.check.speed: + description: Use this with anticheat.check.flyhack to allow more speed default: false - anticheat.spider: + anticheat.check.spider: description: Allow players to climb non-climbable surfaces default: false - anticheat.nofall: + anticheat.check.nofall: description: Allow players to avoid fall damage default: false - anticheat.fastbow: + anticheat.check.fastbow: description: Allow players to quickly fire bows default: false - anticheat.fasteat: + anticheat.check.fasteat: description: Allow players to eat food instantly default: false - anticheat.fastheal: + anticheat.check.fastheal: description: Allow players to heal up instantly default: false - anticheat.forcefield: + anticheat.check.forcefield: description: Allow players to use a forcefield default: false - anticheat.xray: + anticheat.check.xray: description: Allow players to bypass xray stats default: false - anticheat.longreach: + anticheat.check.longreach: description: Allow players to use longreaching hacks default: false - anticheat.projectile: + anticheat.check.projectile: description: Allow players to quickly launch projectiles default: false - anticheat.itemspam: + anticheat.check.itemspam: description: Allow players to use inventory drop spam hacks default: false - anticheat.exempt: + anticheat.check.exempt: description: Total exemption from checks default: false children: - anticheat.zombe.fly: true - anticheat.zombe.noclip: true - anticheat.zombe.cheat: true - anticheat.fly: true - anticheat.waterwalk: true - anticheat.noswing: true - anticheat.fastbreak: true - anticheat.fastplace: true - anticheat.spam: true - anticheat.sprint: true - anticheat.sneak: true - anticheat.speed: true - anticheat.spider: true - anticheat.nofall: true - anticheat.fastbow: true - anticheat.fasteat: true - anticheat.fastheal: true - anticheat.forcefield: true - anticheat.xray: true - anticheat.longreach: true - anticheat.projectile: true - anticheat.itemspam: true \ No newline at end of file + anticheat.check.zombe.fly: true + anticheat.check.zombe.noclip: true + anticheat.check.zombe.cheat: true + anticheat.check.fly: true + anticheat.check.waterwalk: true + anticheat.check.noswing: true + anticheat.check.fastbreak: true + anticheat.check.fastplace: true + anticheat.check.spam: true + anticheat.check.sprint: true + anticheat.check.sneak: true + anticheat.check.speed: true + anticheat.check.spider: true + anticheat.check.nofall: true + anticheat.check.fastbow: true + anticheat.check.fasteat: true + anticheat.check.fastheal: true + anticheat.check.forcefield: true + anticheat.check.xray: true + anticheat.check.longreach: true + anticheat.check.projectile: true + anticheat.check.itemspam: true \ No newline at end of file