Merge branch 'stable' into next-minor

This commit is contained in:
Dylan K. Taylor
2022-08-18 17:06:15 +01:00
18 changed files with 50 additions and 25 deletions

View File

@ -1558,7 +1558,7 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
$ev = new PlayerBlockPickEvent($this, $block, $item);
$existingSlot = $this->inventory->first($item);
if($existingSlot === -1 && $this->hasFiniteResources()){
if($existingSlot === -1 && ($this->hasFiniteResources() || $this->isSpectator())){
$ev->cancel();
}
$ev->call();