fix(lobby_transfer): pass connectionOptions object to transferPlayer
All checks were successful
Deploy Addons / deploy (push) Successful in 14s
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:
@@ -97,7 +97,7 @@ system.runInterval(() => {
|
|||||||
// transferPlayer from @minecraft/server-admin beta API — requires gametest experiment + permissions.json allows server-admin.
|
// transferPlayer from @minecraft/server-admin beta API — requires gametest experiment + permissions.json allows server-admin.
|
||||||
system.runTimeout(() => {
|
system.runTimeout(() => {
|
||||||
try {
|
try {
|
||||||
transferPlayer(player, portal.host, portal.port);
|
transferPlayer(player, { hostname: portal.host, port: portal.port });
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
player.sendMessage(`§cTransfer failed: ${e.message}`);
|
player.sendMessage(`§cTransfer failed: ${e.message}`);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user