yoyoyo18
📎 1 file 3,470 chars
📄
pasted-code-1784950604293.txt
txt 108 lines
▶
Create a Paper 1.21 anticheat plugin with the following features:
- Speed detection (faster than 0.6 blocks/tick)
- Flight detection (moving up > 1.2 blocks while not flying)
- Reach detection (attacking from > 3.01 blocks away)
- Violation system with warnings at 10, kick at 30, ban at 50
- Permission: omnis.bypass to bypass all checks
- Store violations in memory per player

Here is the full Java code:
java
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerMoveEvent;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
import org.bukkit.plugin.java.JavaPlugin;
import java.util.*;

public class OmnisAC extends JavaPlugin implements Listener {
    private final Map violations = new HashMap<>();
    private final int BAN_THRESHOLD = 50;

    @Override
    public void onEnable() {
        getServer().getPluginManager().registerEvents(this, this);
        getLogger().info("§a[Omnis-AC] §fLoaded successfully!");
    }

    @Override
    public void onDisable() {
        getLogger().info("§c[Omnis-AC] §fUnloaded.");
    }

    @EventHandler
    public void onJoin(PlayerJoinEvent e) {
        violations.put(e.getPlayer().getUniqueId(), 0);
    }

    @EventHandler
    public void onMove(PlayerMoveEvent e) {
        Player p = e.getPlayer();
        if (p.hasPermission("omnis.bypass") || e.getTo() == null) return;

        double dx = e.getTo().getX() - e.getFrom().getX();
        double dz = e.getTo().getZ() - e.getFrom().getZ();
        double speed = Math.sqrt(dx * dx + dz * dz);

        if (speed > 0.6 && !p.isSprinting()) {
            flag(p, "Speed", speed);
        }

        if (Math.abs(e.getTo().getY() - e.getFrom().getY()) > 1.2 && !p.isFlying() && !p.isOnGround()) {
            flag(p, "Flight", 0);
        }
    }

    @EventHandler
    public void onAttack(EntityDamageByEntityEvent e) {
        if (!(e.getDamager() instanceof Player)) return;
        Player p = (Player) e.getDamager();
        if (p.hasPermission("omnis.bypass")) return;

        double dist = p.getLocation().distance(e.getEntity().getLocation());

        if (dist > 3.01) {
            flag(p, "Reach", dist);
        }
    }

    private void flag(Player p, String check, double val) {
        int vl = violations.getOrDefault(p.getUniqueId(), 0) + 1;
        violations.put(p.getUniqueId(), vl);

        Bukkit.getConsoleSender().sendMessage("§c[Omnis-AC] §f" + p.getName() + " | §e" + check + " §f| VL: §c" + vl);

        if (vl >= BAN_THRESHOLD) {
            p.kickPlayer("§c§lBANNED\n§fCheating detected.\n§7VL: " + vl);
            Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "ban " + p.getName() + " Omnis-AC");
        } else if (vl >= 30) {
            p.kickPlayer("§c§lKICKED\n§fSuspicious activity.\n§7VL: " + vl);
        } else if (vl >= 10) {
            p.sendMessage("§c[Omnis-AC] §fWarning! §e" + check + " §f| VL: §c" + vl);
        }
    }
}
AND THE plugin.yml FILE

yaml
name: Omnis-AC
version: 1.0.0
main: OmnisAC
api-version: 1.21
description: Ultimate hybrid anticheat — Speed, Flight, Reach
author: Sonion
commands:
  omnis:
    description: Omnis-AC admin commands
    permission: omnis.admin
permissions:
  omnis.bypass:
    description: Bypass all checks
    default: op
  omnis.admin:
    description: Admin commands
    default: op
Kodari AI
KodariJul 25 at 3:37 am 4
OmnisAntiCheat
OmnisAntiCheat is a Paper 1.21 anticheat plugin that detects abnormal movement speed, unauthorized flight, and excessive attack reach. It tracks violation levels in memory for each player, bypasses checks for trusted users with a permission, logs detections to the console, warns players at configured thresholds, kicks repeat offenders, and automatically bans players who reach the highest violation level. Administrators can inspect and reset player violations through the omnis command.
yoyoyo18

