Sigma 4.11 AutoClicker module 2 files, 92 lines

Sigma 4.11 AutoClicker: Full Source Analysis

Sigma 4.11's AutoClicker fires from the EventUpdate pre branch with four settings: a base CPS (1-20, default 8), a RANDOM toggle, MIN/MAX randomization bounds (default 7/10), and an ON-MOUSE hold gate.

info/sigmaclient/module/impl/combat/AutoClicker.java · GitHub source ↗

Published 2026-08-12 · Updated 2026-08-12

Packets This Module Uses

Analysis

Overview

Sigma 4.11's AutoClicker fires from the EventUpdate pre branch with four settings: a base CPS (1-20, default 8), a RANDOM toggle, MIN/MAX randomization bounds (default 7/10), and an ON-MOUSE hold gate. The per-click delay is 1000 / cpsdel, where cpsdel is the base CPS plus a fresh random draw on every click, and the draw formula hides a bound inversion: randomNumber(max, min) returns -min + (int)(Math.random() * ((max + min) + 1)), and the module calls it as randomNumber(minran, maxran), so the effective range is [-MAX, +MIN] - the 'MAX' setting controls the downward jitter. At defaults that is a uniform draw from -10..+7 layered on 8 CPS, clamped to a minimum of 1, so delays span 66.7ms to 1000ms and roughly one click in six (the draws -10, -9, -8) stalls for a full second. Each accepted click runs onStoppedUsingItem, swingItem and clickMouse; the vanilla clickMouse in this fork swings again at its top, so one click emits two C0A arm swings in the same tick followed by the C02 ATTACK when an entity is hovered.

Click scheduling

The delay is recomputed from scratch on every fire. randomNumber(max, min) (lines 31-34) evaluates -min + (int)(Math.random() * ((max - (-min)) + 1)), and the call site passes (minran, maxran), so with the parameter names reversed the returned integer is uniform over [-maxran, +minran]. With the defaults MIN=7, MAX=10 that is -10..+7, and because the draw is iid uniform, 3 of the 18 outcomes (-10, -9, -8) push cpsdel to 0 or below, where the clamp at line 50 forces a 1 CPS floor: those clicks wait a full 1000ms. The remaining 15 outcomes yield delays between 1000/15 = 66.7ms and 1000/12 = 83.3ms (cpsdel 15 down to 12), so the module's real behavior at defaults is short bursts of 12-15 CPS punctuated by ~1-in-6 one-second gaps - not a normal distribution around 8 CPS, but a clipped uniform. The Timer is Sigma's util Timer: delay(float) compares (System.nanoTime() / 1000000L) - prevMS against the millisecond target and reset() stamps prevMS after each fire, so the period is measured fire-to-fire on a monotonic clock, immune to wall-clock changes. The pre gate (lines 41-44) requires the pre phase, no open screen, an alive player, and - when ON-MOUSE is on - Mouse.isButtonDown(0), so a release stops emission on the next update.

Click emission

Each accepted click runs three calls in sequence. onStoppedUsingItem (line 53) ends any active item use so the click is not consumed as a block-release. swingItem() (line 54) sends the C0A arm swing. clickMouse() (line 55) is the vanilla Minecraft.clickMouse of this fork, which swings again at its top when leftClickCounter <= 0 and then routes by the hit type: an ENTITY hit goes through playerController.attackEntity, which in this fork does not swing itself and simply queues the C02PacketUseEntity ATTACK; a BLOCK hit starts digging (C07), and a MISS resets leftClickCounter to 10 for non-creative. The net effect for entity combat is two C0A packets in the same tick followed by one C02 - the second swing passes EntityPlayer.swingItem's isSwingInProgress guard because the first swing set swingProgressInt to -1. The swing-to-attack ratio is therefore 2:1 with both swings clustered at the attack tick, a distinctive burst pattern a human never produces (real double-swinging is separated by at least a tick of render time). The explicit swingItem also guarantees a C0A even on a MISS, so the module never attacks or swings silently.

Hold behavior and statistical shape

