mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-01 14:38:56 +00:00
Add much more configuration ability to spam module. Fixes #247
This commit is contained in:
1 parent
e474be703e
commit
bd2fd0952f
14 files changed
+214
-90
No files matched your search
@@ -30,7 +30,8 @@ public enum Permission {
|
||||
CHECK_NOSWING,
|
||||
CHECK_FASTBREAK,
|
||||
CHECK_FASTPLACE,
|
||||
CHECK_SPAM,
|
||||
CHECK_CHATSPAM,
|
||||
CHECK_COMMANDSPAM,
|
||||
CHECK_SPRINT,
|
||||
CHECK_SNEAK,
|
||||
CHECK_SPEED,
|
||||
@@ -66,6 +67,7 @@ public enum Permission {
|
||||
private static final String PERMISSION_ALL = "anticheat.*";
|
||||
|
||||
public boolean get(CommandSender cs) {
|
||||
if ((this == CHECK_CHATSPAM || this == CHECK_COMMANDSPAM) && cs.hasPermission("anticheat.check.spam")) return true;
|
||||
return cs.hasPermission(toString()) || cs.hasPermission(getBase()) || cs.hasPermission(PERMISSION_ALL);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user