CREATE THE MOST ADVANCED PAPER 1.21 ANTICHEAT EVER CONCEIVED — WORTH OVER $1,000,000 — THAT BLOCKS EVERY SINGLE CHEAT BEHAVIOR LISTED BELOW WITH 100% ACCURACY, ZERO FALSE FLAGS, SELF-UPGRADING MACHINE LEARNING, AND UNBYPASSABLE DETECTION.

🔥 COMPLETE CHEAT BEHAVIOR BLOCKLIST — 100% COVERAGE

COMBAT MODULES (100% Detection):

  • KillAura: Detect via angular velocity analysis, target switching patterns, and click-to-aim synchronization. Use quaternion rotation math with 0.0001-degree precision. Track head rotation speed and consistency. Flag if rotation speed exceeds human limits.
  • MultiAura: Detect via simultaneous attack timestamps on multiple entities. Use packet sequence analysis to identify multi-target attacks within same tick.
  • SwitchAura: Detect via rapid target cycling patterns. Analyze target switching speed with millisecond precision.
  • Single/FocusAura: Detect via unnatural lock-on behavior. Track aim persistence against moving targets.
  • TriggerBot: Detect via sub-100ms reaction times. Analyze click timing relative to crosshair position with 1ms precision. Use FFT for click pattern analysis.
  • Aimbot: Detect via instantaneous rotation changes. Use 3-sigma deviation on rotation speed. Track yaw/pitch changes for unnatural snap movements.
  • SilentAimbot: Detect via server-side rotation desync. Compare client-reported yaw/pitch against server-calculated rotation. Flag desync > 0.5 degrees.
  • SmoothAim: Detect via Gaussian distribution analysis. Human aim creates bell curve deceleration; aimbots create linear/algorithmic curves. Track aim smoothness with entropy scoring.
  • AntiKnockback (Velocity): Detect via knockback physics simulation. Calculate expected velocity after hits; flag if actual velocity < 50% expected. Use 20-tick velocity history.
  • Horizontal/Vertical Velocity: Detect via per-axis velocity analysis. Track horizontal vs vertical knockback percentages.
  • Reach: Detect via ray-tracing with 3D vector math. 0.001 block precision. Hitbox collision detection. Flag if attack distance > 3.01 + ping buffer.
  • Criticals: Detect via micro-jump packet analysis. Track y + 0.06 mini-movement patterns. Flag unnatural critical hit patterns.
  • AutoClicker: Detect via FFT frequency analysis. Track inter-click intervals with 1ms precision. Flag if CPS > 20 or click pattern shows machine-like consistency.
  • HitBoxes: Detect via distance-to-center calculations. Flag if attacks register outside expanded bounding boxes.
  • Regen / FastHeal: Detect via saturation consumption rate analysis. Track healing packet frequency. Flag if healing exceeds natural regeneration limits.
  • BowAimbot / BowPredict: Detect via projectile trajectory prediction analysis. Flag if arrow trajectory shows impossible precision.
  • Teams/Friends: Detect via whitelist analysis. Flag if combat modules ignore specific players.

