Skip to content

Add per-island inventory switching (#40)#41

Merged
tastybento merged 2 commits intodevelopfrom
island_inv
Mar 30, 2026
Merged

Add per-island inventory switching (#40)#41
tastybento merged 2 commits intodevelopfrom
island_inv

Conversation

@tastybento
Copy link
Copy Markdown
Member

@tastybento tastybento commented Mar 30, 2026

Summary

  • Adds per-island inventory switching so players with multiple concurrent islands get separate inventories per island, preventing cross-island resource cheating
  • Controlled by a new options.islands config section with granular sub-options for each aspect (inventory, health, food, advancements, gamemode, experience, ender-chest, statistics)
  • Inventories switch when entering an owned island's protection zone, teleporting between owned islands, or respawning on a different owned island after death
  • Island inventories stay consistent across Overworld/Nether/End dimensions; generic nether/end preserves the current island's inventory
  • No behavior change for games without concurrent island ownership or players with a single island
  • Backward compatible: existing world-only data migrates to the first island that loads it

Config

options:
  islands:
    active: true
    inventory: true
    health: false
    food: false
    advancements: false
    gamemode: false
    experience: false
    ender-chest: true
    statistics: false

Test plan

  • All 75 unit tests pass (18 new tests added)
  • Player with 1 island: world switching works as before
  • Player with 2+ islands: teleporting between them switches inventory
  • Walking across island protection zone border triggers inventory switch
  • Die on island A, respawn on island B: island B inventory loaded
  • Generic nether: keep current island inventory, switch on return to different island
  • Mixed config (e.g., inventory per-island, health shared): only configured aspects switch
  • options.islands.active: false disables all per-island switching

Closes #40

🤖 Generated with Claude Code

tastybento and others added 2 commits March 30, 2026 13:43
Players who own multiple islands now get separate inventories per island,
preventing cross-island resource cheating. Inventories switch when
entering an owned island's protection zone, teleporting between owned
islands, or respawning on a different owned island after death. Island
inventories stay consistent across Overworld/Nether/End dimensions.
Controlled by the new options.islands config toggle (default: true).
No behavior change for games without concurrent island ownership.

Also fixes pre-existing @AfterEach (JUnit 5) annotations in tests that
should have been @after (JUnit 4), and fixes advancements being stored
under raw world name instead of the normalized storage key.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace the single islands boolean with a nested config that lets admins
control which aspects are switched per-island independently. Each option
(inventory, health, food, advancements, gamemode, experience, ender-chest,
statistics) can be toggled separately under options.islands. Options
default to matching the original behavior (inventory and ender-chest on,
rest off). The world-level option must also be enabled for the island
sub-option to take effect.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

@tastybento tastybento merged commit 04221aa into develop Mar 30, 2026
3 checks passed
@tastybento tastybento deleted the island_inv branch March 30, 2026 23:21
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.

Add Per-Island Inventory Support

1 participant