#transferPlayer Broken??

1 messages · Page 1 of 1 (latest)

atomic ledge
#

my manifest

#

anyone help?

white gull
#
transferPlayer(player, {
  hostname: "",
  port: 1234
});
atomic ledge
white gull
#
import {
    system,
    StartupEvent,
    CommandPermissionLevel,
    CustomCommandParamType,
    CustomCommandStatus,
    world,
    CustomCommandOrigin,
} from "@minecraft/server";

import { transferPlayer } from "@minecraft/server-admin"

system.beforeEvents.startup.subscribe((init) => {
    const transfer = {
        name: "cyan:join",
        description: "Cyan custom join command",
        permissionLevel: CommandPermissionLevel.Any,
        mandatoryParameters: [
            {
                type: CustomCommandParamType.String,
                name: "ip",
            },
        ],
        optionalParameters: [
            {
                type: CustomCommandParamType.Integer,
                name: "port"
            }
        ]
    };
    init.customCommandRegistry.registerCommand(transfer, party);
});

/** @param {CustomCommandOrigin} origin  */
function party(origin, ip, port) {
    if (port == undefined) port = 19132
    world.sendMessage('§l§f» §7+1 Transfer')
    system.run(() => {
        transferPlayer(origin.sourceEntity, {hostname: ip, port: port});
    });
    return {
        status: CustomCommandStatus.Success,
    };
}```
#

Try this

#

@atomic ledge

atomic ledge
#

alr

white gull
#

It's worked?

#

@atomic ledge

atomic ledge
#

uhh

#

it just keeps on saying I need to authenticate xbox live

#

okay

#

i was able to get it to work

#

but not exactly using your piece of code

#

thanks for helping me tho ❤️

white gull
white gull
atomic ledge
white gull
#

what did you put in place of what I gave you?

white gull
# atomic ledge ?

Sorry I use automatic translate because my english is not very good but not for all my message

calm gorge
atomic ledge
random robin
atomic ledge
verbal bone
#

For your situation

#

As its intermittent rn 50/50 it seems to be on my dynamic setup

atomic ledge
#

im not at my pc rn so ill let u know later

calm gorge
#

@atomic ledge You told me it dosnt work?