mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-13 13:25:16 +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(){
|
private function tickChunks(){
|
||||||
if($this->chunksPerTick <= 0 or count($this->players) === 0){
|
if($this->chunksPerTick <= 0 or count($this->players) === 0){
|
||||||
|
$this->chunkTickList = [];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1208,7 +1209,7 @@ class Level implements ChunkManager, Metadatable{
|
|||||||
if($player instanceof Player){
|
if($player instanceof Player){
|
||||||
$ev = new BlockBreakEvent($player, $target, $item, ($player->getGamemode() & 0x01) === 1 ? true : false);
|
$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();
|
$ev->setCancelled();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user