"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const ActionGroup_1 = require("./ActionGroup");
const GroupAction_1 = require("./GroupAction");
const IScriptGenerationContext_1 = require("./IScriptGenerationContext");
class PlayerJoinAction extends GroupAction_1.default {
    get typeId() {
        return "player_join";
    }
    validate() {
        return true;
    }
    getScriptRequirements(options) {
        return {
            needsTest: true,
        };
    }
    getCommandRequirements(options) {
        return {};
    }
    addCommandLines(lines, indent, optons) { }
    addScriptLines(lines, options, context, placement) {
        if (placement === IScriptGenerationContext_1.ScriptGenerationPlacement.blockStart) {
            lines.push("export function " + this.group.name + "(event: mc.PLayerJoinAfterEventSignal) {");
        }
        else if (placement === IScriptGenerationContext_1.ScriptGenerationPlacement.blockEnd) {
            lines.push("}");
        }
        if (placement === IScriptGenerationContext_1.ScriptGenerationPlacement.initInSequence) {
            ActionGroup_1.default.addLine(lines, context.indent, "mc.world.afterEvents.playerJoin.subscribe(" + this.group.name + ");");
        }
    }
}
exports.default = PlayerJoinAction;

//# sourceMappingURL=../maps/actions/PlayerJoinAction.js.map
