diff --git a/build.gradle b/build.gradle index e37b79f..036c49f 100644 --- a/build.gradle +++ b/build.gradle @@ -111,6 +111,7 @@ tasks.register("runViaProxy", JavaExec) { mainClass = "net.raphimc.viaproxy.ViaProxy" classpath = viaProxyConfiguration workingDir = file("run") + jvmArgs = ["-DskipUpdateCheck"] doFirst { def jarsDir = file("$workingDir/jars") diff --git a/src/main/java/net/raphimc/vialegacy/ViaLegacyConfig.java b/src/main/java/net/raphimc/vialegacy/ViaLegacyConfig.java index a87a7fe..c1a8fc0 100644 --- a/src/main/java/net/raphimc/vialegacy/ViaLegacyConfig.java +++ b/src/main/java/net/raphimc/vialegacy/ViaLegacyConfig.java @@ -35,6 +35,7 @@ public class ViaLegacyConfig extends Config implements net.raphimc.vialegacy.pla private boolean soundEmulation; private boolean oldBiomes; private boolean enableB1_7_3Sprinting; + private String b1_7_3Motd; private int classicChunkRange; private boolean enableClassicFly; @@ -56,6 +57,7 @@ private void loadFields() { this.soundEmulation = this.getBoolean("sound-emulation", true); this.oldBiomes = this.getBoolean("old-biomes", true); this.enableB1_7_3Sprinting = this.getBoolean("enable-b1_7_3-sprinting", false); + this.b1_7_3Motd = this.getString("b1_7_3-motd", "The server seems to be running!\nWait 5 seconds between each connection"); this.classicChunkRange = this.getInt("classic-chunk-range", 10); this.enableClassicFly = this.getBoolean("enable-classic-fly", false); } @@ -109,6 +111,11 @@ public boolean enableB1_7_3Sprinting() { return this.enableB1_7_3Sprinting; } + @Override + public String getB1_7_3Motd() { + return this.b1_7_3Motd; + } + @Override public int getClassicChunkRange() { return this.classicChunkRange; diff --git a/src/main/java/net/raphimc/vialegacy/platform/ViaLegacyConfig.java b/src/main/java/net/raphimc/vialegacy/platform/ViaLegacyConfig.java index 6fe4b0c..b35344e 100644 --- a/src/main/java/net/raphimc/vialegacy/platform/ViaLegacyConfig.java +++ b/src/main/java/net/raphimc/vialegacy/platform/ViaLegacyConfig.java @@ -35,6 +35,8 @@ public interface ViaLegacyConfig extends Config { boolean enableB1_7_3Sprinting(); + String getB1_7_3Motd(); + int getClassicChunkRange(); boolean enableClassicFly(); diff --git a/src/main/java/net/raphimc/vialegacy/protocol/beta/b1_7_0_3tob1_8_0_1/Protocolb1_7_0_3Tob1_8_0_1.java b/src/main/java/net/raphimc/vialegacy/protocol/beta/b1_7_0_3tob1_8_0_1/Protocolb1_7_0_3Tob1_8_0_1.java index 0b57f7d..3ef1042 100644 --- a/src/main/java/net/raphimc/vialegacy/protocol/beta/b1_7_0_3tob1_8_0_1/Protocolb1_7_0_3Tob1_8_0_1.java +++ b/src/main/java/net/raphimc/vialegacy/protocol/beta/b1_7_0_3tob1_8_0_1/Protocolb1_7_0_3Tob1_8_0_1.java @@ -243,7 +243,7 @@ public void register() { wrapper.cancel(); } final PacketWrapper pingResponse = PacketWrapper.create(ClientboundPacketsb1_8.DISCONNECT, wrapper.user()); - pingResponse.write(Types1_6_4.STRING, "The server seems to be running!\nWait 5 seconds between each connection§0§1"); + pingResponse.write(Types1_6_4.STRING, ViaLegacy.getConfig().getB1_7_3Motd() + "§0§1"); pingResponse.send(Protocolb1_7_0_3Tob1_8_0_1.class); }); this.registerServerbound(ServerboundPacketsb1_8.LOGIN, new PacketHandlers() { diff --git a/src/main/resources/assets/vialegacy/vialegacy.yml b/src/main/resources/assets/vialegacy/vialegacy.yml index d55a8b0..d906364 100644 --- a/src/main/resources/assets/vialegacy/vialegacy.yml +++ b/src/main/resources/assets/vialegacy/vialegacy.yml @@ -21,6 +21,11 @@ old-biomes: true # Enables sprinting for versions below beta 1.8. !THIS CAN CAUSE ISSUES WITH ANTI-CHEAT PLUGINS! enable-b1_7_3-sprinting: false # +# The MOTD to use for <= beta 1.7.3 servers. Supports newlines. Doesn't support color codes. +b1_7_3-motd: | + The server seems to be running! + Wait 5 seconds between each connection +# # Classic chunk loading range classic-chunk-range: 10 #