clone-remote-port option Updated (#1061)

* Added clone remote port option for bukkit, bungee and velocity

* Added clone remote port option for sponge

* Changed clone-remote-port description in config.yml

* Update config.yml

Updated config.yml to include a better description of the clone-remote-port option

* Updated GeyserSpongePlugin

An incorrect port was being edited before (remote instead of bedrock)

* Update config.yml

Co-authored-by: TeaNoDonuts <blackalegator@gmail.com>
This commit is contained in:
toinouH 2020-07-30 22:09:40 +02:00 committed by GitHub
parent 600c54d89d
commit 427cb69a14
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 30 additions and 0 deletions

View file

@ -174,6 +174,11 @@ public class GeyserSpongeConfiguration implements GeyserConfiguration {
return node.getNode("port").getInt(19132);
}
@Override
public boolean isCloneRemotePort() {
return node.getNode("clone-remote-port").getBoolean(false);
}
@Override
public String getMotd1() {
return node.getNode("motd1").getString("GeyserMC");

View file

@ -111,6 +111,11 @@ public class GeyserSpongePlugin implements GeyserBootstrap {
serverPort.setValue(javaAddr.getPort());
}
ConfigurationNode bedrockPort = config.getNode("bedrock").getNode("port");
if (geyserConfig.getBedrock().isCloneRemotePort()){
bedrockPort.setValue(serverPort.getValue());
}
this.geyserLogger = new GeyserSpongeLogger(logger, geyserConfig.isDebugMode());
GeyserConfiguration.checkGeyserConfiguration(geyserConfig, geyserLogger);
this.connector = GeyserConnector.start(PlatformType.SPONGE, this);