From 6b984e052de8e813f3d2d04b65f2a64c6567e83b Mon Sep 17 00:00:00 2001 From: md_5 Date: Mon, 12 Nov 2012 17:15:31 +1100 Subject: [PATCH] Hardcode MC versions --- src/main/java/net/md_5/bungee/BungeeCord.java | 9 ++++++++- src/main/java/net/md_5/bungee/Configuration.java | 8 -------- src/main/java/net/md_5/bungee/InitialHandler.java | 4 ++-- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/main/java/net/md_5/bungee/BungeeCord.java b/src/main/java/net/md_5/bungee/BungeeCord.java index a3ba5d72..ec9bb1b0 100644 --- a/src/main/java/net/md_5/bungee/BungeeCord.java +++ b/src/main/java/net/md_5/bungee/BungeeCord.java @@ -34,7 +34,14 @@ import net.md_5.bungee.tablist.TabListHandler; */ public class BungeeCord { - + /** + * Server protocol version. + */ + public static final int PROTOCOL_VERSION= 47; + /** + * Server game version. + */ + public static final String GAME_VERSION = "1.4.2"; /** * Current software instance. */ diff --git a/src/main/java/net/md_5/bungee/Configuration.java b/src/main/java/net/md_5/bungee/Configuration.java index 2e486f42..efc69a43 100644 --- a/src/main/java/net/md_5/bungee/Configuration.java +++ b/src/main/java/net/md_5/bungee/Configuration.java @@ -54,14 +54,6 @@ public class Configuration * Server ping motd. */ public String motd = "BungeeCord Proxy Instance"; - /** - * Server protocol version. - */ - public int protcolVersion = 47; - /** - * Server game version. - */ - public String gameVersion = "1.4.2"; /** * Name of default server. */ diff --git a/src/main/java/net/md_5/bungee/InitialHandler.java b/src/main/java/net/md_5/bungee/InitialHandler.java index 785de47d..68f9f285 100644 --- a/src/main/java/net/md_5/bungee/InitialHandler.java +++ b/src/main/java/net/md_5/bungee/InitialHandler.java @@ -88,8 +88,8 @@ public class InitialHandler implements Runnable } Configuration conf = BungeeCord.instance.config; String ping = (newPing) ? ChatColor.COLOR_CHAR + "1" - + "\00" + conf.protcolVersion - + "\00" + conf.gameVersion + + "\00" + BungeeCord.PROTOCOL_VERSION + + "\00" + BungeeCord.GAME_VERSION + "\00" + conf.motd + "\00" + BungeeCord.instance.connections.size() + "\00" + conf.maxPlayers