Fixed InventoryManager.LoadItems
This commit is contained in:
@@ -32,7 +32,7 @@ namespace reallife_gamemode.Server.Managers
|
|||||||
Type[] allTypes = Assembly.GetExecutingAssembly().GetTypes();
|
Type[] allTypes = Assembly.GetExecutingAssembly().GetTypes();
|
||||||
foreach (Type item in allTypes)
|
foreach (Type item in allTypes)
|
||||||
{
|
{
|
||||||
if (item.GetInterfaces().Contains((typeof(IItem))))
|
if (item.GetInterfaces().Contains((typeof(IItem))) && !item.IsAbstract)
|
||||||
{
|
{
|
||||||
NAPI.Util.ConsoleOutput($"Loading Item {item.Name}");
|
NAPI.Util.ConsoleOutput($"Loading Item {item.Name}");
|
||||||
if (Activator.CreateInstance(item) is IItem o)
|
if (Activator.CreateInstance(item) is IItem o)
|
||||||
|
|||||||
Reference in New Issue
Block a user