import { world, Player, system } from '@minecraft/server';
import { Command } from '../../handler';
import { sendPlayerMessage, sendAllMessage, config } from '../../../config';
import { deadplayers, revivelist } from '../../../lifesteal';

export function welcomeHelp(player: Player) {
    sendPlayerMessage(player, `§e§lLifesteal Help Page -- Welcome§r§6
> Show the welcome GUI

> Usage: ${config.prefix}welcome

> Examples: [
${config.prefix}welcome
]`);
}

new Command({
    name: 'welcome',
    code({ player, args }) {
        if (!player.hasTag(`welcome-gui_done`)) return sendPlayerMessage(player, `§3Close chat to open GUI`);

        player.removeTag(`welcome-gui_done`);
        sendPlayerMessage(player, `§3Close chat to open GUI`);
    }
});