Java Code Examples for cn.nukkit.utils.TextFormat

The following examples show how to use cn.nukkit.utils.TextFormat. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: EssentialsNK   Source File: SetWarpCommand.java    License: GNU General Public License v3.0 6 votes vote down vote up
public boolean execute(CommandSender sender, String label, String[] args) {
    if (!this.testPermission(sender)) {
        return false;
    }
    if (!this.testIngame(sender)) {
        return false;
    }
    if (args.length != 1) {
        this.sendUsage(sender);
        return false;
    }
    if (args[0].trim().equals("")) {
        sender.sendMessage(TextFormat.RED + Language.translate("commands.setwarp.empty"));
        return false;
    }
    sender.sendMessage(api.setWarp(args[0].toLowerCase(), (Player) sender) ? Language.translate("commands.setwarp.replaced", args[0]) : Language.translate("commands.setwarp.success", args[0]));
    return true;
}
 
Example 2
Source Project: Jupiter   Source File: Server.java    License: GNU General Public License v3.0 6 votes vote down vote up
/**
 * コマンドを実行します。
 * @param sender 対象のCommandSender
 * @param commandLine 送るパケット
 * @return boolean trueが完了/falseが失敗
 */
public boolean dispatchCommand(CommandSender sender, String commandLine) throws ServerException {
    // First we need to check if this command is on the main thread or not, if not, warn the user
    if (!this.isPrimaryThread()) {
        getLogger().warning("Command Dispatched Async: " + commandLine);
        getLogger().warning("Please notify author of plugin causing this execution to fix this bug!", new Throwable());
        // TODO: We should sync the command to the main thread too!
    }
    if (sender == null) {
        throw new ServerException("CommandSender is not valid");
    }

    if (this.commandMap.dispatch(sender, commandLine)) {
        return true;
    }

    sender.sendMessage(TextFormat.RED + this.getLanguage().translateString("commands.generic.notFound"));

    return false;
}
 
Example 3
Source Project: Jupiter   Source File: OpCommand.java    License: GNU General Public License v3.0 6 votes vote down vote up
@Override
public boolean execute(CommandSender sender, String commandLabel, String[] args) {
    if (!this.testPermission(sender)) {
        return true;
    }
    if (args.length == 0) {
        sender.sendMessage(new TranslationContainer("commands.generic.usage", this.usageMessage));
        return false;
    }

    String name = args[0];
    IPlayer player = sender.getServer().getOfflinePlayer(name);

    Command.broadcastCommandMessage(sender, new TranslationContainer("commands.op.success", player.getName()));
    if (player instanceof Player) {
        ((Player) player).sendMessage(TextFormat.GRAY + "You are now op!");
    }

    player.setOp(true);

    return true;
}
 
Example 4
Source Project: Jupiter   Source File: MuteCommand.java    License: GNU General Public License v3.0 6 votes vote down vote up
@Override
public boolean execute(CommandSender sender, String commandLabel, String[] args) {

    if (!this.testPermission(sender)) {
        return true;
    }

    if(sender instanceof ConsoleCommandSender){
    	sender.sendMessage(TextFormat.RED + "コンソールはミュートできません。");
    	return true;
    }

    Player p = (Player)sender;

    if(p.mute){
    	p.setMute(false);
    	p.sendImportantMessage(TextFormat.GREEN + "ミュートを解除しました。");
    	return true;
    }else{
    	p.setMute(true);
    	p.sendImportantMessage(TextFormat.RED + "ミュートを有効にしました。");
    	return true;
    }
}
 
Example 5
Source Project: Jupiter   Source File: Command.java    License: GNU General Public License v3.0 6 votes vote down vote up
public static void broadcastCommandMessage(CommandSender source, String message, boolean sendToSource) {
    Set<Permissible> users = source.getServer().getPluginManager().getPermissionSubscriptions(Server.BROADCAST_CHANNEL_ADMINISTRATIVE);

    TranslationContainer result = new TranslationContainer("chat.type.admin", new String[]{source.getName(), message});

    TranslationContainer colored = new TranslationContainer(TextFormat.GRAY + "" + TextFormat.ITALIC + "%chat.type.admin", new String[]{source.getName(), message});

    if (sendToSource && !(source instanceof ConsoleCommandSender)) {
        source.sendMessage(message);
    }

    for (Permissible user : users) {
        if (user instanceof CommandSender) {
            if (user instanceof ConsoleCommandSender) {
                ((ConsoleCommandSender) user).sendMessage(result);
            } else if (!user.equals(source)) {
                ((CommandSender) user).sendMessage(colored);
            }
        }
    }
}
 
