Little changes

This commit is contained in:
Tim203 2019-11-30 19:10:29 +01:00
parent 1c48279a9f
commit f1b19fc04e
2 changed files with 8 additions and 3 deletions

View file

@ -158,7 +158,7 @@ public class GeyserConnector implements Connector {
metrics = new Metrics("GeyserMC", config.getMetrics().getUUID(), false, java.util.logging.Logger.getLogger(""));
metrics.addCustomChart(new Metrics.SingleLineChart("servers", () -> 1));
metrics.addCustomChart(new Metrics.SingleLineChart("players", Geyser::getPlayerCount));
metrics.addCustomChart(new Metrics.SimplePie("authMode", getAuthType()::name));
metrics.addCustomChart(new Metrics.SimplePie("authMode", () -> getAuthType().name().toLowerCase()));
}
double completeTime = (System.currentTimeMillis() - startupTime) / 1000D;

View file

@ -128,8 +128,13 @@ public class GeyserSession implements Player {
public void connect(RemoteServer remoteServer) {
startGame();
this.remoteServer = remoteServer;
if (connector.getAuthType() == AuthType.OFFLINE) {
connector.getLogger().info("Attempting to login using offline mode... authentication is disabled.");
if (connector.getAuthType() != AuthType.ONLINE) {
connector.getLogger().info(
"Attempting to login using " + connector.getAuthType().name().toLowerCase() + " mode... " +
(connector.getAuthType() == AuthType.OFFLINE ?
"authentication is disabled." : "authentication will be encrypted"
)
);
authenticate(authenticationData.getName());
}