mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-01 22:14:49 +00:00
Fixed extra ZOMBE_FLY checks, properly checks for null named NPCs
This commit is contained in:
1 parent
1cbd3d375a
commit
53e1def6ad
2 files changed
+3
-3
No files matched your search
@@ -47,9 +47,9 @@ public class EventListener implements Listener {
|
||||
|
||||
private static void logCheat(CheckType type, User user) {
|
||||
USAGE_LIST.put(type, getCheats(type) + 1);
|
||||
type.logUse(user.getName());
|
||||
// Ignore plugins that are creating NPCs with no names (why the hell)
|
||||
if (user.getName() != null) {
|
||||
type.logUse(user.getName());
|
||||
if (Anticheat.getManager().getConfiguration().getFileLogLevel() == 2 && type.getUses(user.getName()) % 10 == 0) {
|
||||
Anticheat.getManager().fileLog(user.getName() + " has triggered multiple " + type + " checks.");
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ public class PlayerListener extends EventListener {
|
||||
@EventHandler
|
||||
public void onPlayerVelocity(PlayerVelocityEvent event) {
|
||||
Player player = event.getPlayer();
|
||||
if (getCheckManager().willCheck(player, CheckType.FLY) && getCheckManager().willCheck(player, CheckType.ZOMBE_FLY)) // @h31ix: Change if necessary. I'm not sure what perms should go here :3
|
||||
if (getCheckManager().willCheck(player, CheckType.FLY))
|
||||
{
|
||||
if (getBackend().justVelocity(player) && getBackend().extendVelocityTime(player)) {
|
||||
event.setCancelled(!silentMode());
|
||||
@@ -423,7 +423,7 @@ public class PlayerListener extends EventListener {
|
||||
return;
|
||||
}
|
||||
|
||||
if (getCheckManager().willCheck(player, CheckType.FLY) && !player.isFlying() && getCheckManager().willCheck(player, CheckType.ZOMBE_FLY)) {
|
||||
if (getCheckManager().willCheck(player, CheckType.FLY)) {
|
||||
CheckResult result1 = getBackend().checkYAxis(player, new Distance(from, to));
|
||||
CheckResult result2 = getBackend().checkAscension(player, from.getY(), to.getY());
|
||||
String log = result1.failed() ? result1.getMessage() : result2.failed() ? result2.getMessage() : "";
|
||||
|
||||
Reference in new issue
Block a user