Merge branch 'stable' into staging/4.1

This commit is contained in:
Dylan K. Taylor
2022-01-28 20:40:07 +00:00
2 changed files with 26 additions and 0 deletions

View File

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