Search in sources :

Example 16 with NoChargeException

use of com.earth2me.essentials.commands.NoChargeException in project Essentials by EssentialsX.

the class MessagingTest method runConsoleCommand.

private void runConsoleCommand(String command, String[] args) throws Exception {
    IEssentialsCommand cmd;
    CommandSender sender = server.getConsoleSender();
    try {
        cmd = (IEssentialsCommand) Essentials.class.getClassLoader().loadClass("com.earth2me.essentials.commands.Command" + command).newInstance();
        cmd.setEssentials(ess);
        cmd.run(server, new CommandSource(sender), command, null, args);
    } catch (NoChargeException ex) {
    }
}
Also used : NoChargeException(com.earth2me.essentials.commands.NoChargeException) IEssentialsCommand(com.earth2me.essentials.commands.IEssentialsCommand) CommandSender(org.bukkit.command.CommandSender)

Aggregations

NoChargeException (com.earth2me.essentials.commands.NoChargeException)16 IEssentialsCommand (com.earth2me.essentials.commands.IEssentialsCommand)12 CommandSender (org.bukkit.command.CommandSender)6 Trade (com.earth2me.essentials.Trade)4 ChargeException (com.earth2me.essentials.ChargeException)2 Kit (com.earth2me.essentials.Kit)2 User (com.earth2me.essentials.User)2