19cbceb120
The Command base class, Commands registry, FeedbackMessageType enum, and four CommandOrigin subclasses (Player/Entity/Block/Server) that every CLI command in this branch depends on. Without these files the new commands fail to resolve imports at module load. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
16 lines
251 B
JavaScript
16 lines
251 B
JavaScript
export class Commands {
|
|
static #commands = [];
|
|
|
|
static register(command) {
|
|
this.#commands.push(command);
|
|
}
|
|
|
|
static getAll() {
|
|
return [...this.#commands];
|
|
}
|
|
|
|
static clear() {
|
|
this.#commands = [];
|
|
}
|
|
}
|