key = context.getFlag('n');
if(VariableManager.instance.hasVariable(context.getString(0), key)) {
if(!RegexUtil.VARIABLE_KEY_PATTERN.matcher(context.getString(0)).find())
throw new FastCommandException("Invalid Variable Name!");
checkModifyPermissions(sender, key, context.getString(0));
String var = VariableManager.instance.getVariable(context.getString(0), key);
if(var.equalsIgnoreCase("0") || var.equalsIgnoreCase("1"))
var = var.equalsIgnoreCase("1") ? "0" : "1";
else if(var.equalsIgnoreCase("true") || var.equalsIgnoreCase("false"))
var = var.equalsIgnoreCase("true") ? "false" : "true";
else if(var.equalsIgnoreCase("yes") || var.equalsIgnoreCase("no"))
var = var.equalsIgnoreCase("yes") ? "no" : "yes";
else
throw new FastCommandException("Variable not of boolean type!");
VariableManager.instance.setVariable(context.getString(0), key, var);
resetICCache(context.getString(0), key);
sender.sendMessage(ChatColor.YELLOW + "Variable is now: " + var);
} else
throw new FastCommandException("Unknown Variable!");
}