Files
Construct/packs/BP/scripts/classes/Commands/PlayerCommandOrigin.js
T
ForestOfLight 19cbceb120 feat(cli): add Command pipeline base classes
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>
2026-05-20 03:26:25 -07:00

17 lines
411 B
JavaScript

import { CommandOrigin } from "./CommandOrigin";
import { FeedbackMessageType } from "./FeedbackMessageType";
export class PlayerCommandOrigin extends CommandOrigin {
getType() {
return "Player";
}
getSource() {
return this.source.sourceEntity;
}
sendMessage(message) {
this.getSource().sendMessage(message);
return FeedbackMessageType.ChatMessage;
}
}