Fixed InventoryPickupItemEvent

This commit is contained in:
Shoghi Cervantes 2014-10-28 22:05:54 +01:00
parent 8c4faa8622
commit f772391866
2 changed files with 3 additions and 3 deletions

View File

@ -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;
} }

View File

@ -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;