Launcher/LaunchServerConsole/src/main/java/pro/gravit/launchserver/console/ExecCommand.java

24 lines
712 B
Java

package pro.gravit.launchserver.console;
import pro.gravit.launcher.events.request.ExecCommandRequestEvent;
import pro.gravit.launcher.request.admin.ExecCommandRequest;
import pro.gravit.utils.command.Command;
import pro.gravit.utils.helper.LogHelper;
public class ExecCommand extends Command {
@Override
public String getArgsDescription() {
return null;
}
@Override
public String getUsageDescription() {
return null;
}
@Override
public void invoke(String... args) throws Exception {
ExecCommandRequestEvent request = new ExecCommandRequest(String.join(" ")).request();
if (!request.success) LogHelper.error("Error executing command");
}
}