[FEATURE] GetModulusCommand

This commit is contained in:
Gravit 2019-03-03 16:41:47 +07:00
parent 73fc66da0f
commit c62a3865dd
2 changed files with 28 additions and 0 deletions

View file

@ -124,6 +124,7 @@ protected CommandHandler(LaunchServer server) {
registerCommand("serverStatus", new ServerStatusCommand(server));
registerCommand("checkInstall", new CheckInstallCommand(server));
registerCommand("multi", new MultiCommand(server));
registerCommand("getModulus", new GetModulusCommand(server));
}

View file

@ -0,0 +1,27 @@
package ru.gravit.launchserver.command.service;
import io.netty.handler.codec.base64.Base64;
import ru.gravit.launchserver.LaunchServer;
import ru.gravit.launchserver.command.Command;
import ru.gravit.utils.helper.LogHelper;
public class GetModulusCommand extends Command {
public GetModulusCommand(LaunchServer server) {
super(server);
}
@Override
public String getArgsDescription() {
return null;
}
@Override
public String getUsageDescription() {
return null;
}
@Override
public void invoke(String... args) throws Exception {
LogHelper.info("You publickey modulus: ", LaunchServer.server.publicKey.getModulus().toString(16));
}
}