diff --git a/src/classes/PocketMinecraftServer.php b/src/classes/PocketMinecraftServer.php index 33ced2099..636015d0c 100644 --- a/src/classes/PocketMinecraftServer.php +++ b/src/classes/PocketMinecraftServer.php @@ -535,10 +535,10 @@ class PocketMinecraftServer{ } $version = $data[1]; $size = strlen($data[2]); - if($version !== 5){ - console("[DEBUG] Incorrect protocol #$version from ".$packet["ip"].":".$packet["port"], true, true, 2); + if($version !== CURRENT_STRUCTURE){ + console("[DEBUG] Incorrect structure #$version from ".$packet["ip"].":".$packet["port"], true, true, 2); $this->send(0x1a, array( - CURRENT_PROTOCOL, + CURRENT_STRUCTURE, MAGIC, $this->serverID, ), false, $packet["ip"], $packet["port"]); diff --git a/src/common/config.php b/src/common/config.php index 5d3115a2a..94b142852 100644 --- a/src/common/config.php +++ b/src/common/config.php @@ -39,5 +39,6 @@ define("LOG", true); define("MAGIC", "\x00\xff\xff\x00\xfe\xfe\xfe\xfe\xfd\xfd\xfd\xfd\x12\x34\x56\x78"); define("TEST_MD5", "d0ca3786e53b615bb4fb9f5094d5c9a7"); define("MAJOR_VERSION", "Alpha_1.1dev"); +define("CURRENT_STRUCTURE", 5); define("CURRENT_PROTOCOL", 9); define("CURRENT_MINECRAFT_VERSION", "v0.6.0 alpha"); \ No newline at end of file