mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
code style fix
This commit is contained in:
parent
fc5c5625cb
commit
5e8e9330e2
361 changed files with 4766 additions and 4650 deletions
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
class EntityRegistry{
|
||||
class EntityRegistry{
|
||||
public static $entityList;
|
||||
|
||||
|
||||
/*Register all entities*/
|
||||
public static function registerEntities(){
|
||||
ConsoleAPI::info("Registering entities...");
|
||||
|
|
@ -25,13 +25,13 @@ class EntityRegistry{
|
|||
self::registerEntity(ThrownEgg::class);
|
||||
self::registerEntity(ThrownSnowball::class);
|
||||
}
|
||||
|
||||
|
||||
/*Register an Entity*/
|
||||
public static function registerEntity($className){
|
||||
$class = new \ReflectionClass($className);
|
||||
if(is_a($className, Entity::class, true) and !$class->isAbstract()){
|
||||
//self::$entityList[$className::TYPE] = $className;
|
||||
|
||||
|
||||
self::$entityList->addEntity(new PropertyEntity($className::CLASS_TYPE, $className::TYPE, $className));
|
||||
//self::$shortNames[$className] = $class->getShortName(); what is this even supposed to do?
|
||||
//console("[INFO] Registered a ".$className);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue