mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-03 22:15:28 +00:00
I hate NPCs. Fixes #244
This commit is contained in:
1 parent
61dcbd5569
commit
1bdfa90ae9
1 file changed
+2
@@ -38,12 +38,14 @@ public class EventListener implements Listener {
|
|||||||
|
|
||||||
public static void log(String message, Player player, CheckType type) {
|
public static void log(String message, Player player, CheckType type) {
|
||||||
User user = getUserManager().getUser(player.getName());
|
User user = getUserManager().getUser(player.getName());
|
||||||
|
if(user != null) { // npc
|
||||||
logCheat(type, user);
|
logCheat(type, user);
|
||||||
if (user.increaseLevel(type) && message != null) {
|
if (user.increaseLevel(type) && message != null) {
|
||||||
Anticheat.getManager().log(message);
|
Anticheat.getManager().log(message);
|
||||||
}
|
}
|
||||||
removeDecrease(user);
|
removeDecrease(user);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static void logCheat(CheckType type, User user) {
|
private static void logCheat(CheckType type, User user) {
|
||||||
USAGE_LIST.put(type, getCheats(type) + 1);
|
USAGE_LIST.put(type, getCheats(type) + 1);
|
||||||
|
|||||||
Reference in new issue
Block a user