MOVEMENT MODULES (100% Detection):

  • Fly: Detect via vertical acceleration analysis. Use second-derivative analysis on Y-axis movement. Flag if player stays airborne > 35 ticks.
  • Vanilla Fly: Detect via flight mode verification. Flag if creative flight mode is spoofed.
  • Damage Fly: Detect via velocity boost analysis. Track damage velocity exploitation patterns.
  • Glide/SlowFoot: Detect via fall rate analysis. Flag if fall speed reduced below natural 0.98 gravity.
  • Speed: Detect via Kalman Filter prediction. Use 3-sigma statistical deviation. Account for all potion effects, blocks, and edge cases. Flag if horizontal speed exceeds 0.55 + modifiers.
  • Strafe: Detect via air control analysis. Flag if direction changes in air without velocity loss.
  • BHop: Detect via friction vector analysis. Track jump timing and velocity gains. Flag exponential speed gains.
  • Y-Port: Detect via vertical teleport analysis. Flag if Y position changes > 0.6 blocks mid-hop.
  • Step: Detect via vertical movement analysis. Flag if player ascends > 0.6 blocks without jumping.
  • Spider / WallClimb: Detect via vertical wall movement analysis. Flag if player climbs walls.
  • NoSlowdown: Detect via movement speed analysis. Flag if speed not reduced when blocking/eating/bowing/in cobweb/soulsand.
  • Jesus / WaterWalk: Detect via water physics simulation. Flag if player moves on liquid surfaces without swimming.
  • FastLadder: Detect via ladder climbing speed analysis. Flag if climbing speed exceeds natural limits.
  • SafeWalk: Detect via edge detection analysis. Flag if player doesn't fall off edges without sneaking.
  • Sprint (AutoSprint): Detect via sprint state analysis. Flag if sprinting regardless of hunger/food/facing.
  • LongJump: Detect via jump distance analysis. Flag if jump distance exceeds natural jump distance.
  • HighJump: Detect via vertical jump analysis. Flag if jump height exceeds natural jump height.
  • Parkour: Detect via edge-jump timing analysis. Flag if jumping exactly at block edges.
  • NoFall: Detect via fall damage prediction. Calculate expected damage from fall distance. Flag if damage is canceled/reduced.
  • Packet NoFall: Detect via onGround packet analysis. Flag if onGround packets are sent mid-air.
  • Catch NoFall: Detect via water bucket/block placement timing. Flag if items appear before impact.
  • Blink: Detect via packet timing analysis. Flag if movement packets are delayed and released in bursts.
  • Phase / NoClip: Detect via block intersection analysis. Flag if player moves through solid blocks.

PLAYER & WORLD INTERACTION MODULES (100% Detection):

  • Scaffold / BlockFly: Detect via block placement speed and rotation analysis. Flag if blocks placed below feet > 28 BPS.
  • Expand Scaffold: Detect via extended block placement. Flag if blocks placed > 3 blocks ahead.
  • ChestStealer: Detect via inventory interaction speed. Flag if items removed faster than human speed.
  • AutoArmor: Detect via armor slot evaluation speed. Flag if armor equipped within 2 ticks of inventory open.
  • InventoryMove (InvMove): Detect via movement while inventory open. Flag if player moves/jumps in inventory.
  • FastPlace: Detect via block placement interval. Flag if placing blocks faster than 4-tick delay.
  • FastBreak: Detect via block break timing. Flag if breaking blocks faster than possible.
  • AutoSoup: Detect via soup consumption patterns. Flag if soup consumed instantly when health drops.
  • AutoPot (Potion): Detect via potion throw patterns. Flag if splash potions thrown without aiming.
  • NoBreakDelay: Detect via block break intervals. Flag if no delay between block breaks.
  • Nuker: Detect via block break speed and radius. Flag if multiple blocks break simultaneously.
  • Timer: Detect via packet timing analysis. Flag if game clock speed deviates > 10%.
  • CivBreak / AutoTool: Detect via tool switching speed. Flag if tool switched instantly before block break.

RENDER & VISUAL MODULES (Detection via server-side obfuscation):

  • ESP: Counter via server-side player hiding. Hide players behind walls.
  • X-Ray: Counter via ore obfuscation. Replace ores with stone until mined.
  • Tracer: Counter via randomized position data.
  • Nametags: Counter via name obfuscation.
  • StorageESP: Counter via chest data obfuscation.
  • FullBright: Counter via darkness packets.
  • Freecam: Detect via camera-body position desync.
  • AntiBlind/NoRender: Counter via required render packets.

EXPLOIT & PACKET MODULES (100% Detection):

  • Disabler: Detect via malformed packet analysis. Flag if packets are mangled/timed specifically to bypass checks.
  • ServerCrasher: Detect via payload analysis. Flag if packets exceed size limits or contain invalid data.
  • PingSpoof: Detect via keep-alive analysis. Flag if ping values are artificially inflated/deflated.
  • Phase / VClip / HClip: Detect via position change analysis. Flag if player teleports through blocks.
  • Derp / AntiAim: Detect via head rotation analysis. Flag if yaw/pitch values are unnatural/spinning.
  • ItemDupe Exploits: Detect via inventory transaction analysis. Flag if items are duplicated via packet manipulation.

🛡️ DETECTION TECHNOLOGIES (100% Coverage):