Example 6
Source Project: Nukkit   Source File: TimingsExport.java    License: GNU General Public License v3.0 6 votes vote down vote up
private String getResponse(HttpURLConnection con) throws IOException {
    try (InputStream is = con.getInputStream()) {
        ByteArrayOutputStream bos = new ByteArrayOutputStream();

        byte[] b = new byte[1024];
        int bytesRead;
        while ((bytesRead = is.read(b)) != -1) {
            bos.write(b, 0, bytesRead);
        }
        return bos.toString();

    } catch (IOException exception) {
        this.sender.sendMessage(TextFormat.RED + "" + new TranslationContainer("nukkit.command.timings.reportError"));
        Server.getInstance().getLogger().warning(con.getResponseMessage(), exception);
        return null;
    }
}
 
Example 7
Source Project: Nukkit   Source File: RCON.java    License: GNU General Public License v3.0 6 votes vote down vote up
public void check() {
    if (this.serverThread == null) {
        return;
    } else if (!this.serverThread.isAlive()) {
        return;
    }

    RCONCommand command;
    while ((command = serverThread.receive()) != null) {
        RemoteConsoleCommandSender sender = new RemoteConsoleCommandSender();
        RemoteServerCommandEvent event = new RemoteServerCommandEvent(sender, command.getCommand());
        this.server.getPluginManager().callEvent(event);

        if (!event.isCancelled()) {
            this.server.dispatchCommand(sender, command.getCommand());
        }

        this.serverThread.respond(command.getSender(), command.getId(), TextFormat.clean(sender.getMessages()));
    }
}
 
Example 8
Source Project: Nukkit   Source File: DeopCommand.java    License: GNU General Public License v3.0 6 votes vote down vote up
@Override
public boolean execute(CommandSender sender, String commandLabel, String[] args) {
    if (!this.testPermission(sender)) {
        return true;
    }

    if (args.length == 0) {
        sender.sendMessage(new TranslationContainer("commands.generic.usage", this.usageMessage));

        return false;
    }

    String playerName = args[0];
    IPlayer player = sender.getServer().getOfflinePlayer(playerName);
    player.setOp(false);

    if (player instanceof Player) {
        ((Player) player).sendMessage(new TranslationContainer(TextFormat.GRAY + "%commands.deop.message"));
    }

    Command.broadcastCommandMessage(sender, new TranslationContainer("commands.deop.success", new String[]{player.getName()}));

    return true;
}
 
Example 9
Source Project: EssentialsNK   Source File: BreakCommand.java    License: GNU General Public License v3.0 6 votes vote down vote up
public boolean execute(CommandSender sender, String label, String[] args) {
    if (!this.testPermission(sender)) {
        return false;
    }
    if (!this.testIngame(sender)) {
        return false;
    }
    if (args.length != 0) {
        this.sendUsage(sender);
        return false;
    }
    Player player = (Player) sender;
    Block block = player.getTargetBlock(120, new Integer[]{Block.AIR});
    if (block == null) {
        sender.sendMessage(TextFormat.RED + Language.translate("commands.break.unreachable"));
        return false;
    }
    if (block.getId() == Block.BEDROCK && !sender.hasPermission("essentialsnk.break.bedrock")) {
        sender.sendMessage(TextFormat.RED + Language.translate("commands.break.bedrock"));
        return false;
    }
    player.getLevel().setBlock(block, new BlockAir(), true, true);
    return true;
}
 
Example 10
Source Project: Nukkit   Source File: OpCommand.java    License: GNU General Public License v3.0 6 votes vote down vote up
@Override
public boolean execute(CommandSender sender, String commandLabel, String[] args) {
    if (!this.testPermission(sender)) {
        return true;
    }
    if (args.length == 0) {
        sender.sendMessage(new TranslationContainer("commands.op.usage", this.usageMessage));
        return false;
    }

    String name = args[0];
    IPlayer player = sender.getServer().getOfflinePlayer(name);

    Command.broadcastCommandMessage(sender, new TranslationContainer("commands.op.success", player.getName()));
    if (player instanceof Player) {
        ((Player) player).sendMessage(new TranslationContainer(TextFormat.GRAY + "%commands.op.message"));
    }

    player.setOp(true);

    return true;
}
 
