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>
20 lines
462 B
JavaScript
20 lines
462 B
JavaScript
import { FeedbackMessageType } from "./FeedbackMessageType";
|
|
|
|
export class CommandOrigin {
|
|
constructor(source) {
|
|
this.source = source;
|
|
}
|
|
|
|
getType() {
|
|
return this.source.sourceType;
|
|
}
|
|
|
|
getSource() {
|
|
throw new Error("getSource() not implemented");
|
|
}
|
|
|
|
sendMessage(message) {
|
|
console.error(`Unknown source type: ${this.source.sourceType}`, message);
|
|
return FeedbackMessageType.ConsoleError;
|
|
}
|
|
} |