plugin manager: don't search child injector bindings for configs
This fixes plugins which have dependencies and no configuration from erronously having their deps config picked up, and also fixes defaults being applied multiple times to the same config on startup due to the configs being in the bindings of multiple injectors
This commit is contained in:
@@ -164,7 +164,7 @@ public class PluginManager
|
||||
{
|
||||
final Injector injector = plugin.getInjector();
|
||||
|
||||
for (Key<?> key : injector.getAllBindings().keySet())
|
||||
for (Key<?> key : injector.getBindings().keySet())
|
||||
{
|
||||
Class<?> type = key.getTypeLiteral().getRawType();
|
||||
if (Config.class.isAssignableFrom(type))
|
||||
@@ -197,7 +197,7 @@ public class PluginManager
|
||||
List<Config> list = new ArrayList<>();
|
||||
for (Injector injector : injectors)
|
||||
{
|
||||
for (Key<?> key : injector.getAllBindings().keySet())
|
||||
for (Key<?> key : injector.getBindings().keySet())
|
||||
{
|
||||
Class<?> type = key.getTypeLiteral().getRawType();
|
||||
if (Config.class.isAssignableFrom(type))
|
||||
|
||||
Reference in New Issue
Block a user