#transferPlayer Broken??
1 messages · Page 1 of 1 (latest)
transferPlayer(player, {
hostname: "",
port: 1234
});
Any how would I insert this into my code
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
alr
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 ❤️
quest that you have put?
No problem
?
what did you put in place of what I gave you?
Sorry I use automatic translate because my english is not very good but not for all my message
Can you show what you changed differently?
it doesnt work anymore on realms
I can confirm transferserver does infact work on realms as I did so on my realm not even an hr ago
yeah i figured out how to fix it
What fixed it
For your situation
As its intermittent rn 50/50 it seems to be on my dynamic setup
im not at my pc rn so ill let u know later