plugins: re-add enabledByDefault
This commit is contained in:
@@ -58,4 +58,6 @@ public @interface PluginDescriptor
|
|||||||
boolean loadWhenOutdated() default false;
|
boolean loadWhenOutdated() default false;
|
||||||
|
|
||||||
PluginType type() default PluginType.UNCATEGORIZED;
|
PluginType type() default PluginType.UNCATEGORIZED;
|
||||||
|
|
||||||
|
boolean enabledByDefault() default true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -462,7 +462,8 @@ public class PluginManager
|
|||||||
return Boolean.parseBoolean(value);
|
return Boolean.parseBoolean(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
final PluginDescriptor pluginDescriptor = plugin.getClass().getAnnotation(PluginDescriptor.class);
|
||||||
|
return pluginDescriptor == null || pluginDescriptor.enabledByDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
|
|||||||
Reference in New Issue
Block a user