Update ChestInventory.php

This commit is contained in:
hmy2001 2015-11-25 21:08:28 +09:00
parent 8edebed11c
commit 4f12533ad3

View File

@ -23,7 +23,7 @@ namespace pocketmine\inventory;
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;
@ -44,7 +44,7 @@ class ChestInventory extends ContainerInventory{
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->getHolder()->getX(); $pk->x = $this->getHolder()->getX();
$pk->y = $this->getHolder()->getY(); $pk->y = $this->getHolder()->getY();
$pk->z = $this->getHolder()->getZ(); $pk->z = $this->getHolder()->getZ();
@ -58,7 +58,7 @@ class ChestInventory extends ContainerInventory{
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->getHolder()->getX(); $pk->x = $this->getHolder()->getX();
$pk->y = $this->getHolder()->getY(); $pk->y = $this->getHolder()->getY();
$pk->z = $this->getHolder()->getZ(); $pk->z = $this->getHolder()->getZ();
@ -70,4 +70,4 @@ class ChestInventory extends ContainerInventory{
} }
parent::onClose($who); parent::onClose($who);
} }
} }