fix(servers): 主人可放弃服务器、管理员可删除服务器,由 reaper 归档世界后释放或移除

This commit is contained in:
Lemon-miaow committed 2026-09-27 03:49:49 +08:00
1 parent 4a26bf4ca0
commit 0e08fa7ced
55 files changed
+2774 -119

No files matched your search

@@ -651,6 +651,16 @@ public final class WaitingRouter {
NamedTextColor.YELLOW));
return;
}
if ("server_retiring".equals(e.errorCode())) {
// The owner gave the server up or an admin is deleting it: it
// stays down until the reaper archives it, unless that is
// cancelled in the panel, so there is nothing to wait for.
player.sendMessage(Component.text(
zh ? "「" + serverName + "」已被放弃或正在删除,不能启动。"
: "« " + serverName + " » has been given up or is being deleted, so it can't be started.",
NamedTextColor.YELLOW));
return;
}
if ("start_failed".equals(e.errorCode())) {
// The last start failed with its retries spent. The join does
// not buy another round of them, so there is nothing to wait for.
@@ -226,6 +226,7 @@ public final class WaitingRouterTest {
{"ownerOnly, not the owner", "You're not allowed to start « gamma »", null},
{"retries spent", "« gamma » failed to start and its automatic retries are spent", null},
{"409 maintenance_in_progress", "« gamma » is under maintenance", null},
{"409 server_retiring", "« gamma » has been given up or is being deleted", null},
{"409 conflict", "Couldn't start « gamma » right now", "wake gamma failed (status=409)"},
{"503 at_capacity", "The cluster is at capacity right now", null},
{"503 unavailable", "Couldn't start « gamma » right now", "wake gamma failed (status=503)"},