Example 11
Source Project: EssentialsNK   Source File: WorldCommand.java    License: GNU General Public License v3.0 6 votes vote down vote up
public boolean execute(CommandSender sender, String label, String[] args) {
    if (!this.testPermission(sender)) {
        return false;
    }
    if (!this.testIngame(sender)) {
        return false;
    }
    if (args.length != 1) {
        this.sendUsage(sender);
        return false;
    }
    if (!api.getServer().isLevelGenerated(args[0])) {
        sender.sendMessage(TextFormat.RED + Language.translate("commands.world.notfound", args[0]));
        return false;
    } else if (!api.getServer().isLevelLoaded(args[0])) {
        sender.sendMessage(Language.translate("commands.world.loading"));
        if (!api.getServer().loadLevel(args[0])) {
            sender.sendMessage(TextFormat.RED + Language.translate("commands.world.unloadable"));
            return false;
        }
    }
    ((Player) sender).teleport(api.getServer().getLevelByName(args[0]).getSpawnLocation());
    sender.sendMessage(Language.translate("commands.generic.teleporting"));
    return true;
}
 
Example 12
Source Project: EssentialsNK   Source File: MoreCommand.java    License: GNU General Public License v3.0 6 votes vote down vote up
public boolean execute(CommandSender sender, String label, String[] args) {
    if (!this.testPermission(sender)) {
        return false;
    }
    if (!this.testIngame(sender)) {
        return false;
    }
    if (args.length != 0) {
        this.sendUsage(sender);
        return false;
    }
    Player player = (Player) sender;
    if (player.isCreative() || player.isSpectator()) {
        sender.sendMessage(TextFormat.RED + Language.translate("commands.more.notavalible"));
        return false;
    }
    Item item = player.getInventory().getItemInHand();
    if (item.getId() == Item.AIR) {
        sender.sendMessage(TextFormat.RED + Language.translate("commands.more.air"));
        return false;
    }
    item.setCount(item.getMaxStackSize());
    player.getInventory().setItemInHand(item);
    sender.sendMessage(Language.translate("commands.more.success"));
    return true;
}
 
Example 13
Source Project: Plan   Source File: NukkitCMDSender.java    License: GNU Lesser General Public License v3.0 6 votes vote down vote up
@Override
public void sendMessage(String message) {
    if (!(cs instanceof Player)) {
        cs.sendMessage(message);
        return;
    }
    final int length = message.length();
    if (length > 60) {
        int i = 59;
        while (i < length && message.charAt(i) != ' ') {
            i++;
        }
        String shortened = message.substring(0, i);
        String lastCols = TextFormat.getLastColors(message);
        cs.sendMessage(shortened);
        String leftover = lastCols + message.substring(i);
        sendMessage(leftover);
    } else {
        if (TextFormat.clean(message).isEmpty()) {
            return;
        }
        cs.sendMessage(message);
    }
}
 
Example 14
Source Project: Nukkit   Source File: TimingsExport.java    License: GNU General Public License v3.0 6 votes vote down vote up
private String getResponse(HttpURLConnection con) throws IOException {
    InputStream is = null;
    try {
        is = con.getInputStream();
        ByteArrayOutputStream bos = new ByteArrayOutputStream();

        byte[] b = new byte[1024];
        int bytesRead;
        while ((bytesRead = is.read(b)) != -1) {
            bos.write(b, 0, bytesRead);
        }
        return bos.toString();

    } catch (IOException exception) {
        this.sender.sendMessage(TextFormat.RED + "" + new TranslationContainer("nukkit.command.timings.reportError"));
        Server.getInstance().getLogger().warning(con.getResponseMessage(), exception);
        return null;
    } finally {
        if (is != null) {
            is.close();
        }
    }
}
 
