code style fix

This commit is contained in:
Sunch 2025-04-27 20:36:24 +08:00
parent fc5c5625cb
commit 5e8e9330e2
361 changed files with 4766 additions and 4650 deletions

View file

@ -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);