feat: rename /new -> /create
This commit is contained in:
+5
-5
@@ -4,11 +4,11 @@ import { structureCollection } from '../classes/Structure/StructureCollection';
|
|||||||
import { InstanceExistsError } from '../classes/Errors/InstanceExistsError';
|
import { InstanceExistsError } from '../classes/Errors/InstanceExistsError';
|
||||||
import { StructureNotFoundError } from '../classes/Errors/StructureNotFoundError';
|
import { StructureNotFoundError } from '../classes/Errors/StructureNotFoundError';
|
||||||
|
|
||||||
export class NewCommand extends Command {
|
export class CreateCommand extends Command {
|
||||||
constructor() {
|
constructor() {
|
||||||
super({
|
super({
|
||||||
name: 'new',
|
name: 'create',
|
||||||
description: 'construct.commands.new',
|
description: 'construct.commands.create',
|
||||||
mandatoryParameters: [
|
mandatoryParameters: [
|
||||||
{ name: 'instanceName', type: CustomCommandParamType.String },
|
{ name: 'instanceName', type: CustomCommandParamType.String },
|
||||||
{ name: 'structureId', type: CustomCommandParamType.String }
|
{ name: 'structureId', type: CustomCommandParamType.String }
|
||||||
@@ -35,7 +35,7 @@ export class NewCommand extends Command {
|
|||||||
|
|
||||||
addStructure(source, instanceName, structureId) {
|
addStructure(source, instanceName, structureId) {
|
||||||
structureCollection.add(instanceName, structureId);
|
structureCollection.add(instanceName, structureId);
|
||||||
source.sendMessage({ translate: 'construct.commands.new.success', with: [instanceName, structureId] });
|
source.sendMessage({ translate: 'construct.commands.create.success', with: [instanceName, structureId] });
|
||||||
}
|
}
|
||||||
|
|
||||||
handleStructureAdditionErrors(source, error) {
|
handleStructureAdditionErrors(source, error) {
|
||||||
@@ -47,4 +47,4 @@ export class NewCommand extends Command {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export const newCommand = new NewCommand();
|
export const createCommand = new CreateCommand();
|
||||||
@@ -11,7 +11,7 @@ import './classes/MenuItemHandler';
|
|||||||
|
|
||||||
// Commands
|
// Commands
|
||||||
import './commands/ConstructCommand';
|
import './commands/ConstructCommand';
|
||||||
import './commands/NewCommand';
|
import './commands/CreateCommand';
|
||||||
import './commands/DeleteCommand';
|
import './commands/DeleteCommand';
|
||||||
import './commands/RenameCommand';
|
import './commands/RenameCommand';
|
||||||
import './commands/ListCommand';
|
import './commands/ListCommand';
|
||||||
|
|||||||
@@ -104,10 +104,10 @@ construct.commands.construct=Gives you the Construct item. Use it to open the Co
|
|||||||
construct.commands.construct.fail=§cFailed to give you the Construct item.
|
construct.commands.construct.fail=§cFailed to give you the Construct item.
|
||||||
construct.commands.construct.success=§aYou recieved the Construct item! Use it to open the Construct menu.
|
construct.commands.construct.success=§aYou recieved the Construct item! Use it to open the Construct menu.
|
||||||
|
|
||||||
## construct:new
|
## construct:create
|
||||||
construct.commands.new=Create a new instance bound to a structure.
|
construct.commands.create=Create a new Construct instance bound to a structure.
|
||||||
construct.commands.new.success=§aCreated instance "%1" bound to structure "%2".
|
construct.commands.create.success=§aCreated instance "%1" bound to structure "%2".
|
||||||
construct.commands.new.unknownStructure=§cNo structure with id "%1" found in the world.
|
construct.commands.create.unknownStructure=§cNo structure with id "%1" found in the world.
|
||||||
|
|
||||||
## construct:delete
|
## construct:delete
|
||||||
construct.commands.delete=Permanently delete an instance.
|
construct.commands.delete=Permanently delete an instance.
|
||||||
|
|||||||
Reference in New Issue
Block a user