From 5ab44ad21db928c7cecfaaf3b442e757c872c1aa Mon Sep 17 00:00:00 2001 From: tastybento Date: Sun, 23 Aug 2026 08:03:09 -0700 Subject: [PATCH] fix: include claimer name in chunk claimed message Team members were confused when they saw "Chunk claimed!" and thought they had claimed a chunk, when it was actually another team member. The message now shows who did the claiming: "[name] claimed a chunk!" Co-Authored-By: Claude Opus 4.6 (1M context) Claude-Session: https://claude.ai/code/session_01QWvvUY9ZZJHxUYm1UyjdwK --- .../world/bentobox/chunkblock/listeners/LevelListener.java | 4 +++- src/main/resources/locales/en-US.yml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/world/bentobox/chunkblock/listeners/LevelListener.java b/src/main/java/world/bentobox/chunkblock/listeners/LevelListener.java index fa1d085..81e1ef1 100644 --- a/src/main/java/world/bentobox/chunkblock/listeners/LevelListener.java +++ b/src/main/java/world/bentobox/chunkblock/listeners/LevelListener.java @@ -184,10 +184,12 @@ public void celebrateClaim(Island island, int chunkX, int chunkZ, @Nullable UUID chunkZ - (island.getCenter().getBlockZ() >> 4)); Bukkit.getPluginManager().callEvent(new ChunkUnlockEvent(island, offset, count - 1, claimer)); long creditLeft = Math.max(0, cm.getCredit(island)); + String claimerName = playerName(claimer); island.getMemberSet().forEach(uuid -> { User user = User.getInstance(uuid); if (user.isOnline() && addon.inWorld(user.getWorld())) { - user.sendMessage("chunkblock.chunks.claimed", "[number]", String.valueOf(count), + user.sendMessage("chunkblock.chunks.claimed", TextVariables.NAME, claimerName, + "[number]", String.valueOf(count), "[credit]", String.valueOf(creditLeft)); if (count >= cm.getMaxChunks(island)) { user.sendMessage("chunkblock.chunks.max-reached", "[number]", String.valueOf(count)); diff --git a/src/main/resources/locales/en-US.yml b/src/main/resources/locales/en-US.yml index 483e52b..e3d623a 100755 --- a/src/main/resources/locales/en-US.yml +++ b/src/main/resources/locales/en-US.yml @@ -46,7 +46,7 @@ chunkblock: claim-confirm: "Claim this chunk for [cost] level(s)? That leaves you [after] level(s) of credit. Sneak and hit the border again within [seconds]s to confirm." no-credit: "You need [needed] more level(s) of credit to claim this chunk." beyond-limit: "That chunk is beyond your island's protection area." - claimed: "Chunk claimed! Your island is now [number] chunks. Credit left: [credit] level(s)." + claimed: "[name] claimed a chunk! Your island is now [number] chunks. Credit left: [credit] level(s)." credit: "You can claim [count] more chunk(s)! Go to your border and hit it where you want to grow." relocked: "Your island level dropped — [count] chunk(s) re-locked, newest first. Regain the levels to claim them back!" ejected: "The chunk you were in re-locked, so you were moved to safety."