mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-15 02:09:42 +00:00
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:
parent
25cfcada26
commit
57a86d9ed7
@ -106,7 +106,6 @@ use pocketmine\network\mcpe\protocol\BookEditPacket;
|
|||||||
use pocketmine\network\mcpe\protocol\ChunkRadiusUpdatedPacket;
|
use pocketmine\network\mcpe\protocol\ChunkRadiusUpdatedPacket;
|
||||||
use pocketmine\network\mcpe\protocol\DataPacket;
|
use pocketmine\network\mcpe\protocol\DataPacket;
|
||||||
use pocketmine\network\mcpe\protocol\EntityEventPacket;
|
use pocketmine\network\mcpe\protocol\EntityEventPacket;
|
||||||
use pocketmine\network\mcpe\protocol\InteractPacket;
|
|
||||||
use pocketmine\network\mcpe\protocol\InventoryTransactionPacket;
|
use pocketmine\network\mcpe\protocol\InventoryTransactionPacket;
|
||||||
use pocketmine\network\mcpe\protocol\ItemFrameDropItemPacket;
|
use pocketmine\network\mcpe\protocol\ItemFrameDropItemPacket;
|
||||||
use pocketmine\network\mcpe\protocol\LevelEventPacket;
|
use pocketmine\network\mcpe\protocol\LevelEventPacket;
|
||||||
@ -2625,31 +2624,6 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
|||||||
return true;
|
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{
|
public function handleBlockPickRequest(BlockPickRequestPacket $packet) : bool{
|
||||||
$block = $this->level->getBlockAt($packet->blockX, $packet->blockY, $packet->blockZ);
|
$block = $this->level->getBlockAt($packet->blockX, $packet->blockY, $packet->blockZ);
|
||||||
|
|
||||||
|
@ -122,7 +122,7 @@ class SimpleSessionHandler extends SessionHandler{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function handleInteract(InteractPacket $packet) : bool{
|
public function handleInteract(InteractPacket $packet) : bool{
|
||||||
return $this->player->handleInteract($packet);
|
return false; //TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
public function handleBlockPickRequest(BlockPickRequestPacket $packet) : bool{
|
public function handleBlockPickRequest(BlockPickRequestPacket $packet) : bool{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user