ADDED
2
- API: exact item declarations.
TransactionSpec.forItem(...)declares anItemStackwith its enchantments, name/lore, custom model data and potion contents, so kit, crate and custom-item plugins can declare what they give. A material-only declaration never matched such items, and players were flagged byinventory.reconciliation.aeven when the plugin declared the gain. - API:
FlagForgeApi.recordItemTransaction(owner, spec)declares and completes an item transaction in one call.
FIXED
22
-
inventory.reconciliation.ano longer flags ordinary play. Inventory interactions are now measured instead of predicted: the player's items are read when the interaction happens and again one tick later, and a gain is explained only when the open container lost the same items, when it came from a workstation's result slot, or when it is a known in-hand conversion. This covers every click action (plain, shift, number-key, offhand swap, double-click collect), drags, items returned when a crafting grid or workstation closes, the ender chest, donkey and chest-boat inventories, crafting, villager trades, anvils, grindstones, smithing tables, stonecutters, looms, cartography tables, furnace and brewing output, buckets, bottles, stew bowls, signed books and filled maps. Arrow and trident pickup, armor stands, lecterns, flower pots and dispensed armor are credited directly. Before this, a plain click taking items out of a chest, an ender chest round trip, a villager trade, or a log returned from the crafting grid were all reported as unexplained gains. -
inventory.reconciliation.anow measures armor, offhand, the cursor and bundle contents, not only the 36 storage slots, so equipping armor or using the offhand no longer looks like a gain. -
inventory.reconciliation.a: a shift-click into a nearly full chest no longer records the whole stack as moved (only what actually moved is recorded), and crafting no longer subtracts ingredients that were already moved into the crafting grid. Both made leftover items look like unexplained gains. -
inventory.reconciliation.a: Creative and Spectator players are no longer reconciled, and changing game mode starts a fresh baseline, so items spawned in Creative never flag later. -
movement.timer.ano longer flags normal clients when the server lags. The packet rate was computed per 20 server ticks, so at 12 TPS a vanilla client looked 66% fast, and a server stall delivered its whole backlog in one window. It is now measured against real time with a clock balance: each movement packet adds 50 ms, real time subtracts, late packets after lag only repay the deficit, and it flags once the client runs more thanbalance-allowance-ms: 500ahead. This also catches slightly fast clocks (e.g. 10%) that a per-second limit of 30 never saw. Thethresholdkey is replaced bybalance-allowance-msandmax-deficit-ms. -
packet.sequence.ano longer flags hits on packet-only NPCs and holograms, or on a mob or end crystal destroyed just before the hit arrived, and a single stray packet no longer flags. It now tracks the entity IDs actually sent to each client in spawn and destroy packets instead of looking entities up in the world from the network thread, keeps a destroyed ID valid for 2 seconds, and flags only when more thanthreshold: 2invalid attacks land withinwindow: 30s. -
movement.waterwalk.ano longer flags players treading water at the surface or rising in bubble columns. It now only counts samples with the feet withinmax-surface-depth: 0.25blocks of the fluid surface, above the depth where vanilla stops lifting a player holding jump. -
world.interaction_reach.a,world.impossible_action.a,world.scaffold.ano longer measure a player riding a boat, minecart or horse from where they got on. The player's position is now refreshed from their live location for every block break and placement. -
combat.reach.a,world.interaction_reach.a,world.impossible_action.anow follow the player'sentity_interaction_rangeandblock_interaction_rangeattributes instead of assuming vanilla's 3.0 and 4.5, so reach granted by plugins, items or/attributeno longer flags. -
movement.speed.anow scales its baseline by the livemovement_speedattribute instead of only the Speed and Slowness effects, so Soul Speed and speed granted by plugins or/attributeno longer flag. -
movement.elytra.ano longer flags steep dives. It measured total speed although its ceiling is meant for horizontal speed; it now measures horizontal speed, and after a dive it allows that dive's speed, fading at vanilla's elytra drag, so pulling out of a dive does not flag either. -
movement.phase.a(experimental, disabled by default) no longer treats slabs, stairs, open doors and fence gates as solid. It sampled one point at the feet withisSolid(); it now samples the path every 0.25 blocks at three heights inside the player against real collision shapes. -
Combat attacks: only direct melee hits count as attacks now. Sweep-attack splash damage and Thorns damage were also recorded as attacks, feeding reach, multi-target, attack-rate, line-of-sight, and bad-order checks with hits the player never made; Thorns in particular made the Thorns wearer look like they attacked without swinging.
-
combat.bad_order.a: no longer flags most first hits. It expected the arm swing before the attack, but the vanilla 1.9+ client sends it right after. FlagForge now waits up to 3 ticks for the trailing swing, and a new buffer (flag-at: 2.0,decay-per-valid-sample: 0.25) means a single unswung attack never flags alone. -
movement.nofall.a: no longer flags players whose fall damage was cancelled or zeroed by another plugin, god mode, or armor, players who cannot take fall damage (gamerulefallDamageoff, invulnerable, zero fall-damage multiplier), falls under Slow Falling or into cobwebs, sweet berry bushes, and powder snow, falls within the extra safe distance Jump Boost grants, or falls that already dealt damage on a block-edge landing. -
movement.flight.a: ground support now uses the player's full hitbox width and also scans the block layer below, so walking along block edges, sneak-bridging, and standing on fences or walls no longer look airborne. It also stops counting under Slow Falling, in cobwebs, sweet berry bushes, and powder snow, and for 3 seconds after a slime-block or bed bounce, and allows 4 extra samples per Jump Boost level. -
Game mode tracking: a player's game mode is now updated when it changes, not only recorded at join. Before this, Survival-only checks kept evaluating a player who switched to Creative.
-
world.fastbreak.a,world.nuker.a,world.fastplace.a,world.interaction_reach.a,combat.reach.a: no longer evaluate Creative or Spectator players. -
world.fastbreak.a: no longer flags blocks broken by other plugins on the player's behalf (vein miners, tree fellers). A break with no observed dig start on that same block was measured as 0 ms; it is now skipped. -
world.nuker.a: instant breaks (grass, crops, insta-mine tools) are counted on a separate limit,insta-break-threshold: 22, so sweeping through tall grass no longer flags. -
world.floating_place.a: no longer flags extending a scaffolding column. -
storage.yml:sql.portnow defaults to the database's standard port — 5432 for PostgreSQL, 3306 for MySQL — and the shipped file no longer sets it. Before, the file pinned 5432, so switchingdialecttoMYSQLwithout also changing the port connected to the wrong port. Existingstorage.ymlfiles keep whatever port they already set.
CHANGED
1
README.mdand the project site now say 38 checks; they still said 35.
TESTING
4
- Trace fixtures.
TraceFixtures(testkit) holds six deterministic traces — legitimate mining, a chest transfer, an unexplained inventory gain, walking and sprinting, PvP combat, and the same movement on a 14 TPS server with a 260 ms jittery connection — andTraceFixturesTestreplays each against every built-in check, requiring exactly its expected findings. Three cheating controls (3× sprint speed, a too-fast block break, 6-block reach) prove the clean traces really reach the checks. Replay now does the same per-profile bookkeeping as the live pipeline and uses the plugin's own check list, and the emptytraces/placeholder is gone. movement.suspicious_teleport.anow has tests; it was the one check with none.- Paper listeners and services that had no tests now do:
EnforcementSwitch(including that the shippedconfig.ymlkeeps enforcement off and observe-only on),CANCELbeing recorded as suppressed without a cancel hook, the inventory reconciliation listeners (TrackedItems,InventorySettlementListener,DirectGainListener,AdminGiveListener),BlockInteractionListener,MovementListener, the packet listeners, counters and rate tasks (ClientEntityListener,CombatPacketListener),StorageConfigLoader,RetentionPurgeTask,JsonCodec, andProtectionConfigLoader. - PacketEvents is now a test-only dependency so the packet listeners can be unit-tested; it is still never shaded into the plugin jar.