Added a getter
And a TODO
This commit is contained in:
parent
cbbb5572b8
commit
2beb6662ea
2 changed files with 3 additions and 1 deletions
|
@ -66,7 +66,7 @@ public abstract class Component {
|
|||
val metaAnn = component.getClass().getAnnotation(ComponentMetadata.class);
|
||||
if (metaAnn != null) {
|
||||
Class<? extends Component>[] dependencies = metaAnn.depends();
|
||||
for (val dep : dependencies) {
|
||||
for (val dep : dependencies) { //TODO: Support dependencies at enable/disable as well
|
||||
if (!components.containsKey(dep)) {
|
||||
plugin.getLogger().warning("Failed to " + (register ? "" : "un") + "register component " + component.getClassName() + " as a required dependency is missing/disabled: " + dep.getSimpleName());
|
||||
return false;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package buttondevteam.lib.architecture;
|
||||
|
||||
import lombok.Getter;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
@ -10,6 +11,7 @@ import java.util.function.Function;
|
|||
*/
|
||||
public final class IHaveConfig {
|
||||
private final HashMap<String, ConfigData<?>> datamap = new HashMap<>();
|
||||
@Getter
|
||||
private ConfigurationSection config;
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue