mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
farmland weird loop is gone
This commit is contained in:
parent
019e7f26ea
commit
569f81c70c
3 changed files with 32 additions and 70 deletions
|
|
@ -103,7 +103,7 @@ class EntityAPI{
|
|||
if($args[0] === "all"){
|
||||
$cnt = 0;
|
||||
foreach($this->entities as $e){
|
||||
if(!$e->isPlayer()){ //if player, not despawning
|
||||
if(isset($e) && $e != null && !$e->isPlayer()){ //if player, not despawning
|
||||
$this->remove($e->eid);
|
||||
$cnt++;
|
||||
}
|
||||
|
|
@ -292,4 +292,4 @@ class EntityAPI{
|
|||
}
|
||||
return $this->entities;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue