start reformating strings into RawMessages

This commit is contained in:
ForestOfLight
2025-10-01 00:08:48 -07:00
Unverified
parent 99972285a2
commit 7fcda7bb04
13 changed files with 79 additions and 32 deletions
@@ -23,7 +23,7 @@ export class FlexibleInstanceMove {
tryStart() {
if (this.instance.isFlexibleMoving()) {
this.sendFeedback('§cThis instance is already being moved.');
this.sendFeedback({ translate: 'construct.instance.flexibleMove.alreadyMoving' });
return;
}
this.start();
@@ -48,7 +48,7 @@ export class FlexibleInstanceMove {
this.allowPlayerMovement(false);
world.beforeEvents.itemUse.subscribe(this.onPlayerUseItemBound);
world.beforeEvents.playerLeave.unsubscribe(this.onPlayerLeaveBound);
this.sendFeedback(`§aNow moving "${this.instance.getName()}". Use the Construct item when finished.`);
this.sendFeedback({ translate: 'construct.instance.flexibleMove.start', with: [this.instance.getName()] });
}
onFlexibleMovementTick() {
@@ -109,7 +109,10 @@ export class FlexibleInstanceMove {
builder.flexibleInstanceMovement = void 0;
world.beforeEvents.itemUse.unsubscribe(this.onPlayerUseItemBound);
world.beforeEvents.playerLeave.unsubscribe(this.onPlayerLeaveBound);
this.sendFeedback(`§aMoved "${this.instance.getName()}" to ${this.currentInstanceLocation.floor()}.`);
this.sendFeedback({ translate: 'construct.instance.flexibleMove.finish', with: [
this.instance.getName(),
String(this.currentInstanceLocation.floor())
] });
}
allowPlayerMovement(enable) {
@@ -113,7 +113,7 @@ export class InstanceForm {
new MenuForm(this.player, { jumpToInstance: false });
break;
default:
this.player.sendMessage(`§cUnknown option: ${option}`);
this.player.sendMessage({ translate: 'construct.menu.instance.unknownOption', with: [option] });
break;
}
}
@@ -124,15 +124,14 @@ export class InstanceForm {
return;
const newName = response.formValues[0];
if (newName === '') {
this.player.sendMessage('§cInstance name cannot be empty.');
this.player.sendMessage({ translate: 'construct.menu.instance.nameEmpty' });
return;
}
try {
structureCollection.rename(this.instanceName, newName);
this.instanceName = newName;
} catch (e) {
this.player.sendMessage(`§cError renaming instance: ${e.message}`);
return;
this.player.sendMessage({ translate: 'construct.instance.rename.error', with: [e.message] });
}
});
}