Start working at 1.2.0
/ build (push) Has been cancelled

This commit is contained in:
2026-08-26 09:54:39 +08:00 Unverified
parent 36f2dd0685
commit 136d5ffa3b
159 changed files with 60793 additions and 617 deletions
+3 -3
View File
@@ -1,7 +1,7 @@
import { Command } from '../classes/Commands/Command';
import { CommandPermissionLevel, CustomCommandParamType, CustomCommandStatus, system, world } from '@minecraft/server';
import { Vector } from '../lib/Vector';
import { structureCollection } from '../classes/Structure/StructureCollection';
import { instanceCollection } from '../classes/Instance/InstanceCollection';
import { PlayerCommandOrigin } from '../classes/Commands/PlayerCommandOrigin';
export class MoveCommand extends Command {
@@ -13,7 +13,7 @@ export class MoveCommand extends Command {
{ name: 'instanceName', type: CustomCommandParamType.String }
],
optionalParameters: [
{ name: 'dimensionId', type: CustomCommandParamType.Enum }, // Enum defined in PlaceCommand.js
{ name: 'dimensionId', type: CustomCommandParamType.Enum }, // Enum defined in PlaceCommand
{ name: 'location', type: CustomCommandParamType.Location }
],
permissionLevel: CommandPermissionLevel.Any,
@@ -22,7 +22,7 @@ export class MoveCommand extends Command {
}
run(origin, instanceName, dimensionId, location) {
const instance = structureCollection.get(instanceName);
const instance = instanceCollection.get(instanceName);
if (dimensionId === void 0 || location === void 0) {
if (!(origin instanceof PlayerCommandOrigin))
return { status: CustomCommandStatus.Failure, message: 'construct.commands.move.locationRequired' };