fix(transfer): remove quotes around player name in transfer command
The /transfer command doesn't accept quoted player names. Removing the embedded double quotes fixes portal transfers in both lobby and hub-return addons. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -21,9 +21,9 @@ function doTransfer(player) {
|
|||||||
world.sendMessage(`§a${player.name} is returning to the Hub...`);
|
world.sendMessage(`§a${player.name} is returning to the Hub...`);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
player.runCommand(`transfer "${player.name}" ${LOBBY_HOST} ${LOBBY_PORT}`);
|
player.runCommand(`transfer ${player.name} ${LOBBY_HOST} ${LOBBY_PORT}`);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
world.sendMessage(`§cTransfer failed: ${e.message}`);
|
player.sendMessage(`§cTransfer failed: ${e.message}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ system.runInterval(() => {
|
|||||||
cooldowns.set(playerId, system.currentTick);
|
cooldowns.set(playerId, system.currentTick);
|
||||||
player.sendMessage(`§6Transferring to ${portal.name}...`);
|
player.sendMessage(`§6Transferring to ${portal.name}...`);
|
||||||
try {
|
try {
|
||||||
player.runCommand(`transfer "${player.name}" ${portal.host} ${portal.port}`);
|
player.runCommand(`transfer ${player.name} ${portal.host} ${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