Release 1.1.1 - #28
Merged
Merged
Conversation
Ported from AOneBlock, which this addon is forked from and shares the display code with. See BentoBoxWorld/AOneBlock#551. An admin coloured a phase hologram with <green><bold>...</green> and got white text with the tags shown literally. Holograms deserialized with LegacyComponentSerializer.legacyAmpersand(), which understands the 16 legacy & codes and nothing else - Adventure builds that instance with hexColours=false, so even &#RRGGBB did not work. The action bar used a second, separately configured serializer that did support hex but not MiniMessage. Two display paths, two different answers to "what formatting can I use here", neither documented where anyone would look. Both now go through Util.parseMiniMessageOrLegacy, which accepts MiniMessage, & and section codes, hex, and any mixture, and is cached on the BentoBox side. This also fixes section codes being rendered as literal text. Translations come back from User.getTranslation already converted to section codes, so anything locale-sourced was being handed to a serializer bound to '&' - the starting hologram and the action bar both took that path. Phase file hologram lines never see the translation layer, which is why the reported case showed raw MiniMessage tags rather than raw section codes. The boss bar title is untouched: it uses the String-based Bukkit BossBar API and BentoBox has already resolved its formatting by then. Existing configs are unaffected. BentoBox's MiniMessage instance is the non-strict one, so text containing stray angle brackets is left as literal text rather than throwing. Util.parseMiniMessageOrLegacy is BentoBox 3.2.0 API, so this needs no dependency bump. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014t1DSo2wMbTWZLcwXpwUmQ
feat: support MiniMessage and hex colours in phase text
Claiming has only ever paid out per chunk. Closing a complete square around the centre is the milestone that keeps players expanding evenly rather than running one arm of chunks out to the border, so it now earns something. ChunkManager gains isRingComplete() and completedRings(); the latter counts outward from the centre and stops at the first hole, so a chunk claimed two rings out earns nothing while ring 1 is still gappy. RingCompleteEvent fires once per ring. Unlike ChunkUnlockEvent it is cancellable, so a reward plugin can take the milestone over completely; the ring stays complete either way. Rings are earned once and stay earned — highestRingRewarded is persisted on the island data, so losing levels and re-claiming the same chunks pays nothing. Only island create or reset clears it. Rewards are console commands under chunkblock.rings (once per ring, and once per member), deliberately empty by default; the config comment warns against paying island levels, since levels buy chunks and that makes each ring buy the next one. Trophies, titles and secret phase branches from the issue are left out on purpose: the event and command hooks are what lets that layer live outside the gamemode. Part of #3 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017EZEwab2kL4i1FNnBYvSmp
[chunks] is the island's total chunk count, not the ring's, so an island holding chunks outside the closed ring was told it was "a perfect square of 16 chunks" — a number that is not a square at all. Say what is actually true: the ring is closed, and here is the total.
The center chunk drew as an ordinary owned chunk, so a grid of identical squares had nothing to orient by — reading it meant counting rows in from an edge. It now gets its own glyph, and a second one for when the player is standing on it, since that is where the magic block is and where players spend most of their time. The legend gains both. Adds IslandChunksCommandTest, which the map had gone without.
Reward islands for closing a whole ring of chunks
Chat's default font is proportional, so a grid of mixed glyphs came out ragged — how far a row reached across the screen depended on which chunks happened to be claimed, which is the opposite of what a map is for. The rows now go out as components in minecraft:uniform, Minecraft's built-in fixed-width font, so the columns line up. Only the rows change font; the title and legend stay in the normal chat font. The row locale key is still used — getTranslationAsComponent() resolves the legacy colour codes, and the font is set on the result.
Render the territory map in a monospaced font
MAGIC_BLOCK is the ID AOneBlock uses too, and BentoBox's flags manager drops the second registration of an ID without a word — so with both gamemodes installed, whichever loaded second was quietly running on the other addon's flag definition. Nothing misbehaved yet only because the two definitions are identical and neither sets a game mode on the builder; both are coincidences. This is the same bug class as the CHUNKBLOCK_* renames in 1.0.1, missed then. Renamed to CHUNKBLOCK_MAGIC_BLOCK in the flag, the field, default-island-flags and all 18 locale files, so translations follow the key. registerFlagOrWarn() now logs when the flags manager refuses a flag, for all five flags rather than just this one — the failure was invisible, which is why it went unnoticed for two releases. Addon already has a registerFlag() that returns the boolean; it just was not being checked. ChunkBlockTest asserts by reflection that every Flag field carries the prefix, so a new flag cannot reintroduce this. Fixes #24
Prefix the magic block flag ID so it cannot collide with AOneBlock
The claim rank was checked before anything had established that the click was a claim gesture, so every left or right click in the world ran the denial branch. Any player below the claim rank was told "Your rank cannot claim chunks for this island!" for opening a chest, pressing a button or mining — throttled to once every two seconds, uncancelled and unlogged, so the interaction still went through and nothing showed in console. The checks that recognise ordinary interaction — clicked block sits in unlocked territory, aim ray finds no locked chunk — all sat below the rank check and never got the chance to bail out. Move the rank check to after the target chunk is resolved, so a low-rank teammate only hears about the claim flag when they genuinely aim at a locked chunk, which is what that message was for. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017EZEwab2kL4i1FNnBYvSmp
…ary-clicks fix: only complain about claim rank when a chunk is actually targeted
…and revise terminology for Taiwan Minecraft community usage
Add missing v1.1.0 translation keys (chunk claiming system, phase editor)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Release 1.1.1 —
develop→master.Headline fix is #27: a member below the claim rank
was told
Your rank cannot claim chunks for this island!every time they opened a chest, pressed a buttonor mined. The rank check ran before anything established that the click was a claim gesture, so every
click in the world reached the denial branch — uncancelled and unlogged, which is why the chest still
opened and console stayed quiet. Rank is now checked only after a locked chunk is genuinely targeted.
Also carried, all merged to
developafter the 1.1.0 tag was cut:RingCompleteEvent,chunkblock.ringsconfig,island_rings_completeplaceholderminecraft:uniformso the grid is squareMAGIC_BLOCK→CHUNKBLOCK_MAGIC_BLOCK, so the flag ID cannot collide with AOneBlock. Fixes #24build.versionis already 1.1.1 (f97c93c). BentoBox API requirement is unchanged at 3.22.0.🔺 Breaking for admins
The flag rename in #25 means islands that customised Magic Block Protection revert to
COOP_RANKunder the new ID, and
default-island-flagskeeps an orphanedMAGIC_BLOCK: 200line. Same one-off costas the flag renames in 1.0.1. Covered in the draft release notes.
Verification
mvn clean testgreen ondevelopat 5363f17.Draft release notes for 1.1.1 are on GitHub, ready to publish once Jenkins has built the jar.
🤖 Generated with Claude Code
https://claude.ai/code/session_017EZEwab2kL4i1FNnBYvSmp