mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-09 11:16:57 +00:00
Removed EntityInventoryChangeEvent and EntityArmorChangeEvent
there is nothing that these events do that can't be fulfilled by transactions. They complicate the internal implementation and produce unexpected behaviour for plugins when cancelled. TL;DR: Use transactions. That's what they are there for.
This commit is contained in:
@ -60,9 +60,8 @@ class Furnace extends Spawnable implements InventoryHolder, Container, Nameable{
|
||||
|
||||
public function __construct(World $world, Vector3 $pos){
|
||||
$this->inventory = new FurnaceInventory($this);
|
||||
$this->inventory->setSlotChangeListener(function(Inventory $inventory, int $slot, Item $oldItem, Item $newItem) : ?Item{
|
||||
$this->inventory->setSlotChangeListener(function(Inventory $inventory, int $slot) : void{
|
||||
$this->scheduleUpdate();
|
||||
return $newItem;
|
||||
});
|
||||
|
||||
parent::__construct($world, $pos);
|
||||
|
Reference in New Issue
Block a user