mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Merge branch 'stable' into next-minor
# Conflicts: # src/pocketmine/Player.php # src/pocketmine/block/SnowLayer.php
This commit is contained in:
@ -1858,7 +1858,7 @@ class Level implements ChunkManager, Metadatable{
|
||||
|
||||
if($player !== null){
|
||||
$ev = new PlayerInteractEvent($player, $item, $blockClicked, $clickVector, $face, PlayerInteractEvent::RIGHT_CLICK_BLOCK);
|
||||
if($this->checkSpawnProtection($player, $blockClicked)){
|
||||
if($this->checkSpawnProtection($player, $blockClicked) or $player->isSpectator()){
|
||||
$ev->setCancelled(); //set it to cancelled so plugins can bypass this
|
||||
}
|
||||
|
||||
@ -1902,7 +1902,7 @@ class Level implements ChunkManager, Metadatable{
|
||||
|
||||
if($player !== null){
|
||||
$ev = new BlockPlaceEvent($player, $hand, $blockReplace, $blockClicked, $item);
|
||||
if($this->checkSpawnProtection($player, $blockReplace)){
|
||||
if($this->checkSpawnProtection($player, $blockReplace) or $player->isSpectator()){
|
||||
$ev->setCancelled();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user