Modules can set GUI items for compatible overlay plugins

This commit is contained in:
PikaMug 2021-02-17 03:20:48 -05:00
parent 016d87c13f
commit 21839c9284
3 changed files with 27 additions and 0 deletions

View File

@ -33,6 +33,7 @@ public abstract class CustomObjective implements Listener {
private String name = null;
private String author = null;
private String display = "Progress: %count%";
private final Map<String, Short> items = new HashMap<String, Short>();
private final LinkedList<Entry<String, Object>> data = new LinkedList<Entry<String, Object>>();
private final Map<String, String> descriptions = new HashMap<String, String>();
private String countPrompt = "Enter number";
@ -62,6 +63,14 @@ public abstract class CustomObjective implements Listener {
public void setDisplay(final String display) {
this.display = display;
}
public Map<String, Short> getItems() {
return items;
}
public void addItem(final String type, final short durability) {
this.items.put(type, durability);
}
public LinkedList<Entry<String, Object>> getData() {
return data;

View File

@ -22,6 +22,7 @@ public abstract class CustomRequirement {
private String name = null;
private String author = null;
private String display = null;
private final Map<String, Short> items = new HashMap<String, Short>();
private final Map<String, Object> data = new HashMap<String, Object>();
private final Map<String, String> descriptions = new HashMap<String, String>();
@ -50,6 +51,14 @@ public abstract class CustomRequirement {
public void setDisplay(final String display) {
this.display = display;
}
public Map<String, Short> getItems() {
return items;
}
public void addItem(final String type, final short durability) {
this.items.put(type, durability);
}
public Map<String, Object> getData() {
return data;

View File

@ -22,6 +22,7 @@ public abstract class CustomReward {
private String name = null;
private String author = null;
private String display = null;
private final Map<String, Short> items = new HashMap<String, Short>();
private final Map<String, Object> data = new HashMap<String, Object>();
private final Map<String, String> descriptions = new HashMap<String, String>();
@ -51,6 +52,14 @@ public abstract class CustomReward {
this.display = display;
}
public Map<String, Short> getItems() {
return items;
}
public void addItem(final String type, final short durability) {
this.items.put(type, durability);
}
/**
* @deprecated Use {@link #getDisplay()}
*/