mirror of
https://github.com/PikaMug/Quests.git
synced 2025-01-20 23:31:36 +01:00
Adjust module name and items
This commit is contained in:
parent
3d20f41add
commit
9da6fe3b4d
@ -33,7 +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<>();
|
||||
private Entry<String, Short> item = new AbstractMap.SimpleEntry<>("BOOK", (short) 0);
|
||||
private final LinkedList<Entry<String, Object>> data = new LinkedList<>();
|
||||
private final Map<String, String> descriptions = new HashMap<>();
|
||||
private String countPrompt = "Enter number";
|
||||
@ -45,10 +45,8 @@ public abstract class CustomObjective implements Listener {
|
||||
.replace(".jar", "");
|
||||
}
|
||||
|
||||
public Map<String, Short> getModuleItem() {
|
||||
final Map<String, Short> moduleItems = new HashMap<>();
|
||||
moduleItems.put("IRON_INGOT", (short) 0);
|
||||
return moduleItems;
|
||||
public Entry<String, Short> getModuleItem() {
|
||||
return new AbstractMap.SimpleEntry<>("IRON_INGOT", (short) 0);
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
@ -75,12 +73,19 @@ public abstract class CustomObjective implements Listener {
|
||||
this.display = display;
|
||||
}
|
||||
|
||||
public Map<String, Short> getItems() {
|
||||
return items;
|
||||
public Entry<String, Short> getItem() {
|
||||
return item;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #setItem(String, short)}
|
||||
*/
|
||||
public void addItem(final String type, final short durability) {
|
||||
this.items.put(type, durability);
|
||||
setItem(type, durability);
|
||||
}
|
||||
|
||||
public void setItem(final String type, final short durability) {
|
||||
this.item = new AbstractMap.SimpleEntry<>(type, durability);
|
||||
}
|
||||
|
||||
public LinkedList<Entry<String, Object>> getData() {
|
||||
|
@ -15,6 +15,7 @@ package me.blackvein.quests;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.AbstractMap;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@ -23,7 +24,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<>();
|
||||
private Map.Entry<String, Short> item = new AbstractMap.SimpleEntry<>("BOOK", (short) 0);
|
||||
private final Map<String, Object> data = new HashMap<>();
|
||||
private final Map<String, String> descriptions = new HashMap<>();
|
||||
|
||||
@ -34,10 +35,8 @@ public abstract class CustomRequirement {
|
||||
.replace(".jar", "");
|
||||
}
|
||||
|
||||
public Map<String, Short> getModuleItem() {
|
||||
final Map<String, Short> moduleItems = new HashMap<>();
|
||||
moduleItems.put("IRON_INGOT", (short) 0);
|
||||
return moduleItems;
|
||||
public Map.Entry<String, Short> getModuleItem() {
|
||||
return new AbstractMap.SimpleEntry<>("IRON_INGOT", (short) 0);
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
@ -64,12 +63,19 @@ public abstract class CustomRequirement {
|
||||
this.display = display;
|
||||
}
|
||||
|
||||
public Map<String, Short> getItems() {
|
||||
return items;
|
||||
public Map.Entry<String, Short> getItem() {
|
||||
return item;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #setItem(String, short)}
|
||||
*/
|
||||
public void addItem(final String type, final short durability) {
|
||||
this.items.put(type, durability);
|
||||
setItem(type, durability);
|
||||
}
|
||||
|
||||
public void setItem(final String type, final short durability) {
|
||||
this.item = new AbstractMap.SimpleEntry<>(type, durability);
|
||||
}
|
||||
|
||||
public Map<String, Object> getData() {
|
||||
|
@ -15,6 +15,7 @@ package me.blackvein.quests;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.AbstractMap;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@ -23,7 +24,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<>();
|
||||
private Map.Entry<String, Short> item = new AbstractMap.SimpleEntry<>("BOOK", (short) 0);
|
||||
private final Map<String, Object> data = new HashMap<>();
|
||||
private final Map<String, String> descriptions = new HashMap<>();
|
||||
|
||||
@ -34,10 +35,8 @@ public abstract class CustomReward {
|
||||
.replace(".jar", "");
|
||||
}
|
||||
|
||||
public Map<String, Short> getModuleItem() {
|
||||
final Map<String, Short> moduleItems = new HashMap<>();
|
||||
moduleItems.put("IRON_INGOT", (short) 0);
|
||||
return moduleItems;
|
||||
public Map.Entry<String, Short> getModuleItem() {
|
||||
return new AbstractMap.SimpleEntry<>("IRON_INGOT", (short) 0);
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
@ -64,12 +63,19 @@ public abstract class CustomReward {
|
||||
this.display = display;
|
||||
}
|
||||
|
||||
public Map<String, Short> getItems() {
|
||||
return items;
|
||||
public Map.Entry<String, Short> getItem() {
|
||||
return item;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #setItem(String, short)}
|
||||
*/
|
||||
public void addItem(final String type, final short durability) {
|
||||
this.items.put(type, durability);
|
||||
setItem(type, durability);
|
||||
}
|
||||
|
||||
public void setItem(final String type, final short durability) {
|
||||
this.item = new AbstractMap.SimpleEntry<>(type, durability);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user