mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
Added API method Entity->isClosed() and made Entity->closed protected
This commit is contained in:
@ -611,7 +611,7 @@ class Chunk{
|
||||
* @param Entity $entity
|
||||
*/
|
||||
public function addEntity(Entity $entity){
|
||||
if($entity->closed){
|
||||
if($entity->isClosed()){
|
||||
throw new \InvalidArgumentException("Attempted to add a garbage closed Entity to a chunk");
|
||||
}
|
||||
$this->entities[$entity->getId()] = $entity;
|
||||
|
Reference in New Issue
Block a user