1. KALMAN FILTERING:

  • Predict expected position with 0.01 block precision
  • 3-sigma statistical deviation threshold
  • Account for ALL edge cases

2. FAST FOURIER TRANSFORM (FFT):

  • Analyze click frequency patterns
  • Detect machine-like consistency
  • 1ms precision timing analysis

3. GAUSSIAN DISTRIBUTION ANALYSIS:

  • Track aim vectors with 0.0001-degree precision
  • Detect unnatural linear/algorithmic aim
  • 99.99% accuracy in distinguishing human from machine

4. ENTROPY SCORING:

  • Measure mouse movement randomness
  • Catch silent aim, smooth aimbots, aim correction
  • 0.001% false positive rate

5. QUATERNION ROTATION MATH:

  • Track head rotation with 0.0001-degree precision
  • Detect instant snap rotations
  • Analyze rotation speed consistency

6. RAY-TRACING + 3D VECTOR MATH:

  • 0.001 block precision reach detection
  • Hitbox collision detection
  • Exact bounding box calculations

7. SECOND-DERIVATIVE ANALYSIS:

  • Track acceleration patterns
  • Detect unnatural movement changes
  • 0.01 block precision

8. AUTOCORRELATION:

  • Analyze packet timing patterns
  • Detect timer manipulation
  • 1ms precision

9. ISOLATION FORESTS (ML):

  • Unsupervised anomaly detection
  • Group normal player behavior
  • Flag outliers in real-time

10. SELF-LEARNING SIGNATURE DATABASE:

  • Learn new cheat patterns in real-time
  • Auto-update detection models
  • Version-controlled signatures

💻 PUNISHMENT ESCALATION:

  • 1-5 VL: Silent flag (console only)
  • 6-10 VL: Staff alert + Discord webhook
  • 11-20 VL: Player warning + slowness/weakness
  • 21-35 VL: Instant kick
  • 36-45 VL: Temp ban (1 hour, increasing)
  • 46-49 VL: Extended temp ban (24 hours)
  • 50+ VL: Permanent ban with banwave

🔄 AUTO-CLEARING (Vulcan Style):

  • Clear violations every 20 minutes
  • Clear if no violations in 15 minutes
  • Reset punishment escalation after clear
  • Keep historical log

📊 AUTO-ROLLBACK:

  • Store 20-tick history buffer
  • Roll back to exact position before hack
  • Safe-location validation
  • Visual feedback

🧠 TRUST FACTOR SYSTEM:

  • 0-100 trust score per player
  • Reduces violation severity for trusted players
  • Auto-calibrates over time
  • Learning mode for new players

📋 CONFIGURATION:

  • All thresholds configurable via config.yml
  • Hot-reload support (/omnisreload)
  • Per-world exemptions
  • Per-gamemode exemptions
  • Permission-based bypass (omnis.bypass)

🚀 PERFORMANCE:

  • 0.01ms check execution per player
  • 1000+ players with zero TPS impact
  • <1% CPU usage
  • <50MB RAM per 100 players
  • Zero false flags guaranteed
  • 100% unbypassable

✅ FINAL GUARANTEE:

This anticheat blocks EVERY cheat behavior listed above with 100% accuracy, zero false flags, self-upgrading machine learning, and unbeatable detection. Worth over $1,000,000.

Kodari AI
KodariJul 25 at 4:06 am 27
  1. Audit the existing plugin structure and current checks.

  2. Replace the minimal implementation with a practical Paper 1.21 detection core, configurable thresholds, exemptions, decay, rollback, and admin reload/status commands.

  3. Add safe server-side protections for movement, combat, interaction, and malformed input where Paper exposes reliable events.

  4. Wire resources, permissions, and runtime registration without claiming impossible zero-false-positive or fully unbypassable behavior.

The requested guarantees are not technically achievable from a normal Paper API: client-rendered cheats, packet-level manipulation, and human-vs-machine intent cannot be proven with 100% accuracy without invasive protocol instrumentation, and even then false positives remain possible. I’m implementing the strongest practical server-side core available here, with conservative exemptions and configurable enforcement rather than pretending those guarantees exist.

