1
0
mirror of https://github.com/pmmp/PocketMine-MP.git synced 2025-07-09 11:31:49 +00:00

Player: rename equipItem() to selectHotbarSlot()

This commit is contained in:
Dylan K. Taylor 2019-06-26 15:52:01 +01:00
parent 7bdb99ae8b
commit f62d9cbb99
2 changed files with 2 additions and 2 deletions
src/pocketmine
network/mcpe/handler
player

@ -358,7 +358,7 @@ class InGamePacketHandler extends PacketHandler{
}
public function handleMobEquipment(MobEquipmentPacket $packet) : bool{
if(!$this->player->equipItem($packet->hotbarSlot)){
if(!$this->player->selectHotbarSlot($packet->hotbarSlot)){
$this->player->getInventory()->sendHeldItem($this->player);
}
return true;

@ -1648,7 +1648,7 @@ class Player extends Human implements CommandSender, ChunkLoader, ChunkListener,
return true;
}
public function equipItem(int $hotbarSlot) : bool{
public function selectHotbarSlot(int $hotbarSlot) : bool{
if(!$this->inventory->isHotbarSlot($hotbarSlot)){ //TODO: exception here?
return false;
}