mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 00:33:59 +00:00
Fixed #2446
This commit is contained in:
parent
714ea54121
commit
1ac17abec0
@ -589,6 +589,7 @@ class Level implements ChunkManager, Metadatable{
|
||||
|
||||
private function tickChunks(){
|
||||
if($this->chunksPerTick <= 0 or count($this->players) === 0){
|
||||
$this->chunkTickList = [];
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1208,7 +1209,7 @@ class Level implements ChunkManager, Metadatable{
|
||||
if($player instanceof Player){
|
||||
$ev = new BlockBreakEvent($player, $target, $item, ($player->getGamemode() & 0x01) === 1 ? true : false);
|
||||
|
||||
if($item instanceof Item and !$target->isBreakable($item)){
|
||||
if($player->isSurvival() and $item instanceof Item and !$target->isBreakable($item)){
|
||||
$ev->setCancelled();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user