Add much more configuration ability to spam module. Fixes #247

This commit is contained in:
h31ix committed 2013-10-14 12:53:12 -04:00
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);
}