The ON-MOUSE gate is re-evaluated on every pre tick, so clicks begin and end with the physical button - there is no release ramp and no minimum-hold time, which a human's 50-200ms micro-releases would show as gaps. The randomization is the module's only humanizing element, and it is per-click rather than per-window: consecutive intervals are iid uniform draws from the clipped range, so a short trace of deltas looks plausibly organic. But the counter surface is statistical: window-averaged CPS (the 20-click windows Hawk's FightSpeedConsistency samples) converges by the law of large numbers to the mean of the clipped distribution, so the variance that hides the module per-click vanishes in the window averages. The bound inversion also means the settings dialog is misleading - raising MAX widens the downward jitter and lowers the mean CPS, while raising MIN raises the ceiling - which is worth knowing for any manual bypass tuning.

source AutoClicker.java (module)

AutoClicker.java61 lines · JavaOriginal ↗
1
package info.sigmaclient.module.impl.combat;
2
3
import info.sigmaclient.event.Event;
4
import info.sigmaclient.event.RegisterEvent;
5
import info.sigmaclient.event.impl.EventUpdate;
6
import info.sigmaclient.module.Module;
7
import info.sigmaclient.module.data.ModuleData;
8
import info.sigmaclient.module.data.Setting;
9
import info.sigmaclient.util.Timer;
10
11
import org.lwjgl.input.Mouse;
12
13
public class AutoClicker extends Module {
14
	
15
    public AutoClicker(ModuleData data) {
16
        super(data);
17
        settings.put(CPS, new Setting<>(CPS, 8, "Base click per seconds.", 1,1, 20));
18
        settings.put(RANDOM, new Setting<>(RANDOM, true, "Randomize click delay."));
19
        settings.put(MIN, new Setting<>(MIN, 7, "Minimum click randomization.", 1, 1, 20));
20
        settings.put(MAX, new Setting<>(MAX, 10, "Maximum click randomization.", 1, 1, 20));
21
        settings.put(MOUSE, new Setting<>(MOUSE, true, "Click when mouse is held down."));
22
    }
23
24
    private final String CPS = "CPS";
25
    private final String RANDOM = "RANDOM";
26
    private final String MIN = "MINRAND";
27
    private final String MAX = "MAXRAND";
28
    private final String MOUSE = "ON-MOUSE";
29
    Timer timer = new Timer();
30
31
    public static int randomNumber(int max, int min) {
32
        int ii = -min + (int) (Math.random() * ((max - (-min)) + 1));
33
        return ii;
34
    }
35
36
    @Override
37
    @RegisterEvent(events = {EventUpdate.class})
38
    public void onEvent(Event event) {
39
        if (event instanceof EventUpdate) {
40
            EventUpdate em = (EventUpdate) event;
41
            if (em.isPre() && mc.currentScreen == null && mc.thePlayer.isEntityAlive()) {
42
                if ((Boolean) settings.get(MOUSE).getValue() && !Mouse.isButtonDown(0)) {
43
                    return;
44
                }
45
                int cps = ((Number) settings.get(CPS).getValue()).intValue();
46
                int minran = ((Number) settings.get(MIN).getValue()).intValue();
47
                int maxran = ((Number) settings.get(MAX).getValue()).intValue();
48
                boolean random = ((Boolean) settings.get(RANDOM).getValue());
49
                int rand = random ? randomNumber(minran, maxran) : 0;
50
                int cpsdel = cps+rand <= 0? 1:cps+rand;
51
                long del = 1000/(cpsdel) ;
52
                if (timer.delay(del)) {
53
                    mc.playerController.onStoppedUsingItem(mc.thePlayer);
54
                    mc.thePlayer.swingItem();
55
                    mc.clickMouse();
56
                    timer.reset();
57
                }
58
            }
59
        }
60
    }
61
}

What this file does

The module is 61 lines. The constructor (lines 15-22) registers the five settings with their defaults: CPS 8 (1-20), RANDOM true, MIN 7, MAX 10, ON-MOUSE true. The randomization helper is lines 31-34: randomNumber(max, min) = -min + (int)(Math.random() * ((max + min) + 1)), and the call site at line 49 passes (minran, maxran), inverting the named roles so the draw spans [-MAX, +MIN]. The onEvent handler (lines 36-60) is annotated @RegisterEvent(events = {EventUpdate.class}) and branches on the pre phase (line 41), guarding against an open screen, a dead player, and (line 42-44) a released mouse when ON-MOUSE is set. The delay computation is lines 45-51: cpsdel = cps + rand, clamped to at least 1, del = 1000 / cpsdel; the clamp means the draw outcomes at or below -cps produce the full one-second wait described in the overview. Lines 52-57 are the emission: timer.delay(del) must pass, then onStoppedUsingItem, swingItem and clickMouse, then timer.reset() so the next interval is measured from this fire. The double-swing detail comes from this fork's Minecraft.clickMouse, which calls swingItem() at its top when leftClickCounter <= 0 before dispatching the hit action; attackEntity itself only queues the C02.

source Timer.java (delay gate)

Timer.java31 lines · JavaOriginal ↗
1
package info.sigmaclient.util;
2
3
public class Timer {
4
5
    private long prevMS;
6
7
    public Timer() {
8
        this.prevMS = 0L;
9
    }
10
11
    public boolean delay(float milliSec) {
12
        return (float) (getTime() - this.prevMS) >= milliSec;
13
    }
14
15
    public void reset() {
16
        this.prevMS = getTime();
17
    }
18
19
    public long getTime() {
20
        return System.nanoTime() / 1000000L;
21
    }
22
23
    public long getDifference() {
24
        return getTime() - this.prevMS;
25
    }
26
27
    public void setDifference(long difference) {
28
        this.prevMS = (getTime() - difference);
29
    }
30
31
}

What this file does

Sigma's Timer is a monotonic millisecond clock. getTime() (lines 19-21) returns System.nanoTime() / 1000000L, so elapsed time is measured against the uptime clock rather than wall time - a system clock change mid-click cannot stretch or compress the cadence. delay(float milliSec) (lines 11-13) passes when getTime() - prevMS >= milliSec, and reset() (lines 15-17) stamps prevMS with the current getTime(). The AutoClicker calls delay(del) with the freshly computed 1000/cpsdel and resets immediately after a fire, so each interval is measured from the previous fire, exactly like Spicy's Timer but on the monotonic clock. The class also exposes setDifference, used by other Sigma modules to shift prevMS backwards (effectively pre-arming the timer); the AutoClicker never uses it, so its delay can never fire early, only late by the tick-polling quantization.

anticheat Countering Checks

The anticheat code that detects or counters the techniques this module uses. Full source, with the detection mechanism explained below each box.

anticheat FightSpeed (CPS cap on tick deltas)

FightSpeed.java90 lines · Java
1
/*
2
 * This file is part of Hawk Anticheat.
3
 * Copyright (C) 2018 Hawk Development Team
4
 *
5
 * This program is free software: you can redistribute it and/or modify
6
 * it under the terms of the GNU General Public License as published by
7
 * the Free Software Foundation, either version 3 of the License, or
8
 * (at your option) any later version.
9
 *
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU General Public License
16
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
17
 */
18
19
package me.islandscout.hawk.check.combat;
20
21
import me.islandscout.hawk.HawkPlayer;
22
import me.islandscout.hawk.check.EntityInteractionCheck;
23
import me.islandscout.hawk.event.InteractAction;
24
import me.islandscout.hawk.event.InteractEntityEvent;
25
import me.islandscout.hawk.util.MathPlus;
26
import me.islandscout.hawk.util.Placeholder;
27
import org.bukkit.entity.Player;
28
29
import java.util.*;
30
31
public class FightSpeed extends EntityInteractionCheck {
32
33
    //This check is very similar to the FightSpeedConsistency check, however I will
34
    //not be merging these, because their SAMPLES variable may vary
35
    //based on configuration. For instance, FightSpeedConsistency relies on samples
36
    //of 5, yet this check relies on samples of 10.
37
38
    private final Map<UUID, Long> lastClickTime; //in client ticks
39
    private final Map<UUID, List<Long>> deltaTimes;
40
    private static final double RECORD_SENSITIVITY = 4; //don't log click if it took longer than these ticks
41
    private static int SAMPLES;
42
    private final double MAX_CPS;
43
44
    public FightSpeed() {
45
        super("fightspeed", "%player% failed attack speed. CPS: %cps%, VL: %vl%");
46
        lastClickTime = new HashMap<>();
47
        deltaTimes = new HashMap<>();
48
        SAMPLES = (int)customSetting("sampleSize", "", 10);
49
        MAX_CPS = (double)customSetting("maxCps", "", 16D);
50
    }
51
52
    @Override
53
    protected void check(InteractEntityEvent e) {
54
        if (e.getInteractAction() == InteractAction.INTERACT)
55
            return;
56
        UUID uuid = e.getPlayer().getUniqueId();
57
        HawkPlayer pp = e.getHawkPlayer();
58
        if (lastClickTime.containsKey(uuid)) {
59
            List<Long> deltaTs = deltaTimes.getOrDefault(uuid, new ArrayList<>());
60
            long deltaT = (pp.getCurrentTick() - lastClickTime.get(uuid));
61
            if (deltaT <= RECORD_SENSITIVITY) {
62
                deltaTs.add(deltaT);
63
                if (deltaTs.size() >= SAMPLES) {
64
                    double avgCps = 0;
65
                    for (double entry : deltaTs) {
66
                        avgCps += entry;
67
                    }
68
                    double divisor = (avgCps / SAMPLES / 20);
69
                    avgCps = 1 / divisor;
70
                    //if someone manages to get an Infinity, they're dumb af
71
                    if (avgCps > MAX_CPS) {
72
                        punish(pp, 1, true, e, new Placeholder("cps", (Double.isInfinite(avgCps) ? avgCps : MathPlus.round(avgCps, 2) + "")));
73
                    } else {
74
                        reward(pp);
75
                    }
76
                    deltaTs.remove(0);
77
                }
78
                deltaTimes.put(uuid, deltaTs);
79
            }
80
        }
81
        lastClickTime.put(uuid, pp.getCurrentTick());
82
    }
83
84
    @Override
85
    public void removeData(Player p) {
86
        UUID uuid = p.getUniqueId();
87
        lastClickTime.remove(uuid);
88
        deltaTimes.remove(uuid);
89
    }
90
}

How it counteracts this module

Hawk's FightSpeed caps sustained click speed: deltas between consecutive non-INTERACT entity interactions are recorded in client ticks when at most RECORD_SENSITIVITY (4) ticks, accumulated to SAMPLES (default 10), and converted to CPS as 20 / average tick spacing; an average above MAX_CPS (default 16) punishes. Sigma's module is below this cap at default settings: the clipped draw puts cpsdel in 12-15 most of the time (delays 66.7-83.3ms, i.e. 1.3-1.7 ticks), which reports 12-15 CPS, and the one-second stalls report 1 CPS, dragging the window average down toward the distribution mean of ~6.5 CPS. The check becomes relevant only when the base CPS is raised: with a base of 18 the positive draws reach cpsdel 25 (35.7ms, 0.71 ticks, ~28 CPS reported), and every window containing enough positive draws exceeds 16. So FightSpeed counters the high-end configuration of the module, while the default configuration slips under it - which is exactly why the consistency check below exists.

anticheat FightSpeedConsistency (stdev of window CPS)

FightSpeedConsistency.java120 lines · Java
1
/*
2
 * This file is part of Hawk Anticheat.
3
 * Copyright (C) 2018 Hawk Development Team
4
 *
5
 * This program is free software: you can redistribute it and/or modify
6
 * it under the terms of the GNU General Public License as published by
7
 * the Free Software Foundation, either version 3 of the License, or
8
 * (at your option) any later version.
9
 *
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU General Public License
16
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
17
 */
18
19
package me.islandscout.hawk.check.combat;
20
21
import me.islandscout.hawk.HawkPlayer;
22
import me.islandscout.hawk.check.Cancelless;
23
import me.islandscout.hawk.check.EntityInteractionCheck;
24
import me.islandscout.hawk.event.*;
25
import me.islandscout.hawk.util.MathPlus;
26
import org.bukkit.entity.Player;
27
28
import java.util.*;
29
30
public class FightSpeedConsistency extends EntityInteractionCheck implements Cancelless {
31
32
    //This check is very similar to the FightSpeed check, however I will
33
    //not be merging these, because their SAMPLES variable may vary
34
    //based on configuration. For instance, FightSpeed relies on samples
35
    //of 10, yet this check relies on samples of 5.
36
37
    private final int SAMPLES;
38
    private final int SAMPLE_SIZE;
39
    private final double STDEV_THRESHOLD;
40
    private final double MIN_CPS;
41
    private final int RECORD_THRESHOLD; //don't log click if it took longer than these ticks
42
43
    private final Map<UUID, List<Double>> pSamples;
44
    private final Map<UUID, Long> lastClickTick;
45
    private final Map<UUID, List<Long>> deltaTimes;
46
47
    public FightSpeedConsistency() {
48
        super("fightspeedconsistency", false, -1, 3, 0.99, 5000, "%player% failed click consistency. Autoclicker? VL: %vl%", null);
49
        MIN_CPS = (double)customSetting("checkAboveCPS", "", 10D);
50
        SAMPLES = (int)customSetting("samples", "", 5);
51
        SAMPLE_SIZE = (int)customSetting("sampleSize", "", 20);
52
        STDEV_THRESHOLD = (double)customSetting("stdevThreshold", "", 0.05D);
53
        RECORD_THRESHOLD = (int)(20 * (1 / MIN_CPS) + 1);
54
        pSamples = new HashMap<>();
55
        lastClickTick = new HashMap<>();
56
        deltaTimes = new HashMap<>();
57
    }
58
59
    @Override
60
    protected void check(InteractEntityEvent e) {
61
        if (e.getInteractAction() == InteractAction.INTERACT)
62
            return;
63
        UUID uuid = e.getPlayer().getUniqueId();
64
        HawkPlayer pp = e.getHawkPlayer();
65
        if (lastClickTick.containsKey(uuid)) {
66
            List<Long> deltaTs = deltaTimes.getOrDefault(uuid, new ArrayList<>());
67
            long deltaT = (pp.getCurrentTick() - lastClickTick.get(uuid));
68
69
            //log click if player clicks faster than this
70
            if (deltaT <= RECORD_THRESHOLD) {
71
                deltaTs.add(deltaT);
72
73
                //begin computing avg cps
74
                if (deltaTs.size() >= SAMPLE_SIZE) {
75
                    double avgCps = 0;
76
                    for (double entry : deltaTs) {
77
                        avgCps += entry;
78
                    }
79
                    double divisor = (avgCps / SAMPLE_SIZE / 20);
80
                    avgCps = 1 / divisor;
81
82
                    List<Double> sampless = pSamples.getOrDefault(uuid, new ArrayList<>());
83
                    sampless.add(avgCps);
84
85
                    //Debug.broadcastMessage(avgCps + "");
86
87
                    //Begin computing standard deviation and judge player.
88
                    //Only if above min cps and enough samples.
89
                    //Acts like a narrow barrier between the two limits to prevent false flags.
90
                    //Explanation: When clicks are barely meeting speed requirements, a narrow
91
                    //range of CPSs will be processed, thus setting off false flags.
92
                    if(avgCps > MIN_CPS && sampless.size() >= SAMPLES) {
93
                        //Debug.broadcastMessage(ChatColor.YELLOW + "" + MathPlus.stdev(sampless));
94
                        if(MathPlus.stdev(sampless) < STDEV_THRESHOLD) {
95
                            punish(pp, false, e);
96
                        }
97
                        else {
98
                            reward(pp);
99
                        }
100
                    }
101
102
                    if(sampless.size() >= SAMPLES) {
103
                        sampless.remove(0);
104
                    }
105
                    pSamples.put(uuid, sampless);
106
                    deltaTs.remove(0);
107
                }
108
                deltaTimes.put(uuid, deltaTs);
109
            }
110
        }
111
        lastClickTick.put(uuid, pp.getCurrentTick());
112
    }
113
114
    @Override
115
    public void removeData(Player p) {
116
        pSamples.remove(p.getUniqueId());
117
        lastClickTick.remove(p.getUniqueId());
118
        deltaTimes.remove(p.getUniqueId());
119
    }
120
}

How it counteracts this module

FightSpeedConsistency averages 20-click windows into a single CPS value and flags when the stdev of 5 consecutive window averages falls below STDEV_THRESHOLD (0.05) - but only when the window average exceeds MIN_CPS (10). This is the check that Sigma's randomization was built to fool, and the one that defeats it at higher settings: the per-click draws are iid uniform, so a 20-click window average converges to the mean of the clipped distribution; the variance that makes individual intervals look human disappears in the window mean. At a base CPS where the distribution mean sits above 10 (roughly base 12 and up, given the -10..+7 draw on top of it), five successive window averages are nearly identical and the stdev is far below 0.05, producing the 'Autoclicker?' punishment. At the default base of 8 the mean is ~6.5, the window averages never exceed MIN_CPS, and the check stays silent - the module's default configuration is tuned to live under this threshold, and the bound inversion (the 'MAX' setting actually widening the downward jitter) is what keeps the mean low. Raising MIN instead of MAX is the setting that would push the mean up and trip it.

anticheat NoSwing (attack-without-swing ledger)

NoSwing.java65 lines · Java
1
/*
2
 * This program is free software: you can redistribute it and/or modify
3
 *   it under the terms of the GNU General Public License as published by
4
 *   the Free Software Foundation, either version 3 of the License, or
5
 *   (at your option) any later version.
6
 *
7
 *   This program is distributed in the hope that it will be useful,
8
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
9
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10
 *   GNU General Public License for more details.
11
 *
12
 *   You should have received a copy of the GNU General Public License
13
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
14
 */
15
package fr.neatmonster.nocheatplus.checks.fight;
16
17
import org.bukkit.entity.Player;
18
19
import fr.neatmonster.nocheatplus.checks.Check;
20
import fr.neatmonster.nocheatplus.checks.CheckType;
21
22
/**
23
 * We require that the player moves their arm between attacks, this is basically what gets checked here.
24
 */
25
public class NoSwing extends Check {
26
27
    /**
28
     * Instantiates a new no swing check.
29
     */
30
    public NoSwing() {
31
        super(CheckType.FIGHT_NOSWING);
32
    }
33
34
    /**
35
     * Checks a player.
36
     * 
37
     * @param player
38
     *            the player
39
     * @return true, if successful
40
     */
41
    public boolean check(final Player player, final FightData data, final FightConfig cc) {
42
        boolean cancel = false;
43
44
        if (data.exemptArmSwing) {
45
            data.exemptArmSwing = false;
46
        }
47
        // Did they swing his arm before?
48
        else if (++data.noSwingCount <= 1) {
49
            // Yes, reward them with reduction of their violation level.
50
            data.noSwingVL *= 0.9D;
51
        } 
52
        else {
53
            data.noSwingCount = 0;
54
            // No, increase their violation level.
55
            data.noSwingVL += 1D;
56
57
            // Execute whatever actions are associated with this check and the violation level and find out if we should
58
            // cancel the event.
59
            cancel = executeActions(player, data.noSwingVL, 1D, cc.noSwingActions).willCancel();
60
        }
61
62
        return cancel;
63
    } 
64
65
}

How it counteracts this module

NCP's fight NoSwing keeps a swing ledger around the attack stream: every attack increments noSwingCount (FightListener line 323-324), every PlayerAnimationEvent decrements it (line 800), and the check (lines 41-63) halves the VL for a swing-backed attack but adds 1 to noSwingVL for a second consecutive swingless attack, running the configured actions when the VL crosses its thresholds. Sigma's module feeds the ledger twice per click: the explicit swingItem() and the swing at the top of clickMouse() both arrive in the same tick as the C02 ATTACK, so noSwingCount never survives past 1 and the check never fires. The double swing is if anything over-cautious from the anticheat's point of view - the ledger contract is satisfied with margin. The check's actual counter surface is the noSwing autoclicker family (modules that suppress C0A entirely to dodge cadence analysis), and any Sigma-side module configured to attack without the swing, or any swing-suppressing 'silent' variant of this client, is what lands here. For AutoClicker proper it is a check that observes the C0A/C02 coupling without being able to punish it.

anticheat ClicksListener (C0A delay sampling feed)

ClicksListener.java65 lines · Java
1
package ai.idealistic.spartan.listeners.protocol;
2
3
import ai.idealistic.spartan.Register;
4
import ai.idealistic.spartan.abstraction.event.PlayerLeftClickEvent;
5
import ai.idealistic.spartan.abstraction.protocol.PlayerProtocol;
6
import ai.idealistic.spartan.functionality.concurrent.CheckThread;
7
import ai.idealistic.spartan.functionality.server.Config;
8
import ai.idealistic.spartan.functionality.server.PluginBase;
9
import com.comphenix.protocol.PacketType;
10
import com.comphenix.protocol.events.ListenerPriority;
11
import com.comphenix.protocol.events.PacketAdapter;
12
import com.comphenix.protocol.events.PacketEvent;
13
import org.bukkit.entity.Player;
14
15
public class ClicksListener extends PacketAdapter {
16
17
    public ClicksListener() {
18
        super(
19
                Register.plugin,
20
                ListenerPriority.NORMAL,
21
                PacketType.Play.Client.ARM_ANIMATION,
22
                PacketType.Play.Client.BLOCK_DIG
23
        );
24
    }
25
26
    @Override
27
    public void onPacketReceiving(PacketEvent event) {
28
        Player player = event.getPlayer();
29
        PlayerProtocol protocol = PluginBase.getProtocol(player);
30
31
        if (!Config.settings.getBoolean("Important.bedrock_on_protocollib")
32
                && protocol.isBedrockPlayer()) {
33
            return;
34
        }
35
        synchronized (protocol) {
36
            if (event.getPacket().getType().equals(PacketType.Play.Client.ARM_ANIMATION)) {
37
                long delay = System.currentTimeMillis() - protocol.oldClickTime;
38
39
                CheckThread.run(protocol, () -> {
40
                    if (delay > 150) {
41
                        protocol.clickBlocker = false;
42
                    }
43
                    if (!protocol.clickBlocker) {
44
                        protocol.executeRunners(
45
                                false,
46
                                new PlayerLeftClickEvent(
47
                                        player,
48
                                        delay
49
                                )
50
                        );
51
                    }
52
                    protocol.oldClickTime = System.currentTimeMillis();
53
                });
54
            } else if (event.getPacket().getType().equals(PacketType.Play.Client.BLOCK_DIG)) {
55
                String s = event.getPacket().getStructures().getValues().toString();
56
57
                CheckThread.run(protocol, () -> {
58
                    protocol.oldClickTime = System.currentTimeMillis();
59
                    protocol.clickBlocker = !s.contains("ABORT");
60
                });
61
            }
62
        }
63
    }
64
65
}

How it counteracts this module

Spartan's ClicksListener is the C0A sampling layer: a ProtocolLib adapter on ARM_ANIMATION and BLOCK_DIG that timestamps every arm swing, computes the inter-click delay, and dispatches a PlayerLeftClickEvent(delay) through executeRunners to the FastClicks check (registered for HackType.FAST_CLICKS in the same snapshot's Enums.java), with a clickBlocker flag suppressing events while the player digs (non-ABORT BLOCK_DIG) and a 150ms delay threshold that clears the blocker when clicking resumes. The detector judges the delay distribution of the C0A train. Sigma's module produces a distinctive shape on this feed: delays are drawn from a two-regime distribution - 66.7-83.3ms most of the time plus a ~1-in-6 full-second gap - which is a heavier tail than any human click stream and a bimodal delay histogram that rate-based analysis picks up even though the short-term rate stays under Hawk's cap. Because the module's randomization is iid, the order statistics of the delay stream (not just the mean) are the tell; the FastClicks implementation itself is not present in this source snapshot, so its exact thresholds cannot be quoted, but the listener is the demonstrated feed that produces the samples.

← Back to Analysis Hub