UNPKG

sparkscript

Version:
43 lines 1.32 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PlayerCondition = exports.PlayerEvent = exports.PlayerAction = void 0; const components_1 = require("../core/components"); class PlayerAction extends components_1.ActionBlock { /** * Do a player action. * @param action Action to perform. * @param args Arguments to pass. */ constructor(action, target, ...args) { super("player_action", action, args, false, target); } } exports.PlayerAction = PlayerAction; class PlayerEvent extends components_1.ActionBlock { /** * When a player does something. * @param event Event to listen for. */ constructor(event) { super("event", event, []); } } exports.PlayerEvent = PlayerEvent; class PlayerCondition extends components_1.ConditionalBlock { /** * If a player did something. * @param condition Action of condition. * @param target Target of the condition. * @param args Arguments to pass. */ constructor(condition, target, ...args) { super("if_player", condition, args, false, target); } } exports.PlayerCondition = PlayerCondition; exports.default = { Action: PlayerAction, Event: PlayerEvent, Condition: PlayerCondition, }; //# sourceMappingURL=Player.js.map