mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-12 16:59:44 +00:00
Player: rename equipItem() to selectHotbarSlot()
This commit is contained in:
parent
7bdb99ae8b
commit
f62d9cbb99
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user