Components, components everywhere #56

Merged
NorbiPeti merged 7 commits from dev into master 2019-01-20 21:36:56 +00:00
2 changed files with 3 additions and 1 deletions
Showing only changes of commit 2beb6662ea - Show all commits

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