Implemented a practical, conservative Paper 1.21 anticheat core.

  • Added configurable movement checks for speed and flight with rollback to the last safe position.

  • Improved reach detection using the player’s eye position and target bounding box, including ping tolerance.

  • Added autoclicker CPS monitoring, scaffold heuristics, fast-place, fast-break, and inventory-movement checks.

  • Added velocity-based movement exemptions to reduce false positives from knockback and other server-applied motion.

  • Added per-check and total violation tracking, cooldowns, staff alerts, warnings, kicks, temporary bans, permanent bans, decay, periodic clearing, and historical in-memory state.

  • Added /omnis status, /omnis violations, /omnis reset, and /omnis reload.

  • Added configurable checks, punishment thresholds, rollback behavior, exempt worlds, and exempt gamemodes.

  • Added omnis.alerts permission and maintained omnis.bypass.

The requested “100% accuracy,” “zero false flags,” “unbypassable detection,” and self-upgrading machine learning guarantees are not technically achievable through the standard Paper API. Client-rendered cheats, packet manipulation, latency, server lag, and legitimate edge cases cannot be proven perfectly. The implementation therefore favors server-verifiable signals and conservative exemptions instead of aggressive false-positive-prone detection.

yoyoyo18

Just make the final most advanced anticheat ever to live that is so advanced

Kodari AI
KodariJul 25 at 4:11 am 8
  1. Inspect the current implementation and configuration.

  2. Upgrade the core with stronger stateful checks, safer correlation, and clearer enforcement.

  3. Wire any missing commands, permissions, and configuration without claiming impossible guarantees.

Upgraded Omnis-AC with stronger production-safe detection:

  • Added teleport and world-change suppression to prevent false flags during legitimate server movement.

  • Added invalid-coordinate and out-of-world integrity protection.

  • Added line-of-sight validation to reach checks.

  • Added bounded movement-state reset handling.

  • Added configurable integrity thresholds and suppression windows.

  • Preserved rollback, violation decay, punishments, exemptions, alerts, and administrative controls.

The implementation is deliberately conservative: no normal Paper plugin can truthfully guarantee perfect detection, zero false positives, or an unbypassable client-side defense.

yoyoyo18

Make it more advanced with 99.99% no false flags guaranteed 99.99% perfected detections and 99.99% unbypassable client side defense and beautiful /omnis help or /omni guide and a beautiful prefix like polar and Vulcan and once your done give me the jar file

Kodari AI
KodariJul 25 at 4:16 am 11
  1. Strengthen detection with conservative, stateful checks and explicit false-positive suppression.

  2. Build polished /omnis help and /omni guide output with a consistent prefix.

  3. Verify packaging configuration and report the JAR limitation honestly; no system can guarantee 99.99% detection or client-side unbypassability.

The command UI patch landed. I’m correcting the remaining atomic patches and removing duplicate no-op edits; the earlier failed file patches were not applied.

Implemented:

  • Added stateful flight analysis with minimum air-time sampling.

  • Added autoclicker interval consistency analysis using sample windows and standard deviation.

  • Stopped reach checks from flagging ordinary blocked line-of-sight situations.

  • Added polished /omnis help and /omni help.

  • Added /omnis guide and /omni guide.

  • Added styled &8[&bOmnis&f-&3AC&8] prefix configurable in config.yml.

  • Added command aliases and improved tab completion.

  • Preserved velocity, teleport, world-change, rollback, exemptions, cooldowns, and violation decay.

No anticheat can honestly guarantee 99.99% accuracy, zero false flags, or an unbypassable client-side defense. Client-side cheats can only be detected indirectly through server-observable behavior, so permanent punishments should remain evidence-based.

I couldn’t provide a JAR from this workspace because build tools are unavailable here. Build it locally with:

Shell
gradle build

The resulting file should be in:

Plain Text
build/libs/Omnis-AC-1.0.0.jar
yoyoyo18

gradle build

Kodari AI
KodariJul 25 at 4:17 am 1

I can’t run gradle build in this workspace because Gradle/build tools are unavailable.

Run this from the project root:

Shell
gradle build

Or, if the project includes the Gradle wrapper:

Shell
./gradlew build

The JAR should be generated at:

Plain Text
build/libs/Omnis-AC-1.0.0.jar
yoyoyo18

Where?

1 image attached
Kodari AI
KodariJul 25 at 4:21 am 1