Example 15
Source Project: Nukkit   Source File: RCON.java    License: GNU General Public License v3.0 6 votes vote down vote up
public void check() {
    if (this.serverThread == null) {
        return;
    } else if (!this.serverThread.isAlive()) {
        return;
    }

    RCONCommand command;
    while ((command = serverThread.receive()) != null) {
        RemoteConsoleCommandSender sender = new RemoteConsoleCommandSender();
        RemoteServerCommandEvent event = new RemoteServerCommandEvent(sender, command.getCommand());
        this.server.getPluginManager().callEvent(event);

        if (!event.isCancelled()) {
            this.server.dispatchCommand(sender, command.getCommand());
        }

        this.serverThread.respond(command.getSender(), command.getId(), TextFormat.clean(sender.getMessages()));
    }
}
 
Example 16
Source Project: EconomyAPI   Source File: SetLangCommand.java    License: GNU General Public License v3.0 6 votes vote down vote up
@Override
public boolean execute(CommandSender sender, String label, String[] args) {
	if(!this.plugin.isEnabled()) return false;
	if(!sender.hasPermission("economyapi.command.setlang")){
		sender.sendMessage(TextFormat.RED + "You don't have permission to use this command.");
		return false;
	}
	
	if(args.length < 1){
		sender.sendMessage(TextFormat.RED + "Usage: " + this.getUsage());
		return true;
	}
	String lang = args[0];
	
	// TODO
	return true;
}
 
Example 17
Source Project: EconomyAPI   Source File: MyMoneyCommand.java    License: GNU General Public License v3.0 6 votes vote down vote up
@Override
public boolean execute(CommandSender sender, String label, String[] args) {
	if(!this.plugin.isEnabled()) return false;
	if(!sender.hasPermission("economyapi.command.mymoney")){
		sender.sendMessage(TextFormat.RED + "You don't have permission to use this command.");
		return false;
	}
	
	if(!(sender instanceof Player)){
		sender.sendMessage(TextFormat.RED+"Please use this command in-game.");
		return true;
	}
	Player player = (Player) sender;
	sender.sendMessage(this.plugin.getMessage("mymoney-mymoney", new String[]{Double.toString(this.plugin.myMoney(player))}, player));
	return true;
}
 
Example 18
Source Project: EssentialsNK   Source File: BackCommand.java    License: GNU General Public License v3.0 6 votes vote down vote up
public boolean execute(CommandSender sender, String label, String[] args) {
    if (!this.testPermission(sender)) {
        return false;
    }
    if (!this.testIngame(sender)) {
        return false;
    }
    if (args.length != 0) {
        this.sendUsage(sender);
        return false;
    }
    Player player = (Player) sender;
    Location pos = api.getLastLocation(player);
    if (pos == null) {
        sender.sendMessage(TextFormat.RED + Language.translate("commands.back.notavalible"));
        return false;
    }
    player.teleport(pos);
    sender.sendMessage(Language.translate("commands.generic.teleporting"));
    return true;
}
 
Example 19
Source Project: EssentialsNK   Source File: DelHomeCommand.java    License: GNU General Public License v3.0 6 votes vote down vote up
public boolean execute(CommandSender sender, String label, String[] args) {
    if (!this.testPermission(sender)) {
        return false;
    }
    if (!this.testIngame(sender)) {
        return false;
    }
    if (args.length != 1) {
        this.sendUsage(sender);
        return false;
    }
    if (!api.isHomeExists((Player) sender, args[0].toLowerCase())) {
        sender.sendMessage(TextFormat.RED + Language.translate("commands.home.notexists", args[0]));
        return false;
    }
    api.removeHome((Player) sender, args[0].toLowerCase());
    sender.sendMessage(Language.translate("commands.delhome.success", args[0]));
    return true;
}
 
Example 20
Source Project: EssentialsNK   Source File: SetHomeCommand.java    License: GNU General Public License v3.0 6 votes vote down vote up
public boolean execute(CommandSender sender, String label, String[] args) {
    if (!this.testPermission(sender)) {
        return false;
    }
    if (!this.testIngame(sender)) {
        return false;
    }
    if (args.length != 1) {
        this.sendUsage(sender);
        return false;
    }
    if (args[0].toLowerCase().equals("bed")) {
        sender.sendMessage(TextFormat.RED + Language.translate("commands.sethome.bed"));
        return false;
    } else if (args[0].trim().equals("")) {
        sender.sendMessage(TextFormat.RED + Language.translate("commands.sethome.empty"));
        return false;
    }
    sender.sendMessage(api.setHome((Player) sender, args[0].toLowerCase(), (Player) sender) ? Language.translate("commands.sethome.updated", args[0]) : Language.translate("commands.sethome.success", args[0]));
    return true;
}
 
