/*
Copyright (C) 2005 David Green <green@couchpotato.net>
All Rights Reserved.

This file is part of Aelfengard.

Aelfengard is proprietary software. You may not redistribute it without
prior written permission from the copyright holder.
*/

package server.command;

import server.Player;
import server.SyntaxException;

public class InvisCommand extends Command {

    public InvisCommand() {
        super(CommandCategory.ADMIN, "Makes you invisible to non-administrators.");
    }
    
    @Override
    public void run(Player player) throws SyntaxException {
        if (CommandProcessor.nextToken() != null) {
            throw new SyntaxException();
        }
        if (player.isAdminInvisible()) {
            player.setAdminInvisible(false);
            player.sendText(true, "You're no longer admin_invisible.");
        }
        else {
            player.setAdminInvisible(true);
            player.sendText(true, "You're now admin_invisible.");
        }
    }

    @Override
    public String[] getSyntax(Player player) {
        return new String[] { "" };
    }

}