mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Merge branch 'stable' into staging/4.1
This commit is contained in:
@ -46,6 +46,9 @@ class DropItemAction extends InventoryAction{
|
||||
|
||||
public function onPreExecute(Player $source) : bool{
|
||||
$ev = new PlayerDropItemEvent($source, $this->targetItem);
|
||||
if($source->isSpectator()){
|
||||
$ev->cancel();
|
||||
}
|
||||
$ev->call();
|
||||
if($ev->isCancelled()){
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user