mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-16 02:38:54 +00:00
Update ChestInventory.php
This commit is contained in:
parent
8edebed11c
commit
4f12533ad3
@ -23,7 +23,7 @@ namespace pocketmine\inventory;
|
||||
|
||||
use pocketmine\level\Level;
|
||||
use pocketmine\network\Network;
|
||||
use pocketmine\network\protocol\TileEventPacket;
|
||||
use pocketmine\network\protocol\BlockEventPacket;
|
||||
use pocketmine\Player;
|
||||
|
||||
use pocketmine\tile\Chest;
|
||||
@ -44,7 +44,7 @@ class ChestInventory extends ContainerInventory{
|
||||
parent::onOpen($who);
|
||||
|
||||
if(count($this->getViewers()) === 1){
|
||||
$pk = new TileEventPacket();
|
||||
$pk = new BlockEventPacket();
|
||||
$pk->x = $this->getHolder()->getX();
|
||||
$pk->y = $this->getHolder()->getY();
|
||||
$pk->z = $this->getHolder()->getZ();
|
||||
@ -58,7 +58,7 @@ class ChestInventory extends ContainerInventory{
|
||||
|
||||
public function onClose(Player $who){
|
||||
if(count($this->getViewers()) === 1){
|
||||
$pk = new TileEventPacket();
|
||||
$pk = new BlockEventPacket();
|
||||
$pk->x = $this->getHolder()->getX();
|
||||
$pk->y = $this->getHolder()->getY();
|
||||
$pk->z = $this->getHolder()->getZ();
|
||||
@ -70,4 +70,4 @@ class ChestInventory extends ContainerInventory{
|
||||
}
|
||||
parent::onClose($who);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user