Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-11-20 06:50:09 +01:00
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>
Dieser Commit ist enthalten in:
Ursprung
600c54d89d
Commit
427cb69a14
@ -87,6 +87,10 @@ public class GeyserBungeePlugin extends Plugin implements GeyserBootstrap {
|
|||||||
this.geyserConfig.getRemote().setAddress(javaAddr.getHostString());
|
this.geyserConfig.getRemote().setAddress(javaAddr.getHostString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (geyserConfig.getBedrock().isCloneRemotePort()) {
|
||||||
|
geyserConfig.getBedrock().setPort(javaAddr.getPort());
|
||||||
|
}
|
||||||
|
|
||||||
this.geyserConfig.getRemote().setPort(javaAddr.getPort());
|
this.geyserConfig.getRemote().setPort(javaAddr.getPort());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,6 +87,10 @@ public class GeyserSpigotPlugin extends JavaPlugin implements GeyserBootstrap {
|
|||||||
geyserConfig.getRemote().setAddress(Bukkit.getIp());
|
geyserConfig.getRemote().setAddress(Bukkit.getIp());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (geyserConfig.getBedrock().isCloneRemotePort()) {
|
||||||
|
geyserConfig.getBedrock().setPort(Bukkit.getPort());
|
||||||
|
}
|
||||||
|
|
||||||
geyserConfig.getRemote().setPort(Bukkit.getPort());
|
geyserConfig.getRemote().setPort(Bukkit.getPort());
|
||||||
|
|
||||||
this.geyserLogger = new GeyserSpigotLogger(getLogger(), geyserConfig.isDebugMode());
|
this.geyserLogger = new GeyserSpigotLogger(getLogger(), geyserConfig.isDebugMode());
|
||||||
|
@ -174,6 +174,11 @@ public class GeyserSpongeConfiguration implements GeyserConfiguration {
|
|||||||
return node.getNode("port").getInt(19132);
|
return node.getNode("port").getInt(19132);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isCloneRemotePort() {
|
||||||
|
return node.getNode("clone-remote-port").getBoolean(false);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getMotd1() {
|
public String getMotd1() {
|
||||||
return node.getNode("motd1").getString("GeyserMC");
|
return node.getNode("motd1").getString("GeyserMC");
|
||||||
|
@ -111,6 +111,11 @@ public class GeyserSpongePlugin implements GeyserBootstrap {
|
|||||||
serverPort.setValue(javaAddr.getPort());
|
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());
|
this.geyserLogger = new GeyserSpongeLogger(logger, geyserConfig.isDebugMode());
|
||||||
GeyserConfiguration.checkGeyserConfiguration(geyserConfig, geyserLogger);
|
GeyserConfiguration.checkGeyserConfiguration(geyserConfig, geyserLogger);
|
||||||
this.connector = GeyserConnector.start(PlatformType.SPONGE, this);
|
this.connector = GeyserConnector.start(PlatformType.SPONGE, this);
|
||||||
|
@ -98,6 +98,10 @@ public class GeyserVelocityPlugin implements GeyserBootstrap {
|
|||||||
geyserConfig.getRemote().setAddress(javaAddr.getHostString());
|
geyserConfig.getRemote().setAddress(javaAddr.getHostString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (geyserConfig.getBedrock().isCloneRemotePort()) {
|
||||||
|
geyserConfig.getBedrock().setPort(javaAddr.getPort());
|
||||||
|
}
|
||||||
|
|
||||||
geyserConfig.getRemote().setPort(javaAddr.getPort());
|
geyserConfig.getRemote().setPort(javaAddr.getPort());
|
||||||
|
|
||||||
this.geyserLogger = new GeyserVelocityLogger(logger, geyserConfig.isDebugMode());
|
this.geyserLogger = new GeyserVelocityLogger(logger, geyserConfig.isDebugMode());
|
||||||
|
@ -86,6 +86,8 @@ public interface GeyserConfiguration {
|
|||||||
|
|
||||||
int getPort();
|
int getPort();
|
||||||
|
|
||||||
|
boolean isCloneRemotePort();
|
||||||
|
|
||||||
String getMotd1();
|
String getMotd1();
|
||||||
|
|
||||||
String getMotd2();
|
String getMotd2();
|
||||||
|
@ -97,7 +97,9 @@ public abstract class GeyserJacksonConfiguration implements GeyserConfiguration
|
|||||||
public static class BedrockConfiguration implements IBedrockConfiguration {
|
public static class BedrockConfiguration implements IBedrockConfiguration {
|
||||||
|
|
||||||
private String address;
|
private String address;
|
||||||
|
@Setter
|
||||||
private int port;
|
private int port;
|
||||||
|
private boolean isCloneRemotePort;
|
||||||
|
|
||||||
private String motd1;
|
private String motd1;
|
||||||
private String motd2;
|
private String motd2;
|
||||||
|
@ -13,6 +13,10 @@ bedrock:
|
|||||||
address: 0.0.0.0
|
address: 0.0.0.0
|
||||||
# The port that will listen for connections
|
# The port that will listen for connections
|
||||||
port: 19132
|
port: 19132
|
||||||
|
# Some hosting services change your Java port everytime you open the server, and require the same port to be used for Bedrock.
|
||||||
|
# This option makes the Bedrock port the same as the Java port every time you start the server.
|
||||||
|
# This option is for the plugin version only.
|
||||||
|
clone-remote-port: false
|
||||||
# The MOTD that will be broadcasted to Minecraft: Bedrock Edition clients. Irrelevant if "passthrough-motd" is set to true
|
# The MOTD that will be broadcasted to Minecraft: Bedrock Edition clients. Irrelevant if "passthrough-motd" is set to true
|
||||||
motd1: "GeyserMC"
|
motd1: "GeyserMC"
|
||||||
motd2: "Another GeyserMC forced host."
|
motd2: "Another GeyserMC forced host."
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren