Skip to content

Commit aa1cb9b

Browse files
tastybentoclaude
andcommitted
Cancel pending structure pastes when island is deleted
Pending structures in the active build queue continued to be pasted after a box was reset or deleted. Drain itemsToBuild on IslandDeleteEvent to match the existing cleanup of the pending map and persistent DB queue. Bump version to 3.4.0. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 8b3665d commit aa1cb9b

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
<!-- Do not change unless you want different name for local builds. -->
6464
<build.number>-LOCAL</build.number>
6565
<!-- This allows to change between versions. -->
66-
<build.version>3.3.0</build.version>
66+
<build.version>3.4.0</build.version>
6767

6868
<sonar.projectKey>BentoBoxWorld_Boxed</sonar.projectKey>
6969
<sonar.organization>bentobox-world</sonar.organization>

src/main/java/world/bentobox/boxed/listeners/NewAreaListener.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,9 @@ public void onIslandDeleted(IslandDeleteEvent event) {
361361
// Remove from in-memory cache
362362
islandStructureCache.remove(deletedIslandId);
363363

364+
// Remove from active build queue so we don't paste into a deleted island
365+
itemsToBuild.removeIf(record -> event.getIsland().inIslandSpace(record.location()));
366+
364367
// Remove from in-memory pending structures
365368
for (List<StructureRecord> records : pending.values()) {
366369
records.removeIf(record -> event.getIsland().inIslandSpace(record.location()));

0 commit comments

Comments
 (0)