Example 21
Source Project: Nukkit   Source File: DeopCommand.java    License: GNU General Public License v3.0 6 votes vote down vote up
@Override
public boolean execute(CommandSender sender, String commandLabel, String[] args) {
    if (!this.testPermission(sender)) {
        return true;
    }

    if (args.length == 0) {
        sender.sendMessage(new TranslationContainer("commands.generic.usage", this.usageMessage));

        return false;
    }

    String playerName = args[0];
    IPlayer player = sender.getServer().getOfflinePlayer(playerName);
    player.setOp(false);

    if (player instanceof Player) {
        ((Player) player).sendMessage(new TranslationContainer(TextFormat.GRAY + "%commands.deop.message"));
    }

    Command.broadcastCommandMessage(sender, new TranslationContainer("commands.deop.success", new String[]{player.getName()}));

    return true;
}
 
Example 22
Source Project: EssentialsNK   Source File: TPHereCommand.java    License: GNU General Public License v3.0 6 votes vote down vote up
public boolean execute(CommandSender sender, String label, String[] args) {
    if (!this.testPermission(sender)) {
        return false;
    }
    if (!this.testIngame(sender)) {
        return false;
    }
    if (args.length != 1) {
        this.sendUsage(sender);
        return false;
    }
    Player player = api.getServer().getPlayer(args[0]);
    if (player == null) {
        sender.sendMessage(TextFormat.RED + Language.translate("commands.generic.player.notfound", args[0]));
        return false;
    }
    player.teleport((Player) sender);
    player.sendMessage(Language.translate("commands.tphere.other", ((Player) sender).getDisplayName()));
    sender.sendMessage(Language.translate("commands.tphere.success", player.getDisplayName()));
    return true;
}
 
Example 23
Source Project: EssentialsNK   Source File: TPACommand.java    License: GNU General Public License v3.0 6 votes vote down vote up
public boolean execute(CommandSender sender, String label, String[] args) {
    if (!this.testPermission(sender)) {
        return false;
    }
    if (!this.testIngame(sender)) {
        return false;
    }
    if (args.length != 1) {
        this.sendUsage(sender);
        return false;
    }
    Player player = api.getServer().getPlayer(args[0]);
    if (player == null) {
        sender.sendMessage(TextFormat.RED + Language.translate("commands.generic.player.notfound", args[0]));
        return false;
    }
    if (sender == player) {
        sender.sendMessage(TextFormat.RED + Language.translate("commands.tpa.self"));
        return false;
    }
    api.requestTP((Player) sender, player, true);
    player.sendMessage(Language.translate("commands.tpa.invite", ((Player) sender).getName()));
    sender.sendMessage(Language.translate("commands.tpa.success", player.getDisplayName()));
    return true;
}
 
Example 24
Source Project: EssentialsNK   Source File: DelWarpCommand.java    License: GNU General Public License v3.0 6 votes vote down vote up
public boolean execute(CommandSender sender, String label, String[] args) {
    if (!this.testPermission(sender)) {
        return false;
    }
    if (args.length != 1) {
        this.sendUsage(sender);
        return false;
    }
    if (!api.isWarpExists(args[0].toLowerCase())) {
        sender.sendMessage(TextFormat.RED + Language.translate("commands.warp.notexists"));
        return false;
    }
    api.removeWarp(args[0].toLowerCase());
    sender.sendMessage(Language.translate("commands.delwarp.success"));
    return true;
}
 
Example 25
Source Project: EssentialsNK   Source File: RealNameCommand.java    License: GNU General Public License v3.0 6 votes vote down vote up
public boolean execute(CommandSender sender, String label, String[] args) {
    if (!this.testPermission(sender)) {
        return false;
    }
    if (args.length != 1) {
        this.sendUsage(sender);
        return false;
    }
    Player player = api.getServer().getPlayer(args[0]);
    if (player == null) {
        sender.sendMessage(TextFormat.RED + Language.translate("commands.generic.player.notfound", args[0]));
        return false;
    }
    sender.sendMessage(Language.translate("commands.realname.success", player.getDisplayName(), player.getName()));
    return true;
}
 
