mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 10:22:56 +00:00
Removed InventoryType, added new inventory API methods
This commit is contained in:
@ -34,6 +34,7 @@ use pocketmine\network\mcpe\protocol\MobArmorEquipmentPacket;
|
||||
use pocketmine\network\mcpe\protocol\MobEquipmentPacket;
|
||||
use pocketmine\network\mcpe\protocol\PlayerHotbarPacket;
|
||||
use pocketmine\network\mcpe\protocol\types\ContainerIds;
|
||||
use pocketmine\network\mcpe\protocol\types\WindowTypes;
|
||||
use pocketmine\Player;
|
||||
use pocketmine\Server;
|
||||
|
||||
@ -45,7 +46,19 @@ class PlayerInventory extends BaseInventory{
|
||||
|
||||
public function __construct(Human $player){
|
||||
$this->resetHotbar(false);
|
||||
parent::__construct($player, InventoryType::get(InventoryType::PLAYER));
|
||||
parent::__construct($player);
|
||||
}
|
||||
|
||||
public function getNetworkType() : int{
|
||||
return WindowTypes::INVENTORY;
|
||||
}
|
||||
|
||||
public function getName() : string{
|
||||
return "Player";
|
||||
}
|
||||
|
||||
public function getDefaultSize() : int{
|
||||
return 40; //36 inventory, 4 armor
|
||||
}
|
||||
|
||||
public function getSize() : int{
|
||||
|
Reference in New Issue
Block a user