Player: remove useless InteractPacket handler

all the things we cared about in here don't exist anymore, so there's no sense in the handler still existing. It can be restored when we want to use the things it still does.
This commit is contained in:
Dylan K. Taylor 2018-07-20 12:39:48 +01:00
parent 25cfcada26
commit 57a86d9ed7
2 changed files with 1 additions and 27 deletions

View File

@ -106,7 +106,6 @@ use pocketmine\network\mcpe\protocol\BookEditPacket;
use pocketmine\network\mcpe\protocol\ChunkRadiusUpdatedPacket;
use pocketmine\network\mcpe\protocol\DataPacket;
use pocketmine\network\mcpe\protocol\EntityEventPacket;
use pocketmine\network\mcpe\protocol\InteractPacket;
use pocketmine\network\mcpe\protocol\InventoryTransactionPacket;
use pocketmine\network\mcpe\protocol\ItemFrameDropItemPacket;
use pocketmine\network\mcpe\protocol\LevelEventPacket;
@ -2625,31 +2624,6 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
return true;
}
public function handleInteract(InteractPacket $packet) : bool{
if(!$this->spawned or !$this->isAlive()){
return true;
}
$this->doCloseInventory();
$target = $this->level->getEntity($packet->target);
if($target === null){
return false;
}
switch($packet->action){
case InteractPacket::ACTION_LEAVE_VEHICLE:
case InteractPacket::ACTION_MOUSEOVER:
break; //TODO: handle these
default:
$this->server->getLogger()->debug("Unhandled/unknown interaction type " . $packet->action . "received from " . $this->getName());
return false;
}
return true;
}
public function handleBlockPickRequest(BlockPickRequestPacket $packet) : bool{
$block = $this->level->getBlockAt($packet->blockX, $packet->blockY, $packet->blockZ);

View File

@ -122,7 +122,7 @@ class SimpleSessionHandler extends SessionHandler{
}
public function handleInteract(InteractPacket $packet) : bool{
return $this->player->handleInteract($packet);
return false; //TODO
}
public function handleBlockPickRequest(BlockPickRequestPacket $packet) : bool{