mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
15 lines
483 B
PHP
15 lines
483 B
PHP
<?php
|
|
|
|
class EntityList{
|
|
public function getEntities(){
|
|
return $this->entities;
|
|
}
|
|
public function addEntity(PropertyEntity $property){
|
|
$this->entities[$property->getEntityType()] = $property;
|
|
}
|
|
public function getEntityFromTypeAndClass($type, $class){
|
|
if($class === ENTITY_ITEM) return $this->entities["itemSpecial"];
|
|
return isset($this->entities[$type]) && $this->entities[$type]->getEntityClass() === $class ? $this->entities[$type] : 0;
|
|
}
|
|
private $entities = [];
|
|
}
|