mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-17 03:08:58 +00:00
Update DoubleChestInventory.php
This commit is contained in:
parent
963f7ee077
commit
8edebed11c
@ -24,7 +24,7 @@ namespace pocketmine\inventory;
|
|||||||
use pocketmine\item\Item;
|
use pocketmine\item\Item;
|
||||||
use pocketmine\level\Level;
|
use pocketmine\level\Level;
|
||||||
use pocketmine\network\Network;
|
use pocketmine\network\Network;
|
||||||
use pocketmine\network\protocol\TileEventPacket;
|
use pocketmine\network\protocol\BlockEventPacket;
|
||||||
use pocketmine\Player;
|
use pocketmine\Player;
|
||||||
|
|
||||||
use pocketmine\tile\Chest;
|
use pocketmine\tile\Chest;
|
||||||
@ -99,7 +99,7 @@ class DoubleChestInventory extends ChestInventory implements InventoryHolder{
|
|||||||
parent::onOpen($who);
|
parent::onOpen($who);
|
||||||
|
|
||||||
if(count($this->getViewers()) === 1){
|
if(count($this->getViewers()) === 1){
|
||||||
$pk = new TileEventPacket();
|
$pk = new BlockEventPacket();
|
||||||
$pk->x = $this->right->getHolder()->getX();
|
$pk->x = $this->right->getHolder()->getX();
|
||||||
$pk->y = $this->right->getHolder()->getY();
|
$pk->y = $this->right->getHolder()->getY();
|
||||||
$pk->z = $this->right->getHolder()->getZ();
|
$pk->z = $this->right->getHolder()->getZ();
|
||||||
@ -113,7 +113,7 @@ class DoubleChestInventory extends ChestInventory implements InventoryHolder{
|
|||||||
|
|
||||||
public function onClose(Player $who){
|
public function onClose(Player $who){
|
||||||
if(count($this->getViewers()) === 1){
|
if(count($this->getViewers()) === 1){
|
||||||
$pk = new TileEventPacket();
|
$pk = new BlockEventPacket();
|
||||||
$pk->x = $this->right->getHolder()->getX();
|
$pk->x = $this->right->getHolder()->getX();
|
||||||
$pk->y = $this->right->getHolder()->getY();
|
$pk->y = $this->right->getHolder()->getY();
|
||||||
$pk->z = $this->right->getHolder()->getZ();
|
$pk->z = $this->right->getHolder()->getZ();
|
||||||
@ -139,4 +139,4 @@ class DoubleChestInventory extends ChestInventory implements InventoryHolder{
|
|||||||
public function getRightSide(){
|
public function getRightSide(){
|
||||||
return $this->right;
|
return $this->right;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user