Skip to content

Allow /is restart only in the skyworld - #245

Merged
minoneer merged 1 commit into
masterfrom
fix/is-restart-skyworld-only
Nov 1, 2026
Merged

minoneer merged 1 commit into
masterfrom
fix/is-restart-skyworld-only

Conversation

@minoneer

@minoneer minoneer commented Nov 1, 2026

Copy link
Copy Markdown
Member

Problem

A restart started outside the skyworld clears nothing up front. restartPlayerIsland only clears the inventory right away when the player is in the skyworld; otherwise the clear waits until GenerateTask has built the new island. In that gap a player can get into the skyworld (/is spawn has no "island is generating" guard, and a delayed /is home//is warp teleport started before confirming fires without re-checking) and log out. They keep their old inventory, armour and ender chest on the fresh island, next to the new starter items.

Fix

/is restart now refuses outside the skyworld with "You can only restart your island in the skyblock world!", the same pattern as challenge hand-in. The existing immediate clear therefore always runs. The skyworld nether is refused too, because the immediate clear only runs in the skyworld itself.

The island menu is unchanged: outside the skyworld the restart menu still opens, and clicking a scheme gets the new message from the command.

German text added by hand in de.po; the other languages show the English text until they are translated.

Not in this PR: the /is accept ordering between the async challenge-permission grant and the deferred clear when accepting from another world. Impact is low (default and Asylum rewards are only usb.biome.*) and the fix touches PlayerInfo.onTeleport/clearPerms semantics, so it is left for the 4.0 rework.

How tested

  • New unit test RestartCommandTest.refusesRestartOutsideTheSkyWorld: outside the skyworld, one error message, no confirm, no cooldown reset, no RestartIslandEvent. The existing test now stubs the player as in the skyworld.
  • keys.player_facing.pot updated by hand (sorted position); CI's template drift check confirms it.
  • ./gradlew build passes locally (JDK 21), including RestartCommandTest (2/2).

A restart started outside the skyworld cleared nothing up front: the
inventory clear waited until the new island was generated. In that gap
a player could get into the skyworld (/is spawn, or a delayed teleport
started before confirming) and log out, and keep their old inventory,
armour and ender chest on the fresh island next to the new starter
items.

Restart now refuses outside the skyworld, like challenge hand-in does,
so the existing immediate clear always runs. The skyworld nether is
refused too, because the immediate clear only runs in the skyworld.
@minoneer
minoneer marked this pull request as ready for review November 1, 2026 12:28
@minoneer
minoneer merged commit 5825c55 into master Nov 1, 2026
6 checks passed
@minoneer
minoneer deleted the fix/is-restart-skyworld-only branch November 1, 2026 12:31
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