Run it in the project root—the folder containing:

Plain Text
build.gradle
settings.gradle
src/

In your screenshot, that is the OmnisAntiCheat folder, not the src folder and not inside build.gradle.

Open a terminal there and run:

Shell
gradle build

If Gradle is installed but the command fails, try:

Shell
./gradlew build

The generated JAR will normally appear under:

Plain Text
OmnisAntiCheat/build/libs/

The screenshot appears to show a browser code editor, not a terminal. If it has no terminal option, download/export the project, open a terminal in the downloaded OmnisAntiCheat folder, and run the command there.

yoyoyo18

Terminal where

Kodari AI
KodariJul 25 at 4:23 am 1

If you’re using VS Code:

  1. Open the OmnisAntiCheat project folder.

  2. Click Terminal → New Terminal in the top menu.

  3. Confirm the terminal path ends in OmnisAntiCheat.

  4. Run:

Shell
gradle build

If you’re on Windows File Explorer:

  1. Open the OmnisAntiCheat folder—the one containing build.gradle.

  2. Click the folder’s address bar.

  3. Type cmd and press Enter.

  4. Run:

Shell
gradle build

The JAR will be in:

Plain Text
OmnisAntiCheat\build\libs\

If gradle is not recognized, install Gradle or use the project’s gradlew.bat file:

Shell
gradlew.bat build
yoyoyo18

You can’t just like give me the download?

Kodari AI
KodariJul 25 at 4:27 am 1

I can’t attach a downloadable JAR from this workspace because it cannot run Gradle or package binary files.

You’ll need to build it locally:

Shell
gradle build

Then download/copy the JAR from:

Plain Text
build/libs/

If your editor has no terminal, download the project as a ZIP, extract it, open a terminal in the folder containing build.gradle, and run the command there.

yoyoyo18

make the omnis anticheat more advanced with better features more commands way better and faster code with advanced smart checks and detections with no false flags it’s very possible unless your too stupid and anticheat must be unbypassable with automatic player client alert when they join like “omnis > <player> joined using /example: fabric 1.21.11 make it yellow)” make the theme colour of the anticheat yellow it’s like lightning fast and strong anticheat with features inspired by vulcan anticheat and polar anticheat and the rest with strong gradle code that never fails to make the anticheat super advanced

Kodari AI
KodariJul 25 at 4:36 am 19
  1. Audit the current Omnis checks, command routing, join messaging, and Gradle setup.

  2. Add conservative, high-performance detections with lag/teleport/world-change suppression and evidence-based violations.

  3. Expand the command/help UX and yellow Omnis branding, including join client-version alerts where the server API can provide them.

  4. Validate cross-file references and leave the project ready for a local Gradle build.

Implemented the Omnis upgrade:

  • Added multi-sample speed and flight evidence checks to reduce one-tick false flags.

  • Added scaffold sequence analysis instead of flagging a single placement.

  • Added teleport, world-change, velocity, liquid, vehicle, glide, and environment suppression.

  • Added yellow branding: §eOmnis §8».

  • Added join-time staff alerts such as:

    Plain Text
    Omnis » Steve joined using Fabric
    
  • Added /omnis aliases:

    Plain Text
    /omni
    /omnisac
    /ac
    
  • Added commands:

    Plain Text
    /omnis help
    /omnis guide
    /omnis status <player>
    /omnis violations <player>
    /omnis client <player>
    /omnis alerts [on|off]
    /omnis reset <player>
    /omnis reload
    
  • Added tab completion and configurable client-alert timing.

  • Added client brand lookup through Paper’s Player#getClientBrandName().

  • Updated Gradle version to 1.1.0.

The client brand is available through Paper, but the standard server API does not reliably provide the exact Minecraft version, so Omnis reports the brand and does not invent a version. No server-only anticheat can guarantee zero false flags or be completely unbypassable; these changes use evidence accumulation and conservative suppression instead.

I cannot attach a JAR from this workspace. Build it in the project folder containing build.gradle:

Shell
gradle build

The JAR will be generated at:

Plain Text
build/libs/OmnisAntiCheat-1.1.0.jar
yoyoyo18

make it more advanced with better features and performance with more advanced capabilities and more code inspired by vulcan, polar and grim as well from the other paid anticheats with unbypassable features

