Merge branch 'stable' into next-minor

This commit is contained in:
Dylan K. Taylor 2022-01-20 16:30:49 +00:00
commit 86bcc49972
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D
2 changed files with 3 additions and 2 deletions

View File

@ -31,7 +31,8 @@ use pocketmine\math\Vector3;
use pocketmine\player\Player;
/**
* Called when a player interacts or touches a block (including air?)
* Called when a player interacts or touches a block.
* This is called for both left click (start break) and right click (use).
*/
class PlayerInteractEvent extends PlayerEvent implements Cancellable{
use CancellableTrait;

View File

@ -878,7 +878,7 @@ class World implements ChunkManager{
//Update entities that need update
Timings::$tickEntity->startTiming();
foreach($this->updateEntities as $id => $entity){
if($entity->isClosed() or !$entity->onUpdate($currentTick)){
if($entity->isClosed() or $entity->isFlaggedForDespawn() or !$entity->onUpdate($currentTick)){
unset($this->updateEntities[$id]);
}
if($entity->isFlaggedForDespawn()){