@Override
    public boolean execute(SimpleTowns plugin, CommandSender sender, String commandLabel, String[] args) {
        final Localisation localisation = plugin.getLocalisation();

        if (args.length == 0) {
            sender.sendMessage(localisation.get(LocalisationEntry.ERR_SPECIFY_STATUS));
            return false;
        }

        final boolean current = LogUtils.isEnabled(plugin);
        final Boolean status = new BooleanParser(args[0]).parse(current);
        if (status == null) {
            sender.sendMessage(localisation.get(LocalisationEntry.ERR_SPECIFY_STATUS));
            return false;
        }

        final Logger logger = new Logger(plugin);
        if (current && !status) { // If logging was enabled, and it's being disabled
            logger.log(localisation.get(LocalisationEntry.LOG_LOGGING_DISABLED, sender.getName()));
        }

        LogUtils.setEnabled(sender, status, plugin);

        if (!current && status) { // If logging was disabled, and it's been enabled
            logger.log(localisation.get(LocalisationEntry.LOG_LOGGING_ENABLED, sender.getName()));
        }

        sender.sendMessage(localisation.get(LocalisationEntry.MSG_LOG_STATUS_SET, LogUtils.isEnabled(plugin)));
        return true;
    }