-
Notifications
You must be signed in to change notification settings - Fork 2
Admin Commands_EN
⚠️ Important Warning / 重要警告These commands are for extreme edge cases only and should be used by admins (OP level 4). Do not use them during normal gameplay.
本页命令仅限极端特殊情况下由管理员使用,普通游玩请勿使用。
global_energy_transis only for migrating EU after a player's UUID changes (e.g. premium → third-party account) — use normal in-game mechanisms for regular play.global_energy_joinis only for explicit multi-player shared grid needs — not required for single-player or regular multiplayer.
GTSWN provides a single admin command root /gtswn with 2 subcommands:
| Item | Description |
|---|---|
| Command name | /gtswn |
| Permission | OP level 4 |
| Tab completion | First argument can complete subcommand names |
| Subcommand count | 2 (global_energy_trans, global_energy_join) |
/gtswn global_energy_trans <fromUUID> <toUUID>
One-shot migration of all EU from the fromUUID network to the toUUID network.
Migrating EU after a player changes accounts (e.g. premium to third-party) causing the UUID to change.
⚠️ For Extreme Edge Cases Only / 极端特殊情况专用This command is only for UUID changes (e.g. account switch) where the EU balance becomes inaccessible. Do not use during normal play (including changing devices, reinstalling the game, or server migration) — in these cases the UUID remains unchanged and the EU balance is automatically preserved. Misuse may cause EU data loss or duplication.
| Parameter | Description |
|---|---|
| fromUUID | Source player UUID |
| toUUID | Target player UUID |
- Read the source network EU balance
- Deduct EU from the source network first (
setUserEU(fromUUID, sourceEU.subtract(eu))) - Then add EU to the target network (
setUserEU(toUUID, targetEU.add(eu))) - If the source EU was changed by another operation after reading, transfer the entire current balance instead
§aMigration succeeded: <eu> EU
§aFrom: <fromUUID>
§aTo: <toUUID>
§bTarget network total: <toUUID current EU> EU
| Scenario | Message |
|---|---|
| Invalid UUID format |
§cUUID 格式错误,请检查参数 (UUID format error, please check parameters) |
| Source = target |
§e源 UUID 与目标 UUID 相同,无需迁移 (Source UUID equals target UUID, no migration needed) |
| Source has no EU |
§e源网络无 EU 可迁移 (Source network has no EU to migrate) |
Security note: Deducting from the source before adding to the target avoids EU being created out of thin air due to non-atomicity. If the source EU is changed by another operation between the deduct and add steps, the entire current balance is transferred to ensure no over-issuance.
/gtswn global_energy_join <memberUUID> <leaderUUID>
Permanently joins the member network into the leader network via the GT5U team system (SpaceProjectManager).
Multi-player shared grid; the member's wireless EU operations are automatically resolved to the leader's network.
| Parameter | Description |
|---|---|
| memberUUID | Member player UUID |
| leaderUUID | Leader player UUID |
- UUID parsing and validation
- Same-UUID detection (no join needed)
- Call
SpaceProjectManager.getLeader(leaderUUID)to ensure the leader is registered - Loop detection: if
memberUUIDis the leader ofleaderUUID, reject (avoid cycles) - Cascade hint: if
leaderUUIDitself is in someone else's team, hint the actual network being joined - Execute the join:
SpaceProjectManager.putInTeam(memberUUID, leaderUUID)
gtswn.command.join.success:§aJoin succeeded: %s has joined %s's wireless network
gtswn.command.join.network_eu:§bTarget network total: %s EU
| Scenario | Message |
|---|---|
| Same UUID |
§e成员UUID与队长UUID相同,无需加入 (Member UUID equals leader UUID, no join needed) |
| Loop detection |
§c循环检测: %s 是 %s 的队长,无法加入 (Loop detected: %s is the leader of %s, cannot join) |
| Cascade hint |
§e注意: %s 的队长为 %s,%s 将加入 %s 的网络 (Note: %s's leader is %s, %s will join %s's network) |
Scenario: Player A migrates from a premium account to a third-party account; UUID changes from AAAA to BBBB.
/gtswn global_energy_trans AAAA BBBB
Result: All EU from the AAAA network is migrated to the BBBB network.
Scenario: Player B wants to join Player C's wireless grid.
/gtswn global_energy_join B-UUID C-UUID
Result: B's wireless EU operations are automatically resolved to C's network.
Scenario: Player D joins Player E, but E has already joined F.
/gtswn global_energy_join D-UUID E-UUID
Result: D actually joins F's network (cascade hint shown).