feat: rename /active -> /enable
This commit is contained in:
+5
-5
@@ -2,11 +2,11 @@ import { Command } from '../classes/Commands/Command';
|
|||||||
import { CustomCommandParamType, CustomCommandStatus, CommandPermissionLevel, system } from '@minecraft/server';
|
import { CustomCommandParamType, CustomCommandStatus, CommandPermissionLevel, system } from '@minecraft/server';
|
||||||
import { structureCollection } from '../classes/Structure/StructureCollection';
|
import { structureCollection } from '../classes/Structure/StructureCollection';
|
||||||
|
|
||||||
export class ActiveCommand extends Command {
|
export class EnableCommand extends Command {
|
||||||
constructor() {
|
constructor() {
|
||||||
super({
|
super({
|
||||||
name: 'active',
|
name: 'enable',
|
||||||
description: 'construct.commands.active',
|
description: 'construct.commands.enable',
|
||||||
mandatoryParameters: [
|
mandatoryParameters: [
|
||||||
{ name: 'instanceName', type: CustomCommandParamType.String },
|
{ name: 'instanceName', type: CustomCommandParamType.String },
|
||||||
{ name: 'state', type: CustomCommandParamType.Boolean }
|
{ name: 'state', type: CustomCommandParamType.Boolean }
|
||||||
@@ -33,8 +33,8 @@ export class ActiveCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sendFeedback(source, instanceName, state) {
|
sendFeedback(source, instanceName, state) {
|
||||||
source.sendMessage({ translate: state ? 'construct.commands.active.true' : 'construct.commands.active.false', with: [instanceName] });
|
source.sendMessage({ translate: state ? 'construct.commands.enable.true' : 'construct.commands.enable.false', with: [instanceName] });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export const activeCommand = new ActiveCommand();
|
export const enableCommand = new EnableCommand();
|
||||||
@@ -17,7 +17,7 @@ import './commands/RenameCommand';
|
|||||||
import './commands/InstancesCommand';
|
import './commands/InstancesCommand';
|
||||||
import './commands/PlaceCommand';
|
import './commands/PlaceCommand';
|
||||||
import './commands/MoveCommand';
|
import './commands/MoveCommand';
|
||||||
import './commands/ActiveCommand';
|
import './commands/EnableCommand';
|
||||||
import './commands/LayerCommand';
|
import './commands/LayerCommand';
|
||||||
import './commands/NextLayerCommand';
|
import './commands/NextLayerCommand';
|
||||||
import './commands/PrevLayerCommand';
|
import './commands/PrevLayerCommand';
|
||||||
|
|||||||
@@ -136,10 +136,10 @@ construct.commands.move=Reposition a Construct instance without toggling its ena
|
|||||||
construct.commands.move.success=§aMoved instance "%1" to %2 in %3.
|
construct.commands.move.success=§aMoved instance "%1" to %2 in %3.
|
||||||
construct.commands.move.locationRequired=§cMust provide a dimension and coordinates when not running as a player.
|
construct.commands.move.locationRequired=§cMust provide a dimension and coordinates when not running as a player.
|
||||||
|
|
||||||
## construct:active
|
## construct:enable
|
||||||
construct.commands.active=Enable or disable a Construct instance.
|
construct.commands.enable=Enable or disable a Construct instance.
|
||||||
construct.commands.active.true=§aEnabled instance "%1".
|
construct.commands.enable.true=§aEnabled instance "%1".
|
||||||
construct.commands.active.false=§aDisabled instance "%1".
|
construct.commands.enable.false=§aDisabled instance "%1".
|
||||||
construct.commands.error.noLocation=§cInstance "%1" has no saved location.
|
construct.commands.error.noLocation=§cInstance "%1" has no saved location.
|
||||||
|
|
||||||
## construct:layer
|
## construct:layer
|
||||||
|
|||||||
Reference in New Issue
Block a user