Develop an anti-cheat plugin for PaperMC 26.1.2 tailored for your PvP server, PvP Palace. The plugin should detect and prevent common cheats such as speed hacks, anti-knockback, and kill aura, with customizable thresholds for sensitivity. Include a logging system for suspicious activities, configurable alerts for staff, and a user-friendly admin interface for managing settings and viewing reports.
Set up the Paper 26.1.2 plugin and configurable defaults.
Add speed, anti-knockback, and kill-aura checks with conservative false-positive safeguards.
Log incidents, alert staff, and add an inventory-based admin interface for settings and reports.
Created the PvP Palace anti-cheat plugin for Paper 26.1.2. It checks ground speed, combat knockback, and suspicious attacks; repeated violations trigger movement rollback, renewed knockback, or cancelled hits.
Thresholds and alert behavior are configurable in config.yml. Incidents are written to logs/suspicious.log, and staff can use /palaceac for settings and reports or /palaceac alerts to toggle personal notifications.
in my server there is mace and sword and crystal and axe and uhc and also netherite
I’ll add PvP profiles for those six modes, make the checks use the right profile, and expose profile selection and tuning to admins. I’ll also keep crystal explosions and mace smash damage out of the ordinary melee check.
Added separate anti-cheat profiles for mace, sword, crystal, axe, UHC, and netherite PvP. Each profile can have its own thresholds and check switches; incidents now record the active mode, and violations are counted separately per mode.
The plugin auto-detects mace and axe, then uses sword as the fallback. Assign crystal, UHC, or netherite arena worlds under profiles.worlds in config.yml. For arenas sharing a world, use /palaceac profile <player> <mode|auto>. Admins can cycle through and tune the profiles in /palaceac settings.
Crystal and mace knockback checks are off by default to avoid treating their unusual movement as ordinary melee knockback.
no i dont want profiles i want it all in one. it should also be optimized and not use too much resources so that the whole server lags. also check for auto totem.
Remove PvP profiles so every mode uses one set of checks and settings.
Reduce per-event work and add an auto-totem check with false-positive safeguards.
Removed PvP profiles. Mace, sword, crystal, axe, UHC, and netherite now use the same configurable checks; existing profile settings are removed when the plugin starts.
To reduce server load, movement is sampled every two ticks, incident writes are batched off the main thread, and repeated flags are rate-limited. Added an auto-totem check that reports repeated, unusually fast offhand refills after totem pops. It alerts staff but does not block refills, since a fast manual swap alone is not proof of cheating. Its sensitivity is configurable in config.yml and the admin menu.
make a /sus command and that shows the history. also make the command for the settings /ac or /anticheat not /pvppalaceac:pac or something like that i dont know. also make it so that when i do /sus that when theres like people in the history tab that when i click on them i teleport to them atleast if they're online. if they're not online a small placeholder text on my screen says that they're not online
Add
/suswith a clickable history view and online-player teleporting.Rename the settings command to
/ac, with/anticheatas its alias.
Added /sus to open the suspicious-activity history. Staff can click a report to teleport to that player if they’re online; if they’re offline, the menu closes and a brief on-screen message appears.
The settings command is now /ac, with /anticheat as an alias. The old /palaceac and /pac command names were removed.
Implement the user's requested anti-cheat changes in the existing PvPGuardian / PvPPalaceAntiCheat project. Read the current source before editing. Existing key files: src/main/java/com/pvppalace/anticheat/CombatChecks.java, IncidentService.java, PalaceAntiCheat.java; config.yml and plugin.yml. Keep existing checks/features working.
Requirements:
- Add a configurable survival/adventure fly check. Do not check players in CREATIVE or SPECTATOR (explicitly ensure creative players are exempt from all movement checks), and preserve existing bypass exemptions. Only flag sustained, clearly unsupported flight (e.g. repeated hovering/upward motion without ground/support), not ordinary jumps. Avoid false positives by respecting teleport/velocity/combat grace, vehicles, actual server-authorized flight, gliding, swimming/water, levitation/jump effects, ladders/vines/scaffolding and other climbable or unusual movement blocks, unloaded/changing worlds/chunks, and lag/large sample gaps. Follow existing IncidentService.Check + config threshold pattern. Add configurable checks.fly.enabled and action-violations values.
- Add a configurable Crystal PvP speed check for suspicious End Crystal action rate (at minimum count a player's end-crystal placements; if tracking crystal attacks too, identify player attackers robustly). Use Bukkit events / existing API. Avoid counting cancelled interactions or unrelated item/entity actions, use a short rolling time window with a configurable reasonable rate threshold and violation threshold. Avoid false positives from network bursts by using a rolling window and require repeated suspicious windows. Add checks.crystal-speed config and a suitable new IncidentService.Check value. Do not interfere with normal placement/explosions.
- Reaching configured action-violation threshold should actually KICK the offending player (not merely rollback movement). Do this consistently for all anti-cheat check types where an action threshold is configured, with a configurable kick reason if practical. Kick once on crossing the action threshold, ensure the incident is marked as prevented/actioned, and do not keep processing a player after they are kicked. Ensure the kick action happens on the main server thread (all Bukkit event/check handling should already be synchronous).
- Notify online OPs when an action threshold kicks someone, explicitly naming player and check/reason and saying they were kicked. Keep the existing alert flow/config compatibility; ideally alerts with palaceac.alerts should continue to see flags and operators should always see kick notifications, even if their ordinary alerts are toggled off. Do not announce a kick unless a kick really occurred.
- Apply checks to cracked/offline-mode players and Bedrock players too. Do not infer cracked status from UUID/name and do not exempt offline-mode accounts. Bukkit presents these as Player objects, so checks should operate regardless of online-mode/UUID source. If adding optional Bedrock/Floodgate recognition, use optional reflection/no required dependency and never use it as an exemption; avoid brittle username-prefix detection. Give sensible config defaults, including any optional Bedrock tolerance only if genuinely needed. No hard dependency on Floodgate.
Keep config backward compatible, guard absent config keys with defaults, and update any user-facing config/description as needed. Do not build/compile; return a concise summary of changed files and implementation behavior.
Inspect the current checks, incident/action flow, and config.
Add conservative fly and crystal-rate checks with backward-compatible defaults.
Make configured action thresholds kick once, with operator notifications and existing alert compatibility.
CombatChecks.java— Added a configurable fly check that flags sustained unsupported hovering or upward motion. It respects movement grace periods, authorized flight, creative/spectator modes, bypasses, vehicles, effects, unusual blocks, chunk changes, and long sample gaps. Added a rolling End Crystal placement-rate check that ignores cancelled interactions and requires repeated suspicious windows.IncidentService.javaandPalaceAntiCheat.java— Configured action thresholds now kick once. A kick is recorded as prevented and announced to online OPs only when the kick event isn’t cancelled; existing staff alerts remain intact.config.ymlandplugin.yml— Added fly and crystal-speed settings, a configurable kick reason, and an updated description.
Checks apply to Bukkit players without offline-mode or Bedrock exemptions. Not compiled, as requested.
Implement the user's request in PvPGuardian: automatically kick players when any supported hack type reaches its configured action threshold, consistently across every check. I inspected the source: IncidentService.flag(Player, Check, String, int) already contains shared kick logic, and CombatChecks calls it for SPEED, FLY, CRYSTAL_SPEED, KNOCKBACK, AURA, and TOTEM. The default src/main/resources/config.yml has checks.*.action-violations for all of these except TOTEM. Inspect relevant source and make a focused, backward-compatible implementation: ensure all existing hack check types, including totem, have intentional action-violations defaults and flow through the same kick action; ensure any future/current flag call cannot silently skip kicking at threshold due to missing config. Preserve configurable thresholds, current configurable kick reason, incident logging/alerts, and respect check enablement / bypass behavior. Do not add a manual /kick command unless required by existing design; request means auto-kick on all hack detections. Add/adjust docs/config comments if appropriate. Do not build/compile. Report exactly what files and behavior changed.
Centralize action-threshold lookup in
IncidentServiceso every check gets a safe per-check fallback.Route all existing flags through that shared threshold and configure totem’s threshold explicitly.
Centralized auto-kick thresholds in IncidentService. All six check types—speed, fly, crystal speed, knockback, aura, and totem—now use their configured checks.<type>.action-violations value, with safe defaults if a key is missing. Added checks.totem.action-violations: 3 and removed caller-supplied thresholds so flags cannot bypass the shared threshold logic.
Changed IncidentService.java, CombatChecks.java, and config.yml. Not compiled, as requested.
Modify the PvPGuardian/PvPPalaceAntiCheat plugin to implement escalating per-player anti-cheat punishment: first recorded alert only notifies/logs; on the 2nd recorded alert, immediately kick the player; on the 15th recorded alert, ban the player for 1 day and kick them with the ban reason (ban supersedes kick). Count alerts player-wide across all check types, not separate per check. Since a kick disconnects the player, preserve the alert count across quit/rejoin and server restarts, keyed by UUID; do not reset this escalation counter in IncidentService.clear(Player). Keep existing check counters/logic only as needed, but ensure they cannot cause a kick before player alert #2 and do not prevent the #15 ban. Use Bukkit/Paper's built-in timed ban API (or an equivalent reliable API); do not assume an external /ban command plugin is installed. Expiration should be exactly one day from the ban time. Make thresholds/duration configurable in config.yml with defaults kick-after-alerts: 2, ban-after-alerts: 15, ban-duration-days: 1. Alert counting should be based on actual recorded/reportable incidents, avoiding counting every raw internal check invocation suppressed by current one-second logging throttle. Preserve incident logging and staff alerts; annotate incident details/action status appropriately for kick and ban. Read existing IncidentService and CombatChecks, adapt to existing code and Bukkit target API, update defaults safely, and make clear in comments/config that the ban is functionally equivalent to /ban <player> 1d. Do not change unrelated checks. Finish the code/config edits only; I will compile.
Replace per-check kick thresholds with player-wide recorded-incident escalation.
Persist UUID alert counts separately from quit-cleared check state.
Use Bukkit’s timed name-ban API, annotate incidents, and add configurable thresholds/reasons.
Changed IncidentService.java and config.yml.
Recorded incidents now escalate player-wide by UUID: alert #2 kicks, and alert #15 applies a timed ban and kicks with the ban reason. Counts are persisted across quits and restarts; incidents suppressed by the existing one-second recording throttle don’t count. Per-check thresholds no longer trigger punishments. Incidents retain their log and alert flow, with kick/ban status added to incident details.
Added configurable actions.kick-after-alerts, actions.ban-after-alerts, actions.ban-duration-days, and actions.ban-reason. The default one-day ban uses Bukkit’s built-in timed name-ban API, equivalent to /ban <player> 1d. Not compiled, as requested.
Carefully audit and fix false-positive SPEED and AURA detections for a legitimate player attacking while Elytra-gliding (including spear attacks) in this Paper 26.1.2 plugin. Read CombatChecks, IncidentService, and config.yml before editing. Current observations: CombatChecks.sampleMovement checks speed only when both samples say grounded and canCheckMovement excludes player.isGliding()/isFlying(), but sample/transition edge cases and landing momentum still need review. onAttack applies generic 4.2-block reach/angle checks to every player melee hit, including elytra-gliding attacks. IncidentService.flag uses a persisted player-wide alert count for kick-after-alerts, so old or unrelated SPEED/AURA incidents may combine to cause a kick; audit and correct this safely.
Implement narrow, evidence-based changes: (1) never evaluate ground SPEED across or immediately after elytra/flight transitions or during airborne/landing momentum; reset movement samples and use an appropriate short configurable grace if needed, while preserving detection of sustained abnormal grounded movement. (2) avoid treating legitimate Elytra-gliding spear/melee attacks as ordinary stationary aura samples; use Bukkit/Paper API available in this project and narrow exemptions rather than disabling aura generally. Ensure ordinary grounded reach/angle/target-count checks remain. (3) revise kick escalation so stale lifetime/persisted unrelated alerts or one isolated check anomaly cannot make the next single false-positive kick someone; retain configurable escalation and prevent easy evasion by selecting a different check. Consider a recent evidence window and/or repeated evidence requirements, keep counts/backward compatibility sensible, and update defaults/comments in config.yml. Do not blanket-disable checks, introduce unsafe version-specific imports, or change unrelated features. Add or update tests if this project has a test setup; otherwise keep changes clear and defensive. Report changed files and explain the specific false-positive paths addressed; do not attempt to build.
SPEED: reset samples across airborne/flight states and add a configurable landing/transition grace.
AURA: exempt only gliding melee attacks from stationary reach/angle samples; retain grounded checks.
Escalation: replace stale lifetime counts with recent, cross-check evidence and require repeated incidents before punishment.
SPEED now skips grounded comparisons until the configurable grace expires after flight or airborne movement. Next I’m narrowing only the gliding reach/angle checks, leaving the aura target-count check intact.
The AURA change exempts only gliding attacks from reach/angle scoring; target-count and normal attacks remain checked. I’ll now make punishment thresholds use persisted, recent recorded incidents across all checks, while retaining legacy lifetime totals without letting them trigger punishment.
Changed CombatChecks.java, IncidentService.java, and config.yml.
SPEED: Movement samples now track flight state. Ground-speed comparisons are skipped across flight/gliding transitions and airborne movement, with a configurable 20-tick grace after landing or leaving flight. Sustained abnormal grounded movement remains checked.
AURA: Gliding melee attacks bypass reach and angle scoring to avoid false positives from Elytra momentum, including spear attacks. The target-count check remains active, and ordinary attacks retain all existing checks.
Escalation: Punishments now use persisted, player-wide incident evidence from a configurable rolling window (default 600 seconds). Legacy lifetime counts are retained but no longer trigger actions; recent evidence still aggregates across check types. The existing recording throttle remains in effect.
Config: Added the SPEED grace and escalation-window defaults and comments.
No test setup was found. I did not build or compile the project.
So everything works, but my friend isn't hacking but he gets hit with aura. And then he gets banned, not good. Can you fix that so that people with high ping don't get banned?
Add latency-aware AURA handling: relax multi-target scoring and skip unreliable reach/angle checks above a configurable ping threshold.
Keep high-ping AURA reports visible to staff, but exclude them from automatic kick/ban evidence.
Leave normal-ping AURA checks and the other anti-cheat checks unchanged.
Updated CombatChecks.java, IncidentService.java, and config.yml.
When either player’s ping exceeds the configurable checks.aura.max-trusted-ping-ms threshold (default 180 ms), AURA ignores reach and angle samples, and allows more targets in the short attack window. Any high-ping AURA report is still logged and shown to staff, but cannot count toward automatic kicks or bans. Normal-ping AURA checks and other checks are unchanged.
Not compiled.
Also check if people are faking high ping.
Remove the all-or-nothing high-ping AURA exemption.
Keep bounded latency tolerance, but let repeated extreme reach and excessive target-count evidence still count toward actions.
Document the limitation: server RTT can’t reliably distinguish real lag from deliberately delayed keepalive replies.
Updated CombatChecks.java and config.yml. High ping no longer makes AURA reports automatically non-punitive: AURA allows a configurable extra 1 block of reach and a higher target-count limit, but extreme reach and excess target counts still count toward kick/ban escalation.
Bukkit’s ping is server-measured round-trip time, not just a client display value. However, deliberately delaying keepalive replies can look like genuine network lag, so the plugin can’t reliably prove someone is faking it. The bounded tolerance prevents high ping from granting complete AURA immunity. Not compiled.
Remove the feature to ban and kick people when they are suspected of cheating in the minecraft server. Also, my friend just flagged for no reason!!! He got flagged for both aura and fly. He just got kicked for fly hacking while he isn't cheating. Please fix that when people have ping like average 45 ms like me and my other friend because the server is in Helsinki, Finland but i live in the netherlands and my other friend in austria that WE DON'T GET FRIKKIN FLAGGED!
Removed all automatic anti-cheat kicks and bans. Suspicious incidents still appear in logs and staff alerts, but the plugin now records them as not prevented and cannot punish a player—existing actions settings are ignored.
Reduced the reported false-positive paths in CombatChecks.java:
Fly: flight transitions reset movement checks, and flagging now requires at least 60 airborne ticks and 20 sustained hover/upward samples—even if an older config has lower values.
Aura: angle is measured to the nearest point on the target’s hitbox instead of its center. Reach gets a small 0.35-block tolerance at ordinary ping, and three suspicious attacks within five seconds are required before an alert is recorded. A multi-target burst counts only once per window.
Updated config.yml with the safer defaults and removed the punishment settings. These changes reduce false positives; they don’t guarantee that every remaining alert is proof of cheating.
Also add detection for flying, please don't make it so that when people fall or fly with an elytra that they get detected for flying!
Fly detection already exists and excludes Elytra gliding. I’ll make descending movement reset its evidence too, so falling can’t contribute to a fly alert.
Updated fly detection: falling now clears flight evidence, and Elytra gliding remains exempt. The check alerts staff only after sustained unsupported hovering or upward movement; it does not kick or ban players.
Also detect if people are hacking with CrystalPVP, like insane crystal speeds that are impossible to do, and hacking with respawn anchors. Also add detection for Airplacing and breaking blocks too fast.
Extend Crystal PvP detection to cover unusually fast crystal and respawn-anchor actions.
Add conservative air-place and fast-break checks, keeping detections alert-only.
Added alert-only checks for:
Crystal speed: existing rolling placement-attempt check, now ignoring denied item use.
Respawn anchors: repeated, unusually fast anchor interactions.
Air placing: repeated placements with no adjacent support.
Fast breaking: extreme rates on hard blocks, excluding enchanted tools and haste effects to reduce false positives.
Thresholds are configurable in config.yml. These checks do not kick or ban players. Crystal and anchor rates count interaction attempts, not confirmed successful actions; the fast-break check deliberately doesn’t cover every block or tool.
package com.pvppalace.anticheat;
import java.io.IOException;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;
public final class PalaceAntiCheat extends JavaPlugin {
private IncidentService incidents;
private AdminMenu menu;
@Override
public void onEnable() {
saveDefaultConfig();
if (getConfig().isConfigurationSection("profiles")) {
getConfig().set("profiles", null);
if (getConfig().getDouble("checks.speed.max-horizontal-blocks-per-tick") == 0.52) {
getConfig().set("checks.speed.max-horizontal-blocks-per-tick", 0.65);
}
if (getConfig().getDouble("checks.aura.max-reach") == 3.9) {
getConfig().set("checks.aura.max-reach", 4.2);
}
if (getConfig().getDouble("checks.aura.max-angle-degrees") == 80.0) {
getConfig().set("checks.aura.max-angle-degrees", 100.0);
}
saveConfig();
}
try {
incidents = new IncidentService(this);
} catch (IOException exception) {
getLogger().severe("Could not open the incident log: " + exception.getMessage());
Bukkit.getPluginManager().disablePlugin(this);
return;
}
menu = new AdminMenu(this, incidents);
CombatChecks checks = new CombatChecks(this, incidents);
Bukkit.getPluginManager().registerEvents(incidents, this);
Bukkit.getPluginManager().registerEvents(checks, this);
Bukkit.getPluginManager().registerEvents(menu, this);
Bukkit.getScheduler().runTaskTimer(this, checks::sampleMovement, 2L, 2L);
Bukkit.getScheduler().runTaskTimerAsynchronously(this, incidents::flush, 40L, 40L);
PalaceCommand command = new PalaceCommand(this, menu);
getCommand("ac").setExecutor(command);
getCommand("ac").setTabCompleter(command);
getCommand("sus").setExecutor(command);
getCommand("sus").setTabCompleter(command);
}
@Override
public void onDisable() {
if (incidents != null) {
incidents.close();
}
}
}