Created
August 5, 2020 11:28
-
-
Save PJZ9n/1acb214a36dd943c4435f510a0745885 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Copyright (c) 2020 PJZ9n. | |
* | |
* This file is part of NewChestShop. | |
* | |
* NewChestShop is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or | |
* (at your option) any later version. | |
* | |
* NewChestShop is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
* GNU General Public License for more details. | |
* | |
* You should have received a copy of the GNU General Public License | |
* along with NewChestShop. If not, see <http://www.gnu.org/licenses/>. | |
*/ | |
declare(strict_types=1); | |
namespace pjz9n\newchestshop; | |
use pocketmine\event\Cancellable; | |
use pocketmine\event\Event; | |
use pocketmine\inventory\ChestInventory; | |
use pocketmine\inventory\PlayerCursorInventory; | |
use pocketmine\item\Item; | |
class PlayerChestInventoryChangeEvent extends Event implements Cancellable | |
{ | |
/** @var PlayerCursorInventory */ | |
private $playerCursorInventory; | |
/** @var ChestInventory */ | |
private $chestInventory; | |
/** @var Item */ | |
private $source; | |
/** @var Item */ | |
private $target; | |
public function __construct(PlayerCursorInventory $playerCursorInventory, ChestInventory $chestInventory, Item $source, Item $target) | |
{ | |
$this->playerCursorInventory = $playerCursorInventory; | |
$this->chestInventory = $chestInventory; | |
$this->source = $source; | |
$this->target = $target; | |
} | |
/** | |
* @return PlayerCursorInventory | |
*/ | |
public function getPlayerCursorInventory(): PlayerCursorInventory | |
{ | |
return $this->playerCursorInventory; | |
} | |
/** | |
* @return ChestInventory | |
*/ | |
public function getChestInventory(): ChestInventory | |
{ | |
return $this->chestInventory; | |
} | |
/** | |
* @return Item | |
*/ | |
public function getSource(): Item | |
{ | |
return $this->source; | |
} | |
/** | |
* @return Item | |
*/ | |
public function getTarget(): Item | |
{ | |
return $this->target; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment