Addons API - Introducing foundations of this API. WIP

This commit is contained in:
Florian CUNY 2017-12-10 21:42:04 +01:00
parent 02c72d9506
commit d776f6a90b
3 changed files with 76 additions and 0 deletions

View File

@ -0,0 +1,40 @@
package us.tastybento.bskyblock.api.addons;
import java.util.List;
public final class AddonDescription {
private String main;
private String name;
private String version;
private String description;
private List<String> authors;
public AddonDescription(String main, String name, String version, String description, List<String> authors) {
this.main = main;
this.name = name;
this.version = version;
this.description = description;
this.authors = authors;
}
public String getName() {
return name;
}
public String getMain() {
return main;
}
public String getVersion() {
return version;
}
public String getDescription() {
return description;
}
public List<String> getAuthors() {
return authors;
}
}

View File

@ -0,0 +1,13 @@
package us.tastybento.bskyblock.api.addons;
import java.util.ArrayList;
import java.util.List;
public final class AddonManager {
private final List<BSAddon> addons = new ArrayList<>();
public List<BSAddon> getAddons() {
return addons;
}
}

View File

@ -0,0 +1,23 @@
package us.tastybento.bskyblock.api.addons;
public abstract class BSAddon {
private AddonDescription description;
private boolean enabled;
public abstract void enable();
public abstract void disable();
public abstract void load();
public AddonDescription getDescription() {
return description;
}
public boolean isEnabled() {
return enabled;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
}