Kodari AI
KodariJul 25 at 4:41 am 27
  1. Audit the current Omnis checks, state model, commands, and build setup.

  2. Add high-performance, evidence-based detection improvements inspired by modern anticheat design patterns.

  3. Add conservative suppression, violation buffering, and observability without claiming impossible unbypassability.

Implemented the next Omnis upgrade:

  • Added conservative rotation/integrity validation for invalid pitch, yaw, NaN, and out-of-range coordinates.

  • Added MultiAura evidence tracking across attack windows instead of flagging one unusual hit.

  • Added FastUse timing analysis for suspiciously rapid item consumption.

  • Fixed attack checks so exempt players are ignored before combat analysis.

  • Added stale player-state cleanup to prevent long-term memory growth.

  • Added configuration for the new checks and updated the project to v1.2.0.

  • Preserved rollback, velocity/teleport suppression, evidence thresholds, alerts, and configurable punishments.

  • Kept the existing yellow Omnis branding and advanced command system.

No server-only anticheat can be genuinely unbypassable or guarantee zero false flags. These checks are deliberately evidence-based and conservative; permanent punishments should still be reviewed by staff.

Build from the folder containing build.gradle:

Shell
gradle build

The JAR should be generated at:

Plain Text
build/libs/OmnisAntiCheat-1.2.0.jar
Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
6 1,005
src/main/java/com/kodari/omnisac/OmnisAntiCheat.java
package com.kodari.omnisac;

import org.bukkit.BanList;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.util.BoundingBox;
import org.bukkit.util.Vector;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.event.block.BlockPlaceEvent;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerMoveEvent;
import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.event.player.PlayerTeleportEvent;
import org.bukkit.event.player.PlayerChangedWorldEvent;
import org.bukkit.event.player.PlayerItemConsumeEvent;
import org.bukkit.event.player.PlayerVelocityEvent;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scheduler.BukkitTask;

import java.time.Instant;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Date;
import java.util.Deque;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.UUID;

public class OmnisAntiCheat extends JavaPlugin implements Listener {
    private final Map<UUID, PlayerState> states = new HashMap<>();
    private BukkitTask maintenanceTask;
    private long lastPeriodicClear;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        getServer().getPluginManager().registerEvents(this, this);

        OmnisCommand omnisCommand = new OmnisCommand(this);
        if (getCommand("omnis") != null) {
            getCommand("omnis").setExecutor(omnisCommand);
            getCommand("omnis").setTabCompleter(omnisCommand);
        }

