mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 00:33:59 +00:00
Player: added missing spawn protection check for frame item removal
fixes #2025
This commit is contained in:
parent
a7396d7ae9
commit
9395dbf9fa
@ -2823,7 +2823,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
||||
$tile = $this->level->getTileAt($packet->x, $packet->y, $packet->z);
|
||||
if($tile instanceof ItemFrame){
|
||||
$ev = new PlayerInteractEvent($this, $this->inventory->getItemInHand(), $tile->getBlock(), null, 5 - $tile->getBlock()->getDamage(), PlayerInteractEvent::LEFT_CLICK_BLOCK);
|
||||
if($this->isSpectator()){
|
||||
if($this->isSpectator() or $this->level->checkSpawnProtection($this, $tile)){
|
||||
$ev->setCancelled();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user