use of com.earth2me.essentials.commands.IEssentialsCommand in project Essentials by EssentialsX.
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) {
}
}
use of com.earth2me.essentials.commands.IEssentialsCommand 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) {
}
}
Aggregations