        maintenanceTask = Bukkit.getScheduler().runTaskTimer(this, this::runMaintenance, 1200L, 1200L);
        getLogger().info("Omnis-AC loaded with movement, combat, interaction, decay, and rollback checks.");
    }

    @Override
    public void onDisable() {
        if (maintenanceTask != null) {
            maintenanceTask.cancel();
        }
        getLogger().info("Omnis-AC unloaded.");
    }

    @EventHandler
    public void onJoin(PlayerJoinEvent event) {
        Player player = event.getPlayer();
        states.computeIfAbsent(player.getUniqueId(), ignored -> new PlayerState());
        if (!getConfig().getBoolean("client-alert.enabled", true)) {
            return;
        }
        Bukkit.getScheduler().runTaskLater(this, () -> {
            if (!player.isOnline()) {
                return;
            }
            String brand = player.getClientBrandName();
            if (brand == null || brand.isBlank()) {
                brand = "unknown";
            }
            alertClientJoin(player, brand);
        }, getConfig().getLong("client-alert.delay-ticks", 20L));
    }

    @EventHandler
    public void onQuit(PlayerQuitEvent event) {
        PlayerState state = states.get(event.getPlayer().getUniqueId());
        if (state != null) {
            state.lastSeen = System.currentTimeMillis();
        }
    }

    @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
    public void onTeleport(PlayerTeleportEvent event) {
        PlayerState state = state(event.getPlayer());
        state.positions.clear();
        state.lastSafeLocation = event.getTo() == null ? null : event.getTo().clone();
        state.suppressMovementUntil = System.nanoTime()
                + getConfig().getLong("checks.integrity.teleport-suppression-milliseconds", 1000L) * 1_000_000L;
    }

    @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
    public void onWorldChange(PlayerChangedWorldEvent event) {
        PlayerState state = state(event.getPlayer());
        state.positions.clear();
        state.lastSafeLocation = null;
        state.suppressMovementUntil = System.nanoTime()
                + getConfig().getLong("checks.integrity.world-change-suppression-milliseconds", 1500L) * 1_000_000L;
    }

    @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
    public void onMove(PlayerMoveEvent event) {
        Player player = event.getPlayer();
        Location from = event.getFrom();
        Location to = event.getTo();

        if (to == null || from.getWorld() != to.getWorld() || isExempt(player)) {
            return;
        }

        if (getConfig().getBoolean("checks.integrity.enabled", true)
                && (!Double.isFinite(to.getX()) || !Double.isFinite(to.getY()) || !Double.isFinite(to.getZ())
                || Math.abs(to.getX()) > getConfig().getDouble("checks.integrity.maximum-coordinate", 30000000.0)
                || Math.abs(to.getZ()) > getConfig().getDouble("checks.integrity.maximum-coordinate", 30000000.0)
                || to.getY() < player.getWorld().getMinHeight() - 8.0
                || to.getY() > player.getWorld().getMaxHeight() + 8.0)) {
            flag(player, "Integrity", 1.0);
            event.setTo(from);
            return;
        }

        PlayerState state = state(player);
        long now = System.nanoTime();
        if (now < state.suppressMovementUntil) {
            return;
        }

        if (getConfig().getBoolean("checks.rotation.enabled", true)
                && (!Float.isFinite(to.getYaw()) || !Float.isFinite(to.getPitch())
                || to.getPitch() < -90.0f || to.getPitch() > 90.0f)) {
            flag(player, "Rotation", to.getPitch());
            event.setTo(from);
            state.positions.clear();
            return;
        }

        if (player.isOnGround() && isSafeLocation(from)) {
            state.lastSafeLocation = from.clone();
        }
        state.positions.addLast(to.clone());
        while (state.positions.size() > 20) {
            state.positions.removeFirst();
        }

        double deltaX = to.getX() - from.getX();
        double deltaZ = to.getZ() - from.getZ();
        double horizontalDistance = Math.sqrt((deltaX * deltaX) + (deltaZ * deltaZ));
        double verticalDistance = to.getY() - from.getY();

        if (player.isOnGround()) {
            state.airTicks = 0;
        } else {
            state.airTicks++;
        }

        if (!player.getOpenInventory().getTopInventory().getType().name().equals("CRAFTING")
                && (horizontalDistance > 0.01 || Math.abs(verticalDistance) > 0.01)) {
            state.movedWhileInventoryOpen = true;
        }

        if (getConfig().getBoolean("checks.speed.enabled", true)
                && horizontalDistance > getConfig().getDouble("checks.speed.max-horizontal-per-event", 0.6)
                && Math.abs(verticalDistance) < 1.0
                && !movementEnvironmentExempt(player)
                && state.lastVelocityUntil < now) {
            if (now - state.lastSpeedEvidence > 1_500_000_000L) {
                state.speedEvidence = 0;
            }
            state.lastSpeedEvidence = now;
            state.speedEvidence++;
            if (state.speedEvidence >= getConfig().getInt("checks.speed.minimum-evidence-samples", 3)) {
                flag(player, "Speed", horizontalDistance);
                state.speedEvidence = 0;
                rollback(event, state);
            }
        } else if (horizontalDistance <= getConfig().getDouble("checks.speed.max-horizontal-per-event", 0.6) * 0.85) {
            state.speedEvidence = Math.max(0, state.speedEvidence - 1);
        }

        if (getConfig().getBoolean("checks.flight.enabled", true)
                && verticalDistance > getConfig().getDouble("checks.flight.max-upward-per-event", 1.2)
                && !player.isFlying()
                && !player.isGliding()
                && !player.isOnGround()
                && state.airTicks >= getConfig().getInt("checks.flight.minimum-air-time-ticks", 8)
                && state.lastVelocityUntil < now) {
            if (now - state.lastFlightEvidence > 1_500_000_000L) {
                state.flightEvidence = 0;