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

View File

@ -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;

View File

@ -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;
}