Added a getter

And a TODO
This commit is contained in:
Norbi Peti 2019-01-17 22:13:13 +01:00
parent cbbb5572b8
commit 2beb6662ea
No known key found for this signature in database
GPG key ID: DBA4C4549A927E56
2 changed files with 3 additions and 1 deletions

View file

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

View file

@ -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;
/**