mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-12-22 09:08:03 +01:00
Addons API - Introducing foundations of this API. WIP
This commit is contained in:
parent
02c72d9506
commit
d776f6a90b
@ -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;
|
||||
}
|
||||
}
|
@ -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;
|
||||
}
|
||||
}
|
@ -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;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user