mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-13 13:25:16 +00:00
Removed handler for PlayerHotbarPacket
this thing is useless now, and the equipment stuff can be done with MobEquipmentPacket anyway.
This commit is contained in:
parent
dc553142c9
commit
dd8a772d43
@ -2807,16 +2807,6 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function handlePlayerHotbar(PlayerHotbarPacket $packet){
|
|
||||||
if($packet->windowId !== ContainerIds::INVENTORY){
|
|
||||||
return false; //In PE this should never happen
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->inventory->equipItem($packet->selectedHotbarSlot);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function handleAdventureSettings(AdventureSettingsPacket $packet) : bool{
|
public function handleAdventureSettings(AdventureSettingsPacket $packet) : bool{
|
||||||
if($packet->entityUniqueId !== $this->getId()){
|
if($packet->entityUniqueId !== $this->getId()){
|
||||||
return false; //TODO
|
return false; //TODO
|
||||||
|
@ -169,7 +169,7 @@ class PlayerNetworkSessionAdapter extends NetworkSession{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function handlePlayerHotbar(PlayerHotbarPacket $packet) : bool{
|
public function handlePlayerHotbar(PlayerHotbarPacket $packet) : bool{
|
||||||
return $this->player->handlePlayerHotbar($packet);
|
return true; //this packet is useless
|
||||||
}
|
}
|
||||||
|
|
||||||
public function handleCraftingEvent(CraftingEventPacket $packet) : bool{
|
public function handleCraftingEvent(CraftingEventPacket $packet) : bool{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user