Skip to content

3.8.1: fix config charset, action and toggle bugs; drop WorldGuardWrapper - #78

Merged
zeshan321 merged 2 commits into
masterfrom
fix/3.8.1
Oct 3, 2026
Merged

zeshan321 merged 2 commits into
masterfrom
fix/3.8.1

Conversation

@zeshan321

Copy link
Copy Markdown
Owner

Fixes four bugs from the post-3.8.0 scan. It also removes WorldGuardWrapper, adds a fallback action bar method for Paper, makes the jar reproducible and updates CI. The version is 3.8.1.

Bugs fixed

  • The config updater could damage accented letters. Bukkit 1.8 reads config.yml in the system charset, for example windows-1252 on Windows. 3.8.0 read and wrote the whole file as UTF-8. Now the updater appends bytes and never writes the existing bytes again. The default config is ASCII, so the new text is the same in every charset. This affected only files that were not saved as UTF-8 and had non-ASCII text.
  • The action system sent messages more than once. Each hit added a new tag, even for the same target, and each tag sent the action message. With TagAmount: 2, two hits on one player also pushed out the second target. Now there is one tag for each target.
  • DAMAGE: ANY was never found. The check read the message instead of the key. The hit listener now skips its own message only when Action.Enabled is true. Without that, a key-only fix would have turned off health-on-hit for every server, because the default config has DAMAGE: ANY.
  • The toggle message showed all the time. A toggled player with a Toggle Message got it every second, even when looking at nothing. Now it shows only while the player looks at an entity.

Other behavior changes

  • The action listener tags the attacker before it sends the DAMAGE message. On 3.8.0, the first hit could give the health message and no ANY message.
  • Damage causes such as LAVA (the example in the config) now work for all damage. Before, only hits by an entity checked the cause.
  • Action messages follow the same rules as health messages: disabled worlds and regions, Use Permissions, Show Mob/Show Player, and the toggle.
  • With Region PvP: false, a cancelled hit shows the health without the damage. The hit did no damage. The config comment for Region PvP now says what the option does.

Dependencies and platform

  • WorldGuard through reflection. support/WorldGuardSupport.java reads regions on WorldGuard 6 and 7. WorldGuardWrapper had no commits since June 2023. The jar is now about 94 KB instead of 922 KB.
  • Adventure action bar method. Paper deprecated the BungeeCord chat API. The new method uses Audience#sendActionBar and is second in the list, after the Spigot API. The log now names the method that works, for example Sending action bars with the Spigot API. The system property -Dactionhealth.actionbar=adventure starts with a later method, for tests.
  • Folia threads. When another thread owns the player (an arrow from far away), the hit message and action messages run on the thread of the player. When the current thread owns the player, they run at once, as before. Action bar sends no longer wait on one shared lock.
  • Reproducible jar. Two builds of the same commit give the same SHA-256. Spigot's public repository group replaces the codemc repository.
  • CI. checkout v7, setup-java v6, cache v6, upload-artifact v7 and download-artifact v8, which all run on Node 24. The runner is fixed to ubuntu-24.04, because ubuntu-latest moves to Ubuntu 26 on October 19, 2026.

Tests

  • Unit tests: 46 pass (13 new).
    • ActionStoreTest: ANY detection, one tag for each target, tag limits and expiry.
    • ConfigUpdaterTest: keeps the bytes of a windows-1252 file, does not write a complete file, the default config is ASCII, and sections have no new options. The updater adds only top-level options, so the last test fails if a new option goes inside a section.
  • Linkage check: 68 of 68 spigot-api versions pass.
  • New bot checks: method, toggle-message, action-damage and action-tags. I ran them against the 3.8.0 jar on Spigot 1.21.11. All four fail there, so they catch the old bugs.
  • Full set on the 3.8.1 jar, all pass:
    • 27 Spigot versions, 1.8 to 26.3.
    • Paper 1.8.8, 1.20.6, 1.21.11 and 26.3.
    • Paper 1.16.5 and 1.21.11 with the Adventure method.
    • Folia 1.21.11 and 26.2.
    • WorldGuard 6.1, 6.2.2, 7.0.15 and 7.0.19.
    • PlaceholderAPI 2.12.3 on 1.8.8 and 26.3.
    • ModelEngine R3.1.11 on 1.20.4.
  • The first Paper 1.16.5 run failed for two test setup reasons, not plugin bugs. Paper 1.16.5 does not start on Java 17, so it now runs on Java 8. On 1.16, Adventure sends the action bar in a title packet, which the bot now reads.

Not tested

  • The Folia path where the player is in a region that another thread owns. The bots stand next to their targets, so the tests use the path where the current thread owns the player.
  • LAVA and other non-entity damage causes in the action system.
  • Folia 26.3 does not exist yet.

🤖 Generated with Claude Code

zeshan321 and others added 2 commits October 2, 2026 23:56
- The config updater appends bytes and never rewrites config.yml. Bukkit 1.8
  reads the file in the system charset, so a UTF-8 rewrite damaged accented
  letters on some Windows servers.
- The action system keeps one tag for each target. Before, each hit added a
  tag, and each tag sent the action message again.
- DAMAGE: ANY is now found by its key, not its message. The hit listener
  skips its message only when the action system is on.
- The action listener tags the attacker before it sends the DAMAGE message.
  Damage causes such as LAVA now work for all damage, not only entity hits.
- Action messages follow the same rules as health messages: worlds,
  regions, permissions and the toggle.
- The toggle message shows only while the player looks at an entity.
- A cancelled hit (Region PvP false) shows the health without the damage.
- WorldGuard 6 and 7 are read through reflection. WorldGuardWrapper had no
  commits since 2023. The jar is now about 94 KB instead of 922 KB.
- New Adventure action bar method, used if Paper removes the BungeeCord
  chat API. The log names the method that works.
- Folia: hit and action messages run on the thread of the player when
  another thread owns the player. Action bar sends no longer share a lock.
- The jar is reproducible. Spigot's public repository replaces codemc.
- CI: newer action versions (Node 24) and a fixed ubuntu-24.04 image.
- Tests: 13 new unit tests, and 4 new bot checks (method, toggle-message,
  action-damage, action-tags). Paper 1.21.11 and 1.16.5 run with Adventure.
- Version 3.8.1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… action bars

Paper 1.16.5 does not start on Java 17. Paper's Adventure API sends the action
bar in a title packet on 1.11 to 1.16, so the bot now reads that packet too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@zeshan321
zeshan321 merged commit 16afafc into master Oct 3, 2026
4 checks passed
@zeshan321
zeshan321 deleted the fix/3.8.1 branch October 3, 2026 04:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant