From d71a088460891c32f98df657f799a8555db67822 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Pueyo Date: Fri, 17 May 2013 14:33:14 +0200 Subject: [PATCH] Added MC_REMOVE_PLAYER --- src/constants/ProtocolInfo.php | 2 +- src/network/CustomPacketHandler.php | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/constants/ProtocolInfo.php b/src/constants/ProtocolInfo.php index 8bd6d802a4..c4a5c7db35 100644 --- a/src/constants/ProtocolInfo.php +++ b/src/constants/ProtocolInfo.php @@ -49,7 +49,7 @@ define("MC_SET_TIME", 0x86); define("MC_START_GAME", 0x87); define("MC_ADD_MOB", 0x88); define("MC_ADD_PLAYER", 0x89); -//define("MC_REMOVE_PLAYER", 0x8a); +define("MC_REMOVE_PLAYER", 0x8a); define("MC_ADD_ENTITY", 0x8c); define("MC_REMOVE_ENTITY", 0x8d); diff --git a/src/network/CustomPacketHandler.php b/src/network/CustomPacketHandler.php index 079a5981b9..ac3d053c27 100644 --- a/src/network/CustomPacketHandler.php +++ b/src/network/CustomPacketHandler.php @@ -244,6 +244,15 @@ class CustomPacketHandler{ $this->raw .= Utils::writeMetadata($this->data["metadata"]); } break; + case MC_REMOVE_PLAYER: + if($this->c === false){ + $this->data["clientID"] = Utils::readLong($this->get(8)); + $this->data["eid"] = Utils::readInt($this->get(4)); + }else{ + $this->raw .= Utils::writeLong($this->data["clientID"]); + $this->raw .= Utils::writeInt($this->data["eid"]); + } + break; case MC_ADD_ENTITY: //Not used? if($this->c === false){ $this->data["eid"] = Utils::readInt($this->get(4));