Search in sources :

Example 1 with IEssentialsCommand

use of com.earth2me.essentials.commands.IEssentialsCommand in project Essentials by drtshock.

the class MessagingTest method runCommand.

private void runCommand(String command, User user, String[] args) throws Exception {
    IEssentialsCommand cmd;
    try {
        cmd = (IEssentialsCommand) Essentials.class.getClassLoader().loadClass("com.earth2me.essentials.commands.Command" + command).newInstance();
        cmd.setEssentials(ess);
        cmd.run(server, user, command, null, args);
    } catch (NoChargeException ex) {
    }
}
Also used : NoChargeException(com.earth2me.essentials.commands.NoChargeException) IEssentialsCommand(com.earth2me.essentials.commands.IEssentialsCommand)

Example 2 with IEssentialsCommand

use of com.earth2me.essentials.commands.IEssentialsCommand in project Essentials by drtshock.

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)

Example 3 with IEssentialsCommand

use of com.earth2me.essentials.commands.IEssentialsCommand in project Essentials by drtshock.

the class ToggleTest 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)

Example 4 with IEssentialsCommand

use of com.earth2me.essentials.commands.IEssentialsCommand in project Essentials by drtshock.

the class EconomyTest method runCommand.

private void runCommand(String command, User user, String[] args) throws Exception {
    IEssentialsCommand cmd;
    try {
        cmd = (IEssentialsCommand) Essentials.class.getClassLoader().loadClass("com.earth2me.essentials.commands.Command" + command).newInstance();
        cmd.setEssentials(ess);
        cmd.run(server, user, command, null, args);
    } catch (NoChargeException ex) {
    }
}
Also used : NoChargeException(com.earth2me.essentials.commands.NoChargeException) IEssentialsCommand(com.earth2me.essentials.commands.IEssentialsCommand)

Example 5 with IEssentialsCommand

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

the class ToggleTest method runCommand.

private void runCommand(String command, User user, String[] args) throws Exception {
    IEssentialsCommand cmd;
    try {
        cmd = (IEssentialsCommand) Essentials.class.getClassLoader().loadClass("com.earth2me.essentials.commands.Command" + command).newInstance();
        cmd.setEssentials(ess);
        cmd.run(server, user, command, null, args);
    } catch (NoChargeException ex) {
    }
}
Also used : NoChargeException(com.earth2me.essentials.commands.NoChargeException) IEssentialsCommand(com.earth2me.essentials.commands.IEssentialsCommand)

Aggregations

IEssentialsCommand (com.earth2me.essentials.commands.IEssentialsCommand)12 NoChargeException (com.earth2me.essentials.commands.NoChargeException)12 CommandSender (org.bukkit.command.CommandSender)6