fix(lobby_transfer): pass connectionOptions object to transferPlayer
All checks were successful
Deploy Addons / deploy (push) Successful in 14s

The @minecraft/server-admin beta transferPlayer API takes
(player, { hostname, port }) — passing host/port positionally raised
"incorrect arguments, expected 2 received 3" at runtime. Matches the
working call site in hub_return_transfer_BP.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-24 00:33:31 +01:00
parent c35b97afef
commit 25870ef082

View File

@@ -97,7 +97,7 @@ system.runInterval(() => {
// transferPlayer from @minecraft/server-admin beta API — requires gametest experiment + permissions.json allows server-admin.
system.runTimeout(() => {
try {
transferPlayer(player, portal.host, portal.port);
transferPlayer(player, { hostname: portal.host, port: portal.port });
} catch (e) {
player.sendMessage(`§cTransfer failed: ${e.message}`);
}