mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-23 11:26:37 +00:00
Fixed InventoryPickupItemEvent
This commit is contained in:
parent
8c4faa8622
commit
f772391866
@ -1203,7 +1203,7 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->server->getPluginManager()->callEvent($ev = InventoryPickupItemEvent::createEvent($this->inventory, $item));
|
$this->server->getPluginManager()->callEvent($ev = InventoryPickupItemEvent::createEvent($this->inventory, $entity));
|
||||||
if($ev->isCancelled()){
|
if($ev->isCancelled()){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -1228,7 +1228,7 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->server->getPluginManager()->callEvent($ev = InventoryPickupItemEvent::createEvent($this->inventory, $item));
|
$this->server->getPluginManager()->callEvent($ev = InventoryPickupItemEvent::createEvent($this->inventory, $entity));
|
||||||
if($ev->isCancelled()){
|
if($ev->isCancelled()){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ namespace pocketmine\event\inventory;
|
|||||||
|
|
||||||
use pocketmine\event\Cancellable;
|
use pocketmine\event\Cancellable;
|
||||||
use pocketmine\inventory\Inventory;
|
use pocketmine\inventory\Inventory;
|
||||||
use pocketmine\item\Item;
|
use pocketmine\entity\Item;
|
||||||
|
|
||||||
class InventoryPickupItemEvent extends InventoryEvent implements Cancellable{
|
class InventoryPickupItemEvent extends InventoryEvent implements Cancellable{
|
||||||
public static $handlerList = null;
|
public static $handlerList = null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user