mirror of
https://github.com/PikaMug/Quests.git
synced 2025-02-01 13:11:33 +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 name = null;
|
||||||
private String author = null;
|
private String author = null;
|
||||||
private String display = "Progress: %count%";
|
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 LinkedList<Entry<String, Object>> data = new LinkedList<>();
|
||||||
private final Map<String, String> descriptions = new HashMap<>();
|
private final Map<String, String> descriptions = new HashMap<>();
|
||||||
private String countPrompt = "Enter number";
|
private String countPrompt = "Enter number";
|
||||||
@ -45,10 +45,8 @@ public abstract class CustomObjective implements Listener {
|
|||||||
.replace(".jar", "");
|
.replace(".jar", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<String, Short> getModuleItem() {
|
public Entry<String, Short> getModuleItem() {
|
||||||
final Map<String, Short> moduleItems = new HashMap<>();
|
return new AbstractMap.SimpleEntry<>("IRON_INGOT", (short) 0);
|
||||||
moduleItems.put("IRON_INGOT", (short) 0);
|
|
||||||
return moduleItems;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
@ -75,12 +73,19 @@ public abstract class CustomObjective implements Listener {
|
|||||||
this.display = display;
|
this.display = display;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<String, Short> getItems() {
|
public Entry<String, Short> getItem() {
|
||||||
return items;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Use {@link #setItem(String, short)}
|
||||||
|
*/
|
||||||
public void addItem(final String type, final short durability) {
|
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() {
|
public LinkedList<Entry<String, Object>> getData() {
|
||||||
|
@ -15,6 +15,7 @@ package me.blackvein.quests;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.util.AbstractMap;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@ -23,7 +24,7 @@ public abstract class CustomRequirement {
|
|||||||
private String name = null;
|
private String name = null;
|
||||||
private String author = null;
|
private String author = null;
|
||||||
private String display = 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, Object> data = new HashMap<>();
|
||||||
private final Map<String, String> descriptions = new HashMap<>();
|
private final Map<String, String> descriptions = new HashMap<>();
|
||||||
|
|
||||||
@ -34,10 +35,8 @@ public abstract class CustomRequirement {
|
|||||||
.replace(".jar", "");
|
.replace(".jar", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<String, Short> getModuleItem() {
|
public Map.Entry<String, Short> getModuleItem() {
|
||||||
final Map<String, Short> moduleItems = new HashMap<>();
|
return new AbstractMap.SimpleEntry<>("IRON_INGOT", (short) 0);
|
||||||
moduleItems.put("IRON_INGOT", (short) 0);
|
|
||||||
return moduleItems;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
@ -64,12 +63,19 @@ public abstract class CustomRequirement {
|
|||||||
this.display = display;
|
this.display = display;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<String, Short> getItems() {
|
public Map.Entry<String, Short> getItem() {
|
||||||
return items;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Use {@link #setItem(String, short)}
|
||||||
|
*/
|
||||||
public void addItem(final String type, final short durability) {
|
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() {
|
public Map<String, Object> getData() {
|
||||||
|
@ -15,6 +15,7 @@ package me.blackvein.quests;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.util.AbstractMap;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@ -23,7 +24,7 @@ public abstract class CustomReward {
|
|||||||
private String name = null;
|
private String name = null;
|
||||||
private String author = null;
|
private String author = null;
|
||||||
private String display = 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, Object> data = new HashMap<>();
|
||||||
private final Map<String, String> descriptions = new HashMap<>();
|
private final Map<String, String> descriptions = new HashMap<>();
|
||||||
|
|
||||||
@ -34,10 +35,8 @@ public abstract class CustomReward {
|
|||||||
.replace(".jar", "");
|
.replace(".jar", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<String, Short> getModuleItem() {
|
public Map.Entry<String, Short> getModuleItem() {
|
||||||
final Map<String, Short> moduleItems = new HashMap<>();
|
return new AbstractMap.SimpleEntry<>("IRON_INGOT", (short) 0);
|
||||||
moduleItems.put("IRON_INGOT", (short) 0);
|
|
||||||
return moduleItems;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
@ -64,12 +63,19 @@ public abstract class CustomReward {
|
|||||||
this.display = display;
|
this.display = display;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<String, Short> getItems() {
|
public Map.Entry<String, Short> getItem() {
|
||||||
return items;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Use {@link #setItem(String, short)}
|
||||||
|
*/
|
||||||
public void addItem(final String type, final short durability) {
|
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