Skip to content

Commit

Permalink
small change
Browse files Browse the repository at this point in the history
  • Loading branch information
mgmgprndev committed Sep 12, 2024
1 parent 3e125af commit 23be043
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/main/java/com/mogukun/sentry/Sentry.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public void onEnable() {
getServer().getPluginManager().registerEvents( new PlayerListener(), this );
getCommand("sentry").setExecutor( new SentryCommand() );
for ( Player p : Bukkit.getOnlinePlayers() ) Sentry.instance.checkManager.checkMap.remove(p.getUniqueId());

System.out.println("[Sentry] Loaded Sentry AntiCheat in " + ( System.currentTimeMillis() - startLoading ) + "ms.");
}
}
6 changes: 4 additions & 2 deletions src/main/java/com/mogukun/sentry/check/CheckManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,10 @@ public void runCheck(Player player, Packet packet) {

for ( Check check : init(player) )
{
check.handle(packet);
if ( data != null ) check.handle(data);
try {
check.handle(packet);
if ( data != null ) check.handle(data);
} catch (Exception ignore) {}
}
}).start();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import org.bukkit.event.entity.EntityDamageByEntityEvent;

import java.util.ArrayList;
import java.util.concurrent.ConcurrentLinkedDeque;

@CheckInfo(
name = "AutoClicker (A)",
Expand All @@ -19,7 +20,7 @@
public class AutoClickerA extends Check {


ArrayList<DeltaSample> samples = new ArrayList<>();
ConcurrentLinkedDeque<DeltaSample> samples = new ConcurrentLinkedDeque<>();
boolean isBreaking = false;
long lastArm = 0;
int buffer = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import org.bukkit.event.entity.EntityDamageByEntityEvent;

import java.util.ArrayList;
import java.util.concurrent.ConcurrentLinkedDeque;

@CheckInfo(
name = "AutoClicker (B)",
Expand All @@ -27,7 +28,7 @@ public class AutoClickerB extends Check {
long lastArm = 0;
long lastPlace = 0;

ArrayList<DeltaSample> samples = new ArrayList<>();
ConcurrentLinkedDeque<DeltaSample> samples = new ConcurrentLinkedDeque<>();
int buffer = 0;


Expand Down

0 comments on commit 23be043

Please sign in to comment.