Update for 1.4. Please note this is really messed and doesn't seem to work.

This commit is contained in:
md_5 2012-10-26 17:53:07 +11:00
parent fbe16cb906
commit 671710f4e2
3 changed files with 16 additions and 2 deletions

View File

@ -74,7 +74,7 @@
<dependency> <dependency>
<groupId>net.md-5</groupId> <groupId>net.md-5</groupId>
<artifactId>mendax</artifactId> <artifactId>mendax</artifactId>
<version>1.3-SNAPSHOT</version> <version>1.4.2-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.bouncycastle</groupId> <groupId>org.bouncycastle</groupId>

View File

@ -54,6 +54,14 @@ public class Configuration
* Server ping motd. * Server ping motd.
*/ */
public String motd = "BungeeCord Proxy Instance"; 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. * Name of default server.
*/ */

View File

@ -77,7 +77,13 @@ public class InitialHandler implements Runnable
userCon.connect(BungeeCord.instance.config.getServer(handshake.username, handshake.host)); userCon.connect(BungeeCord.instance.config.getServer(handshake.username, handshake.host));
break; break;
case 0xFE: case 0xFE:
throw new KickException(BungeeCord.instance.config.motd + ChatColor.COLOR_CHAR + BungeeCord.instance.connections.size() + ChatColor.COLOR_CHAR + BungeeCord.instance.config.maxPlayers); Configuration conf = BungeeCord.instance.config;
throw new KickException(ChatColor.COLOR_CHAR + "1"
+ "\00" + conf.protcolVersion
+ "\00" + conf.gameVersion
+ "\00" + conf.motd
+ "\00" + BungeeCord.instance.connections.size()
+ "\00" + conf.maxPlayers);
default: default:
throw new IllegalArgumentException("Wasn't ready for packet id " + Util.hex(id)); throw new IllegalArgumentException("Wasn't ready for packet id " + Util.hex(id));
} }