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:
Adam
2020-05-28 14:45:22 -04:00
parent f5e99d5cb1
commit 7de65bbcf4

View File

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