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[] { "" };
}
}