fix inventory bug, silence debug spam, shut the fuck up MCPE

This commit is contained in:
Dylan K. Taylor 2018-12-11 21:57:07 +00:00
parent abf0dee426
commit 5946ec8819

View File

@ -2628,6 +2628,13 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
if(!$this->spawned or !$this->isAlive()){
return true;
}
if($packet->action === InteractPacket::ACTION_MOUSEOVER and $packet->target === 0){
//TODO HACK: silence useless spam (MCPE 1.8)
//this packet is EXPECTED to only be sent when interacting with an entity, but due to some messy Mojang
//hacks, it also sends it when changing the held item now, which causes us to think the inventory was closed
//when it wasn't.
return true;
}
$this->doCloseInventory();