Example 26
Source Project: Nukkit   Source File: TellCommand.java    License: GNU General Public License v3.0 5 votes vote down vote up
@Override
public boolean execute(CommandSender sender, String commandLabel, String[] args) {
    if (!this.testPermission(sender)) {
        return true;
    }

    if (args.length < 2) {
        sender.sendMessage(new TranslationContainer("commands.generic.usage", this.usageMessage));

        return false;
    }

    String name = args[0].toLowerCase();

    Player player = sender.getServer().getPlayer(name);
    if (player == null) {
        sender.sendMessage(new TranslationContainer("commands.generic.player.notFound"));
        return true;
    }

    if (Objects.equals(player, sender)) {
        sender.sendMessage(new TranslationContainer(TextFormat.RED + "%commands.message.sameTarget"));
        return true;
    }

    String msg = "";
    for (int i = 1; i < args.length; i++) {
        msg += args[i] + " ";
    }
    if (msg.length() > 0) {
        msg = msg.substring(0, msg.length() - 1);
    }

    String displayName = (sender instanceof Player ? ((Player) sender).getDisplayName() : sender.getName());

    sender.sendMessage("[" + sender.getName() + " -> " + player.getDisplayName() + "] " + msg);
    player.sendMessage("[" + displayName + " -> " + player.getName() + "] " + msg);

    return true;
}
 
Example 27
Source Project: Nukkit   Source File: PluginsCommand.java    License: GNU General Public License v3.0 5 votes vote down vote up
private void sendPluginList(CommandSender sender) {
    String list = "";
    Map<String, Plugin> plugins = sender.getServer().getPluginManager().getPlugins();
    for (Plugin plugin : plugins.values()) {
        if (list.length() > 0) {
            list += TextFormat.WHITE + ", ";
        }
        list += plugin.isEnabled() ? TextFormat.GREEN : TextFormat.RED;
        list += plugin.getDescription().getFullName();
    }

    sender.sendMessage(new TranslationContainer("nukkit.command.plugins.success", new String[]{String.valueOf(plugins.size()), list}));
}
 
Example 28
Source Project: EssentialsNK   Source File: CommandBase.java    License: GNU General Public License v3.0 5 votes vote down vote up
protected boolean testIngame(CommandSender sender) {
    if (!(sender instanceof Player)) {
        sender.sendMessage(TextFormat.RED + Language.translate("commands.generic.ingame"));
        return false;
    }
    return true;
}
 
Example 29
@Override
public boolean execute(CommandSender sender, String commandLabel, String[] args) {
    boolean result = false;
    ArrayList<String> commands = new ArrayList<>();
    for (String formatString : formatStrings) {
        try {
            commands.add(buildCommand(formatString, args));
        } catch (Exception e) {
            if (e instanceof IllegalArgumentException) {
                sender.sendMessage(TextFormat.RED + e.getMessage());
            } else {
                sender.sendMessage(new TranslationContainer(TextFormat.RED + "%commands.generic.exception"));
                MainLogger logger = sender.getServer().getLogger();
                if (logger != null) {
                    logger.logException(e);
                }
            }
            return false;
        }
    }

    for (String command : commands) {
        result |= Server.getInstance().dispatchCommand(sender, command);
    }

    return result;
}
 
Example 30
Source Project: Nukkit   Source File: SimpleCommandMap.java    License: GNU General Public License v3.0 5 votes vote down vote up
@Override
public boolean dispatch(CommandSender sender, String cmdLine) {
    ArrayList<String> parsed = parseArguments(cmdLine);
    if (parsed.size() == 0) {
        return false;
    }

    String sentCommandLabel = parsed.remove(0).toLowerCase();
    String[] args = parsed.toArray(new String[parsed.size()]);
    Command target = this.getCommand(sentCommandLabel);

    if (target == null) {
        return false;
    }

    target.timing.startTiming();
    try {
        target.execute(sender, sentCommandLabel, args);
    } catch (Exception e) {
        sender.sendMessage(new TranslationContainer(TextFormat.RED + "%commands.generic.exception"));
        this.server.getLogger().critical(this.server.getLanguage().translateString("nukkit.command.exception", cmdLine, target.toString(), Utils.getExceptionMessage(e)));
        MainLogger logger = sender.getServer().getLogger();
        if (logger != null) {
            logger.logException(e);
        }
    }
    target.timing.stopTiming();

    return true;
}