mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-01 22:14:49 +00:00
Implement Rules. Adds #154
This commit is contained in:
1 parent
5db99578ff
commit
2ceb16dcd2
10 files changed
+435
-102
No files matched your search
@@ -22,6 +22,7 @@ import net.h31ix.anticheat.Anticheat;
|
||||
import net.h31ix.anticheat.util.Configuration;
|
||||
import net.h31ix.anticheat.util.Level;
|
||||
import net.h31ix.anticheat.util.Utilities;
|
||||
import net.h31ix.anticheat.util.rule.Rule;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Player;
|
||||
@@ -77,6 +78,8 @@ public class User {
|
||||
return false;
|
||||
} else {
|
||||
level++;
|
||||
|
||||
// Check levels
|
||||
for(Level l : levels) {
|
||||
if(l.getValue() == level) {
|
||||
Anticheat.getManager().getUserManager().alert(this, l, type);
|
||||
@@ -85,6 +88,11 @@ public class User {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Execute rules
|
||||
for(Rule rule : config.getRules()) {
|
||||
rule.check(this, type);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user