mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-26 12:46:18 +01:00
Replace block/item IDs with names
This commit is contained in:
parent
456ff174ba
commit
68e60e6111
@ -235,56 +235,56 @@ public class PlayerListener implements Listener, ColorUtil {
|
|||||||
Block block = evt.getClickedBlock();
|
Block block = evt.getClickedBlock();
|
||||||
Location loc = block.getLocation();
|
Location loc = block.getLocation();
|
||||||
plugin.questFactory.selectedBlockStarts.put(evt.getPlayer(), block);
|
plugin.questFactory.selectedBlockStarts.put(evt.getPlayer(), block);
|
||||||
evt.getPlayer().sendMessage(ChatColor.GOLD + Lang.get("questSelectedLocation") + " " + ChatColor.AQUA + loc.getWorld().getName() + ": " + loc.getX() + ", " + loc.getY() + ", " + loc.getZ() + ChatColor.GOLD + " (" + ChatColor.GREEN + Quester.prettyItemString(block.getType().getId()) + ChatColor.GOLD + ")");
|
evt.getPlayer().sendMessage(ChatColor.GOLD + Lang.get("questSelectedLocation") + " " + ChatColor.AQUA + loc.getWorld().getName() + ": " + loc.getX() + ", " + loc.getY() + ", " + loc.getZ() + ChatColor.GOLD + " (" + ChatColor.GREEN + Quester.prettyItemString(block.getType().name()) + ChatColor.GOLD + ")");
|
||||||
|
|
||||||
} else if (plugin.eventFactory.selectedExplosionLocations.containsKey(evt.getPlayer())) {
|
} else if (plugin.eventFactory.selectedExplosionLocations.containsKey(evt.getPlayer())) {
|
||||||
|
|
||||||
Block block = evt.getClickedBlock();
|
Block block = evt.getClickedBlock();
|
||||||
Location loc = block.getLocation();
|
Location loc = block.getLocation();
|
||||||
plugin.eventFactory.selectedExplosionLocations.put(evt.getPlayer(), block);
|
plugin.eventFactory.selectedExplosionLocations.put(evt.getPlayer(), block);
|
||||||
evt.getPlayer().sendMessage(ChatColor.GOLD + Lang.get("questSelectedLocation") + " " + ChatColor.AQUA + loc.getWorld().getName() + ": " + loc.getX() + ", " + loc.getY() + ", " + loc.getZ() + ChatColor.GOLD + " (" + ChatColor.GREEN + Quester.prettyItemString(block.getType().getId()) + ChatColor.GOLD + ")");
|
evt.getPlayer().sendMessage(ChatColor.GOLD + Lang.get("questSelectedLocation") + " " + ChatColor.AQUA + loc.getWorld().getName() + ": " + loc.getX() + ", " + loc.getY() + ", " + loc.getZ() + ChatColor.GOLD + " (" + ChatColor.GREEN + Quester.prettyItemString(block.getType().name()) + ChatColor.GOLD + ")");
|
||||||
|
|
||||||
} else if (plugin.eventFactory.selectedEffectLocations.containsKey(evt.getPlayer())) {
|
} else if (plugin.eventFactory.selectedEffectLocations.containsKey(evt.getPlayer())) {
|
||||||
|
|
||||||
Block block = evt.getClickedBlock();
|
Block block = evt.getClickedBlock();
|
||||||
Location loc = block.getLocation();
|
Location loc = block.getLocation();
|
||||||
plugin.eventFactory.selectedEffectLocations.put(evt.getPlayer(), block);
|
plugin.eventFactory.selectedEffectLocations.put(evt.getPlayer(), block);
|
||||||
evt.getPlayer().sendMessage(ChatColor.GOLD + Lang.get("questSelectedLocation") + " " + ChatColor.AQUA + loc.getWorld().getName() + ": " + loc.getX() + ", " + loc.getY() + ", " + loc.getZ() + ChatColor.GOLD + " (" + ChatColor.GREEN + Quester.prettyItemString(block.getType().getId()) + ChatColor.GOLD + ")");
|
evt.getPlayer().sendMessage(ChatColor.GOLD + Lang.get("questSelectedLocation") + " " + ChatColor.AQUA + loc.getWorld().getName() + ": " + loc.getX() + ", " + loc.getY() + ", " + loc.getZ() + ChatColor.GOLD + " (" + ChatColor.GREEN + Quester.prettyItemString(block.getType().name()) + ChatColor.GOLD + ")");
|
||||||
|
|
||||||
} else if (plugin.eventFactory.selectedMobLocations.containsKey(evt.getPlayer())) {
|
} else if (plugin.eventFactory.selectedMobLocations.containsKey(evt.getPlayer())) {
|
||||||
|
|
||||||
Block block = evt.getClickedBlock();
|
Block block = evt.getClickedBlock();
|
||||||
Location loc = block.getLocation();
|
Location loc = block.getLocation();
|
||||||
plugin.eventFactory.selectedMobLocations.put(evt.getPlayer(), block);
|
plugin.eventFactory.selectedMobLocations.put(evt.getPlayer(), block);
|
||||||
evt.getPlayer().sendMessage(ChatColor.GOLD + Lang.get("questSelectedLocation") + " " + ChatColor.AQUA + loc.getWorld().getName() + ": " + loc.getX() + ", " + loc.getY() + ", " + loc.getZ() + ChatColor.GOLD + " (" + ChatColor.GREEN + Quester.prettyItemString(block.getType().getId()) + ChatColor.GOLD + ")");
|
evt.getPlayer().sendMessage(ChatColor.GOLD + Lang.get("questSelectedLocation") + " " + ChatColor.AQUA + loc.getWorld().getName() + ": " + loc.getX() + ", " + loc.getY() + ", " + loc.getZ() + ChatColor.GOLD + " (" + ChatColor.GREEN + Quester.prettyItemString(block.getType().name()) + ChatColor.GOLD + ")");
|
||||||
|
|
||||||
} else if (plugin.eventFactory.selectedLightningLocations.containsKey(evt.getPlayer())) {
|
} else if (plugin.eventFactory.selectedLightningLocations.containsKey(evt.getPlayer())) {
|
||||||
|
|
||||||
Block block = evt.getClickedBlock();
|
Block block = evt.getClickedBlock();
|
||||||
Location loc = block.getLocation();
|
Location loc = block.getLocation();
|
||||||
plugin.eventFactory.selectedLightningLocations.put(evt.getPlayer(), block);
|
plugin.eventFactory.selectedLightningLocations.put(evt.getPlayer(), block);
|
||||||
evt.getPlayer().sendMessage(ChatColor.GOLD + Lang.get("questSelectedLocation") + " " + ChatColor.AQUA + loc.getWorld().getName() + ": " + loc.getX() + ", " + loc.getY() + ", " + loc.getZ() + ChatColor.GOLD + " (" + ChatColor.GREEN + Quester.prettyItemString(block.getType().getId()) + ChatColor.GOLD + ")");
|
evt.getPlayer().sendMessage(ChatColor.GOLD + Lang.get("questSelectedLocation") + " " + ChatColor.AQUA + loc.getWorld().getName() + ": " + loc.getX() + ", " + loc.getY() + ", " + loc.getZ() + ChatColor.GOLD + " (" + ChatColor.GREEN + Quester.prettyItemString(block.getType().name()) + ChatColor.GOLD + ")");
|
||||||
|
|
||||||
} else if (plugin.eventFactory.selectedTeleportLocations.containsKey(evt.getPlayer())) {
|
} else if (plugin.eventFactory.selectedTeleportLocations.containsKey(evt.getPlayer())) {
|
||||||
|
|
||||||
Block block = evt.getClickedBlock();
|
Block block = evt.getClickedBlock();
|
||||||
Location loc = block.getLocation();
|
Location loc = block.getLocation();
|
||||||
plugin.eventFactory.selectedTeleportLocations.put(evt.getPlayer(), block);
|
plugin.eventFactory.selectedTeleportLocations.put(evt.getPlayer(), block);
|
||||||
evt.getPlayer().sendMessage(ChatColor.GOLD + Lang.get("questSelectedLocation") + " " + ChatColor.AQUA + loc.getWorld().getName() + ": " + loc.getX() + ", " + loc.getY() + ", " + loc.getZ() + ChatColor.GOLD + " (" + ChatColor.GREEN + Quester.prettyItemString(block.getType().getId()) + ChatColor.GOLD + ")");
|
evt.getPlayer().sendMessage(ChatColor.GOLD + Lang.get("questSelectedLocation") + " " + ChatColor.AQUA + loc.getWorld().getName() + ": " + loc.getX() + ", " + loc.getY() + ", " + loc.getZ() + ChatColor.GOLD + " (" + ChatColor.GREEN + Quester.prettyItemString(block.getType().name()) + ChatColor.GOLD + ")");
|
||||||
|
|
||||||
} else if (plugin.questFactory.selectedKillLocations.containsKey(evt.getPlayer())) {
|
} else if (plugin.questFactory.selectedKillLocations.containsKey(evt.getPlayer())) {
|
||||||
|
|
||||||
Block block = evt.getClickedBlock();
|
Block block = evt.getClickedBlock();
|
||||||
Location loc = block.getLocation();
|
Location loc = block.getLocation();
|
||||||
plugin.questFactory.selectedKillLocations.put(evt.getPlayer(), block);
|
plugin.questFactory.selectedKillLocations.put(evt.getPlayer(), block);
|
||||||
evt.getPlayer().sendMessage(ChatColor.GOLD + Lang.get("questSelectedLocation") + " " + ChatColor.AQUA + loc.getWorld().getName() + ": " + loc.getX() + ", " + loc.getY() + ", " + loc.getZ() + ChatColor.GOLD + " (" + ChatColor.GREEN + Quester.prettyItemString(block.getType().getId()) + ChatColor.GOLD + ")");
|
evt.getPlayer().sendMessage(ChatColor.GOLD + Lang.get("questSelectedLocation") + " " + ChatColor.AQUA + loc.getWorld().getName() + ": " + loc.getX() + ", " + loc.getY() + ", " + loc.getZ() + ChatColor.GOLD + " (" + ChatColor.GREEN + Quester.prettyItemString(block.getType().name()) + ChatColor.GOLD + ")");
|
||||||
|
|
||||||
} else if (plugin.questFactory.selectedReachLocations.containsKey(evt.getPlayer())) {
|
} else if (plugin.questFactory.selectedReachLocations.containsKey(evt.getPlayer())) {
|
||||||
|
|
||||||
Block block = evt.getClickedBlock();
|
Block block = evt.getClickedBlock();
|
||||||
Location loc = block.getLocation();
|
Location loc = block.getLocation();
|
||||||
plugin.questFactory.selectedReachLocations.put(evt.getPlayer(), block);
|
plugin.questFactory.selectedReachLocations.put(evt.getPlayer(), block);
|
||||||
evt.getPlayer().sendMessage(ChatColor.GOLD + Lang.get("questSelectedLocation") + " " + ChatColor.AQUA + loc.getWorld().getName() + ": " + loc.getX() + ", " + loc.getY() + ", " + loc.getZ() + ChatColor.GOLD + " (" + ChatColor.GREEN + Quester.prettyItemString(block.getType().getId()) + ChatColor.GOLD + ")");
|
evt.getPlayer().sendMessage(ChatColor.GOLD + Lang.get("questSelectedLocation") + " " + ChatColor.AQUA + loc.getWorld().getName() + ": " + loc.getX() + ", " + loc.getY() + ", " + loc.getZ() + ChatColor.GOLD + " (" + ChatColor.GREEN + Quester.prettyItemString(block.getType().name()) + ChatColor.GOLD + ")");
|
||||||
|
|
||||||
} else if (player.isConversing() == false) {
|
} else if (player.isConversing() == false) {
|
||||||
|
|
||||||
|
@ -405,17 +405,17 @@ public class Quest {
|
|||||||
} else if (i.getDurability() != 0) {
|
} else if (i.getDurability() != 0) {
|
||||||
|
|
||||||
if (i.getEnchantments().isEmpty()) {
|
if (i.getEnchantments().isEmpty()) {
|
||||||
player.sendMessage("- " + ChatColor.DARK_GREEN + Quester.prettyItemString(i.getTypeId()) + ":" + i.getDurability() + ChatColor.GRAY + " x " + i.getAmount());
|
player.sendMessage("- " + ChatColor.DARK_GREEN + Quester.prettyItemString(i.getType().name()) + ":" + i.getDurability() + ChatColor.GRAY + " x " + i.getAmount());
|
||||||
} else {
|
} else {
|
||||||
player.sendMessage("- " + ChatColor.DARK_GREEN + Quester.prettyItemString(i.getTypeId()) + ":" + i.getDurability() + ChatColor.GRAY + " x " + i.getAmount() + ChatColor.DARK_PURPLE + " " + Lang.get("enchantedItem"));
|
player.sendMessage("- " + ChatColor.DARK_GREEN + Quester.prettyItemString(i.getType().name()) + ":" + i.getDurability() + ChatColor.GRAY + " x " + i.getAmount() + ChatColor.DARK_PURPLE + " " + Lang.get("enchantedItem"));
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (i.getEnchantments().isEmpty()) {
|
if (i.getEnchantments().isEmpty()) {
|
||||||
player.sendMessage("- " + ChatColor.DARK_GREEN + Quester.prettyItemString(i.getTypeId()) + ChatColor.GRAY + " x " + i.getAmount());
|
player.sendMessage("- " + ChatColor.DARK_GREEN + Quester.prettyItemString(i.getType().name()) + ChatColor.GRAY + " x " + i.getAmount());
|
||||||
} else {
|
} else {
|
||||||
player.sendMessage("- " + ChatColor.DARK_GREEN + Quester.prettyItemString(i.getTypeId()) + ChatColor.GRAY + " x " + i.getAmount() + ChatColor.DARK_PURPLE + " " + Lang.get("enchantedItem"));
|
player.sendMessage("- " + ChatColor.DARK_GREEN + Quester.prettyItemString(i.getType().name()) + ChatColor.GRAY + " x " + i.getAmount() + ChatColor.DARK_PURPLE + " " + Lang.get("enchantedItem"));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -436,17 +436,17 @@ public class Quest {
|
|||||||
} else if (i.getDurability() != 0) {
|
} else if (i.getDurability() != 0) {
|
||||||
|
|
||||||
if (i.getEnchantments().isEmpty()) {
|
if (i.getEnchantments().isEmpty()) {
|
||||||
player.sendMessage("- " + ChatColor.DARK_GREEN + Quester.prettyItemString(i.getTypeId()) + ":" + i.getDurability() + ChatColor.GRAY + " x " + i.getAmount());
|
player.sendMessage("- " + ChatColor.DARK_GREEN + Quester.prettyItemString(i.getType().name()) + ":" + i.getDurability() + ChatColor.GRAY + " x " + i.getAmount());
|
||||||
} else {
|
} else {
|
||||||
player.sendMessage("- " + ChatColor.DARK_GREEN + Quester.prettyItemString(i.getTypeId()) + ":" + i.getDurability() + ChatColor.GRAY + " x " + i.getAmount() + ChatColor.DARK_PURPLE + " " + Lang.get("enchantedItem"));
|
player.sendMessage("- " + ChatColor.DARK_GREEN + Quester.prettyItemString(i.getType().name()) + ":" + i.getDurability() + ChatColor.GRAY + " x " + i.getAmount() + ChatColor.DARK_PURPLE + " " + Lang.get("enchantedItem"));
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (i.getEnchantments().isEmpty()) {
|
if (i.getEnchantments().isEmpty()) {
|
||||||
player.sendMessage("- " + ChatColor.DARK_GREEN + Quester.prettyItemString(i.getTypeId()) + ChatColor.GRAY + " x " + i.getAmount());
|
player.sendMessage("- " + ChatColor.DARK_GREEN + Quester.prettyItemString(i.getType().name()) + ChatColor.GRAY + " x " + i.getAmount());
|
||||||
} else {
|
} else {
|
||||||
player.sendMessage("- " + ChatColor.DARK_GREEN + Quester.prettyItemString(i.getTypeId()) + ChatColor.GRAY + " x " + i.getAmount() + ChatColor.DARK_PURPLE + " " + Lang.get("enchantedItem"));
|
player.sendMessage("- " + ChatColor.DARK_GREEN + Quester.prettyItemString(i.getType().name()) + ChatColor.GRAY + " x " + i.getAmount() + ChatColor.DARK_PURPLE + " " + Lang.get("enchantedItem"));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -182,10 +182,10 @@ public class QuestData {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
public Map<Integer, Integer> potionsBrewed = new HashMap<Integer, Integer>() {
|
public Map<String, Integer> potionsBrewed = new HashMap<String, Integer>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer put(Integer key, Integer val) {
|
public Integer put(String key, Integer val) {
|
||||||
Integer data = super.put(key, val);
|
Integer data = super.put(key, val);
|
||||||
if (doJournalUpdate) quester.updateJournal();
|
if (doJournalUpdate) quester.updateJournal();
|
||||||
return data;
|
return data;
|
||||||
@ -205,7 +205,7 @@ public class QuestData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void putAll(Map<? extends Integer, ? extends Integer> m) {
|
public void putAll(Map<? extends String, ? extends Integer> m) {
|
||||||
super.putAll(m);
|
super.putAll(m);
|
||||||
if (doJournalUpdate) quester.updateJournal();
|
if (doJournalUpdate) quester.updateJournal();
|
||||||
}
|
}
|
||||||
|
@ -12,13 +12,12 @@ import java.util.LinkedList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import me.blackvein.quests.prompts.ItemStackPrompt;
|
|
||||||
|
|
||||||
|
import me.blackvein.quests.prompts.ItemStackPrompt;
|
||||||
import me.blackvein.quests.prompts.RequirementsPrompt;
|
import me.blackvein.quests.prompts.RequirementsPrompt;
|
||||||
import me.blackvein.quests.prompts.RewardsPrompt;
|
import me.blackvein.quests.prompts.RewardsPrompt;
|
||||||
import me.blackvein.quests.prompts.StagesPrompt;
|
import me.blackvein.quests.prompts.StagesPrompt;
|
||||||
import me.blackvein.quests.util.CK;
|
import me.blackvein.quests.util.CK;
|
||||||
import static me.blackvein.quests.util.ColorUtil.PURPLE;
|
|
||||||
import me.blackvein.quests.util.ItemUtil;
|
import me.blackvein.quests.util.ItemUtil;
|
||||||
import me.blackvein.quests.util.Lang;
|
import me.blackvein.quests.util.Lang;
|
||||||
import net.citizensnpcs.api.CitizensAPI;
|
import net.citizensnpcs.api.CitizensAPI;
|
||||||
@ -51,7 +50,7 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
|
|||||||
ConversationFactory convoCreator;
|
ConversationFactory convoCreator;
|
||||||
File questsFile;
|
File questsFile;
|
||||||
|
|
||||||
@SuppressWarnings("LeakingThisInConstructor")
|
//TODO - @SuppressWarnings("LeakingThisInConstructor")
|
||||||
public QuestFactory(Quests plugin) {
|
public QuestFactory(Quests plugin) {
|
||||||
|
|
||||||
quests = plugin;
|
quests = plugin;
|
||||||
@ -1085,6 +1084,7 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
public static void saveQuest(ConversationContext cc, ConfigurationSection cs) {
|
public static void saveQuest(ConversationContext cc, ConfigurationSection cs) {
|
||||||
|
|
||||||
String edit = null;
|
String edit = null;
|
||||||
@ -1459,28 +1459,28 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
|
|||||||
startMessage = null;
|
startMessage = null;
|
||||||
completeMessage = null;
|
completeMessage = null;
|
||||||
|
|
||||||
if (cc.getSessionData(pref + CK.S_BREAK_IDS) != null) {
|
if (cc.getSessionData(pref + CK.S_BREAK_NAMES) != null) {
|
||||||
breakIds = (LinkedList<Integer>) cc.getSessionData(pref + CK.S_BREAK_IDS);
|
breakIds = (LinkedList<Integer>) cc.getSessionData(pref + CK.S_BREAK_NAMES);
|
||||||
breakAmounts = (LinkedList<Integer>) cc.getSessionData(pref + CK.S_BREAK_AMOUNTS);
|
breakAmounts = (LinkedList<Integer>) cc.getSessionData(pref + CK.S_BREAK_AMOUNTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cc.getSessionData(pref + CK.S_DAMAGE_IDS) != null) {
|
if (cc.getSessionData(pref + CK.S_DAMAGE_NAMES) != null) {
|
||||||
damageIds = (LinkedList<Integer>) cc.getSessionData(pref + CK.S_DAMAGE_IDS);
|
damageIds = (LinkedList<Integer>) cc.getSessionData(pref + CK.S_DAMAGE_NAMES);
|
||||||
damageAmounts = (LinkedList<Integer>) cc.getSessionData(pref + CK.S_DAMAGE_AMOUNTS);
|
damageAmounts = (LinkedList<Integer>) cc.getSessionData(pref + CK.S_DAMAGE_AMOUNTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cc.getSessionData(pref + CK.S_PLACE_IDS) != null) {
|
if (cc.getSessionData(pref + CK.S_PLACE_NAMES) != null) {
|
||||||
placeIds = (LinkedList<Integer>) cc.getSessionData(pref + CK.S_PLACE_IDS);
|
placeIds = (LinkedList<Integer>) cc.getSessionData(pref + CK.S_PLACE_NAMES);
|
||||||
placeAmounts = (LinkedList<Integer>) cc.getSessionData(pref + CK.S_PLACE_AMOUNTS);
|
placeAmounts = (LinkedList<Integer>) cc.getSessionData(pref + CK.S_PLACE_AMOUNTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cc.getSessionData(pref + CK.S_USE_IDS) != null) {
|
if (cc.getSessionData(pref + CK.S_USE_NAMES) != null) {
|
||||||
useIds = (LinkedList<Integer>) cc.getSessionData(pref + CK.S_USE_IDS);
|
useIds = (LinkedList<Integer>) cc.getSessionData(pref + CK.S_USE_NAMES);
|
||||||
useAmounts = (LinkedList<Integer>) cc.getSessionData(pref + CK.S_USE_AMOUNTS);
|
useAmounts = (LinkedList<Integer>) cc.getSessionData(pref + CK.S_USE_AMOUNTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cc.getSessionData(pref + CK.S_CUT_IDS) != null) {
|
if (cc.getSessionData(pref + CK.S_CUT_NAMES) != null) {
|
||||||
cutIds = (LinkedList<Integer>) cc.getSessionData(pref + CK.S_CUT_IDS);
|
cutIds = (LinkedList<Integer>) cc.getSessionData(pref + CK.S_CUT_NAMES);
|
||||||
cutAmounts = (LinkedList<Integer>) cc.getSessionData(pref + CK.S_CUT_AMOUNTS);
|
cutAmounts = (LinkedList<Integer>) cc.getSessionData(pref + CK.S_CUT_AMOUNTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1494,7 +1494,7 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
|
|||||||
|
|
||||||
if (cc.getSessionData(pref + CK.S_ENCHANT_TYPES) != null) {
|
if (cc.getSessionData(pref + CK.S_ENCHANT_TYPES) != null) {
|
||||||
enchantments = (LinkedList<String>) cc.getSessionData(pref + CK.S_ENCHANT_TYPES);
|
enchantments = (LinkedList<String>) cc.getSessionData(pref + CK.S_ENCHANT_TYPES);
|
||||||
enchantmentIds = (LinkedList<Integer>) cc.getSessionData(pref + CK.S_ENCHANT_IDS);
|
enchantmentIds = (LinkedList<Integer>) cc.getSessionData(pref + CK.S_ENCHANT_NAMES);
|
||||||
enchantmentAmounts = (LinkedList<Integer>) cc.getSessionData(pref + CK.S_ENCHANT_AMOUNTS);
|
enchantmentAmounts = (LinkedList<Integer>) cc.getSessionData(pref + CK.S_ENCHANT_AMOUNTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1593,34 +1593,34 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (breakIds != null && breakIds.isEmpty() == false) {
|
if (breakIds != null && breakIds.isEmpty() == false) {
|
||||||
stage.set("break-block-ids", breakIds);
|
stage.set("break-block-names", breakIds);
|
||||||
stage.set("break-block-amounts", breakAmounts);
|
stage.set("break-block-amounts", breakAmounts);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (damageIds != null && damageIds.isEmpty() == false) {
|
if (damageIds != null && damageIds.isEmpty() == false) {
|
||||||
stage.set("damage-block-ids", damageIds);
|
stage.set("damage-block-names", damageIds);
|
||||||
stage.set("damage-block-amounts", damageAmounts);
|
stage.set("damage-block-amounts", damageAmounts);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (placeIds != null && placeIds.isEmpty() == false) {
|
if (placeIds != null && placeIds.isEmpty() == false) {
|
||||||
stage.set("place-block-ids", placeIds);
|
stage.set("place-block-names", placeIds);
|
||||||
stage.set("place-block-amounts", placeAmounts);
|
stage.set("place-block-amounts", placeAmounts);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (useIds != null && useIds.isEmpty() == false) {
|
if (useIds != null && useIds.isEmpty() == false) {
|
||||||
stage.set("use-block-ids", useIds);
|
stage.set("use-block-names", useIds);
|
||||||
stage.set("use-block-amounts", useAmounts);
|
stage.set("use-block-amounts", useAmounts);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cutIds != null && cutIds.isEmpty() == false) {
|
if (cutIds != null && cutIds.isEmpty() == false) {
|
||||||
stage.set("cut-block-ids", cutIds);
|
stage.set("cut-block-names", cutIds);
|
||||||
stage.set("cut-block-amounts", cutAmounts);
|
stage.set("cut-block-amounts", cutAmounts);
|
||||||
}
|
}
|
||||||
|
|
||||||
stage.set("fish-to-catch", fish);
|
stage.set("fish-to-catch", fish);
|
||||||
stage.set("players-to-kill", players);
|
stage.set("players-to-kill", players);
|
||||||
stage.set("enchantments", enchantments);
|
stage.set("enchantments", enchantments);
|
||||||
stage.set("enchantment-item-ids", enchantmentIds);
|
stage.set("enchantment-item-names", enchantmentIds);
|
||||||
stage.set("enchantment-amounts", enchantmentAmounts);
|
stage.set("enchantment-amounts", enchantmentAmounts);
|
||||||
if (deliveryItems != null && deliveryItems.isEmpty() == false) {
|
if (deliveryItems != null && deliveryItems.isEmpty() == false) {
|
||||||
LinkedList<String> items = new LinkedList<String>();
|
LinkedList<String> items = new LinkedList<String>();
|
||||||
@ -1712,7 +1712,7 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
|
|||||||
rews.set("commands", commandRews);
|
rews.set("commands", commandRews);
|
||||||
rews.set("mcmmo-skills", mcMMOSkillRews);
|
rews.set("mcmmo-skills", mcMMOSkillRews);
|
||||||
rews.set("mcmmo-levels", mcMMOSkillAmounts);
|
rews.set("mcmmo-levels", mcMMOSkillAmounts);
|
||||||
rews.set("rpgitem-ids", RPGItemRews);
|
rews.set("rpgitem-names", RPGItemRews);
|
||||||
rews.set("rpgitem-amounts", RPGItemAmounts);
|
rews.set("rpgitem-amounts", RPGItemAmounts);
|
||||||
rews.set("heroes-exp-classes", heroesClassRews);
|
rews.set("heroes-exp-classes", heroesClassRews);
|
||||||
rews.set("heroes-exp-amounts", heroesExpRews);
|
rews.set("heroes-exp-amounts", heroesExpRews);
|
||||||
@ -1881,85 +1881,85 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
|
|||||||
|
|
||||||
if (stage.blocksToBreak != null) {
|
if (stage.blocksToBreak != null) {
|
||||||
|
|
||||||
LinkedList<Integer> ids = new LinkedList<Integer>();
|
LinkedList<String> names = new LinkedList<String>();
|
||||||
LinkedList<Integer> amnts = new LinkedList<Integer>();
|
LinkedList<Integer> amnts = new LinkedList<Integer>();
|
||||||
|
|
||||||
for (Entry<Material, Integer> e : stage.blocksToBreak.entrySet()) {
|
for (Entry<Material, Integer> e : stage.blocksToBreak.entrySet()) {
|
||||||
|
|
||||||
ids.add(((Material) e.getKey()).getId());
|
names.add(((Material) e.getKey()).name());
|
||||||
amnts.add((Integer) e.getValue());
|
amnts.add((Integer) e.getValue());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cc.setSessionData(pref + CK.S_BREAK_IDS, ids);
|
cc.setSessionData(pref + CK.S_BREAK_NAMES, names);
|
||||||
cc.setSessionData(pref + CK.S_BREAK_AMOUNTS, amnts);
|
cc.setSessionData(pref + CK.S_BREAK_AMOUNTS, amnts);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stage.blocksToDamage != null) {
|
if (stage.blocksToDamage != null) {
|
||||||
|
|
||||||
LinkedList<Integer> ids = new LinkedList<Integer>();
|
LinkedList<String> names = new LinkedList<String>();
|
||||||
LinkedList<Integer> amnts = new LinkedList<Integer>();
|
LinkedList<Integer> amnts = new LinkedList<Integer>();
|
||||||
|
|
||||||
for (Entry<Material, Integer> e : stage.blocksToDamage.entrySet()) {
|
for (Entry<Material, Integer> e : stage.blocksToDamage.entrySet()) {
|
||||||
|
|
||||||
ids.add(((Material) e.getKey()).getId());
|
names.add(((Material) e.getKey()).name());
|
||||||
amnts.add((Integer) e.getValue());
|
amnts.add((Integer) e.getValue());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cc.setSessionData(pref + CK.S_DAMAGE_IDS, ids);
|
cc.setSessionData(pref + CK.S_DAMAGE_NAMES, names);
|
||||||
cc.setSessionData(pref + CK.S_DAMAGE_AMOUNTS, amnts);
|
cc.setSessionData(pref + CK.S_DAMAGE_AMOUNTS, amnts);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stage.blocksToPlace != null) {
|
if (stage.blocksToPlace != null) {
|
||||||
|
|
||||||
LinkedList<Integer> ids = new LinkedList<Integer>();
|
LinkedList<String> names = new LinkedList<String>();
|
||||||
LinkedList<Integer> amnts = new LinkedList<Integer>();
|
LinkedList<Integer> amnts = new LinkedList<Integer>();
|
||||||
|
|
||||||
for (Entry<Material, Integer> e : stage.blocksToPlace.entrySet()) {
|
for (Entry<Material, Integer> e : stage.blocksToPlace.entrySet()) {
|
||||||
|
|
||||||
ids.add(((Material) e.getKey()).getId());
|
names.add(((Material) e.getKey()).name());
|
||||||
amnts.add((Integer) e.getValue());
|
amnts.add((Integer) e.getValue());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cc.setSessionData(pref + CK.S_PLACE_IDS, ids);
|
cc.setSessionData(pref + CK.S_PLACE_NAMES, names);
|
||||||
cc.setSessionData(pref + CK.S_PLACE_AMOUNTS, amnts);
|
cc.setSessionData(pref + CK.S_PLACE_AMOUNTS, amnts);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stage.blocksToUse != null) {
|
if (stage.blocksToUse != null) {
|
||||||
|
|
||||||
LinkedList<Integer> ids = new LinkedList<Integer>();
|
LinkedList<String> names = new LinkedList<String>();
|
||||||
LinkedList<Integer> amnts = new LinkedList<Integer>();
|
LinkedList<Integer> amnts = new LinkedList<Integer>();
|
||||||
|
|
||||||
for (Entry<Material, Integer> e : stage.blocksToUse.entrySet()) {
|
for (Entry<Material, Integer> e : stage.blocksToUse.entrySet()) {
|
||||||
|
|
||||||
ids.add(((Material) e.getKey()).getId());
|
names.add(((Material) e.getKey()).name());
|
||||||
amnts.add((Integer) e.getValue());
|
amnts.add((Integer) e.getValue());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cc.setSessionData(pref + CK.S_USE_IDS, ids);
|
cc.setSessionData(pref + CK.S_USE_NAMES, names);
|
||||||
cc.setSessionData(pref + CK.S_USE_AMOUNTS, amnts);
|
cc.setSessionData(pref + CK.S_USE_AMOUNTS, amnts);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stage.blocksToCut != null) {
|
if (stage.blocksToCut != null) {
|
||||||
|
|
||||||
LinkedList<Integer> ids = new LinkedList<Integer>();
|
LinkedList<String> names = new LinkedList<String>();
|
||||||
LinkedList<Integer> amnts = new LinkedList<Integer>();
|
LinkedList<Integer> amnts = new LinkedList<Integer>();
|
||||||
|
|
||||||
for (Entry<Material, Integer> e : stage.blocksToCut.entrySet()) {
|
for (Entry<Material, Integer> e : stage.blocksToCut.entrySet()) {
|
||||||
|
|
||||||
ids.add(((Material) e.getKey()).getId());
|
names.add(((Material) e.getKey()).name());
|
||||||
amnts.add((Integer) e.getValue());
|
amnts.add((Integer) e.getValue());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cc.setSessionData(pref + CK.S_CUT_IDS, ids);
|
cc.setSessionData(pref + CK.S_CUT_NAMES, names);
|
||||||
cc.setSessionData(pref + CK.S_CUT_AMOUNTS, amnts);
|
cc.setSessionData(pref + CK.S_CUT_AMOUNTS, amnts);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1975,7 +1975,7 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
|
|||||||
if (stage.itemsToEnchant.isEmpty() == false) {
|
if (stage.itemsToEnchant.isEmpty() == false) {
|
||||||
|
|
||||||
LinkedList<String> enchants = new LinkedList<String>();
|
LinkedList<String> enchants = new LinkedList<String>();
|
||||||
LinkedList<Integer> ids = new LinkedList<Integer>();
|
LinkedList<String> names = new LinkedList<String>();
|
||||||
LinkedList<Integer> amounts = new LinkedList<Integer>();
|
LinkedList<Integer> amounts = new LinkedList<Integer>();
|
||||||
|
|
||||||
for (Entry<Map<Enchantment, Material>, Integer> e : stage.itemsToEnchant.entrySet()) {
|
for (Entry<Map<Enchantment, Material>, Integer> e : stage.itemsToEnchant.entrySet()) {
|
||||||
@ -1983,7 +1983,7 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
|
|||||||
amounts.add(e.getValue());
|
amounts.add(e.getValue());
|
||||||
for (Entry<Enchantment, Material> e2 : e.getKey().entrySet()) {
|
for (Entry<Enchantment, Material> e2 : e.getKey().entrySet()) {
|
||||||
|
|
||||||
ids.add(e2.getValue().getId());
|
names.add(e2.getValue().name());
|
||||||
enchants.add(Quester.prettyEnchantmentString(e2.getKey()));
|
enchants.add(Quester.prettyEnchantmentString(e2.getKey()));
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1991,7 +1991,7 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
cc.setSessionData(pref + CK.S_ENCHANT_TYPES, enchants);
|
cc.setSessionData(pref + CK.S_ENCHANT_TYPES, enchants);
|
||||||
cc.setSessionData(pref + CK.S_ENCHANT_IDS, ids);
|
cc.setSessionData(pref + CK.S_ENCHANT_NAMES, names);
|
||||||
cc.setSessionData(pref + CK.S_ENCHANT_AMOUNTS, amounts);
|
cc.setSessionData(pref + CK.S_ENCHANT_AMOUNTS, amounts);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -42,6 +42,8 @@ public class Quester {
|
|||||||
public String questToTake;
|
public String questToTake;
|
||||||
public LinkedHashMap<Quest, Integer> currentQuests = new LinkedHashMap<Quest, Integer>() {
|
public LinkedHashMap<Quest, Integer> currentQuests = new LinkedHashMap<Quest, Integer>() {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 6361484975823846780L;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer put(Quest key, Integer val) {
|
public Integer put(Quest key, Integer val) {
|
||||||
Integer data = super.put(key, val);
|
Integer data = super.put(key, val);
|
||||||
@ -73,6 +75,8 @@ public class Quester {
|
|||||||
Quests plugin;
|
Quests plugin;
|
||||||
public LinkedList<String> completedQuests = new LinkedList<String>() {
|
public LinkedList<String> completedQuests = new LinkedList<String>() {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -269110128568487000L;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean add(String e) {
|
public boolean add(String e) {
|
||||||
boolean b = super.add(e);
|
boolean b = super.add(e);
|
||||||
@ -133,6 +137,8 @@ public class Quester {
|
|||||||
|
|
||||||
Map<String, Integer> amountsCompleted = new HashMap<String, Integer>() {
|
Map<String, Integer> amountsCompleted = new HashMap<String, Integer>() {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 5475202358792520975L;
|
||||||
|
|
||||||
public void hardClear() {
|
public void hardClear() {
|
||||||
super.clear();
|
super.clear();
|
||||||
}
|
}
|
||||||
@ -168,6 +174,8 @@ public class Quester {
|
|||||||
|
|
||||||
Map<Quest, QuestData> questData = new HashMap<Quest, QuestData>() {
|
Map<Quest, QuestData> questData = new HashMap<Quest, QuestData>() {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -4607112433003926066L;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public QuestData put(Quest key, QuestData val) {
|
public QuestData put(Quest key, QuestData val) {
|
||||||
QuestData data = super.put(key, val);
|
QuestData data = super.put(key, val);
|
||||||
@ -415,11 +423,11 @@ public class Quester {
|
|||||||
|
|
||||||
if (e2.getValue() < e.getValue()) {
|
if (e2.getValue() < e.getValue()) {
|
||||||
|
|
||||||
unfinishedObjectives.add(ChatColor.GREEN + Lang.get("damage") + " " + Quester.prettyItemString(e2.getKey().getId()) + ": " + e2.getValue() + "/" + e.getValue());
|
unfinishedObjectives.add(ChatColor.GREEN + Lang.get("damage") + " " + Quester.prettyItemString(e2.getKey().name()) + ": " + e2.getValue() + "/" + e.getValue());
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
finishedObjectives.add(ChatColor.GRAY + Lang.get("damage") + " " + Quester.prettyItemString(e2.getKey().getId()) + ": " + e2.getValue() + "/" + e.getValue());
|
finishedObjectives.add(ChatColor.GRAY + Lang.get("damage") + " " + Quester.prettyItemString(e2.getKey().name()) + ": " + e2.getValue() + "/" + e.getValue());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -437,11 +445,11 @@ public class Quester {
|
|||||||
|
|
||||||
if (e2.getValue() < e.getValue()) {
|
if (e2.getValue() < e.getValue()) {
|
||||||
|
|
||||||
unfinishedObjectives.add(ChatColor.GREEN + Lang.get("break") + " " + Quester.prettyItemString(e2.getKey().getId()) + ": " + e2.getValue() + "/" + e.getValue());
|
unfinishedObjectives.add(ChatColor.GREEN + Lang.get("break") + " " + Quester.prettyItemString(e2.getKey().name()) + ": " + e2.getValue() + "/" + e.getValue());
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
finishedObjectives.add(ChatColor.GRAY + Lang.get("break") + " " + Quester.prettyItemString(e2.getKey().getId()) + ": " + e2.getValue() + "/" + e.getValue());
|
finishedObjectives.add(ChatColor.GRAY + Lang.get("break") + " " + Quester.prettyItemString(e2.getKey().name()) + ": " + e2.getValue() + "/" + e.getValue());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -459,11 +467,11 @@ public class Quester {
|
|||||||
|
|
||||||
if (e2.getValue() < e.getValue()) {
|
if (e2.getValue() < e.getValue()) {
|
||||||
|
|
||||||
unfinishedObjectives.add(ChatColor.GREEN + Lang.get("place") + " " + Quester.prettyItemString(e2.getKey().getId()) + ": " + e2.getValue() + "/" + e.getValue());
|
unfinishedObjectives.add(ChatColor.GREEN + Lang.get("place") + " " + Quester.prettyItemString(e2.getKey().name()) + ": " + e2.getValue() + "/" + e.getValue());
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
finishedObjectives.add(ChatColor.GRAY + Lang.get("place") + " " + Quester.prettyItemString(e2.getKey().getId()) + ": " + e2.getValue() + "/" + e.getValue());
|
finishedObjectives.add(ChatColor.GRAY + Lang.get("place") + " " + Quester.prettyItemString(e2.getKey().name()) + ": " + e2.getValue() + "/" + e.getValue());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -481,11 +489,11 @@ public class Quester {
|
|||||||
|
|
||||||
if (e2.getValue() < e.getValue()) {
|
if (e2.getValue() < e.getValue()) {
|
||||||
|
|
||||||
unfinishedObjectives.add(ChatColor.GREEN + Lang.get("use") + " " + Quester.prettyItemString(e2.getKey().getId()) + ": " + e2.getValue() + "/" + e.getValue());
|
unfinishedObjectives.add(ChatColor.GREEN + Lang.get("use") + " " + Quester.prettyItemString(e2.getKey().name()) + ": " + e2.getValue() + "/" + e.getValue());
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
finishedObjectives.add(ChatColor.GRAY + Lang.get("use") + " " + Quester.prettyItemString(e2.getKey().getId()) + ": " + e2.getValue() + "/" + e.getValue());
|
finishedObjectives.add(ChatColor.GRAY + Lang.get("use") + " " + Quester.prettyItemString(e2.getKey().name()) + ": " + e2.getValue() + "/" + e.getValue());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -503,11 +511,11 @@ public class Quester {
|
|||||||
|
|
||||||
if (e2.getValue() < e.getValue()) {
|
if (e2.getValue() < e.getValue()) {
|
||||||
|
|
||||||
unfinishedObjectives.add(ChatColor.GREEN + Lang.get("cut") + " " + Quester.prettyItemString(e2.getKey().getId()) + ": " + e2.getValue() + "/" + e.getValue());
|
unfinishedObjectives.add(ChatColor.GREEN + Lang.get("cut") + " " + Quester.prettyItemString(e2.getKey().name()) + ": " + e2.getValue() + "/" + e.getValue());
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
finishedObjectives.add(ChatColor.GRAY + Lang.get("cut") + " " + Quester.prettyItemString(e2.getKey().getId()) + ": " + e2.getValue() + "/" + e.getValue());
|
finishedObjectives.add(ChatColor.GRAY + Lang.get("cut") + " " + Quester.prettyItemString(e2.getKey().name()) + ": " + e2.getValue() + "/" + e.getValue());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -576,14 +584,14 @@ public class Quester {
|
|||||||
if (num1 < num2) {
|
if (num1 < num2) {
|
||||||
|
|
||||||
String obj = Lang.get("enchantItem");
|
String obj = Lang.get("enchantItem");
|
||||||
obj = obj.replaceAll("<item>", Quester.prettyItemString(mat.getId()));
|
obj = obj.replaceAll("<item>", Quester.prettyItemString(mat.name()));
|
||||||
obj = obj.replaceAll("<enchantment>", Quester.prettyEnchantmentString(enchantment));
|
obj = obj.replaceAll("<enchantment>", Quester.prettyEnchantmentString(enchantment));
|
||||||
unfinishedObjectives.add(ChatColor.GREEN + obj + ": " + num1 + "/" + num2);
|
unfinishedObjectives.add(ChatColor.GREEN + obj + ": " + num1 + "/" + num2);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
String obj = Lang.get("enchantItem");
|
String obj = Lang.get("enchantItem");
|
||||||
obj = obj.replaceAll("<item>", Quester.prettyItemString(mat.getId()));
|
obj = obj.replaceAll("<item>", Quester.prettyItemString(mat.name()));
|
||||||
obj = obj.replaceAll("<enchantment>", Quester.prettyEnchantmentString(enchantment));
|
obj = obj.replaceAll("<enchantment>", Quester.prettyEnchantmentString(enchantment));
|
||||||
finishedObjectives.add(ChatColor.GRAY + obj + ": " + num1 + "/" + num2);
|
finishedObjectives.add(ChatColor.GRAY + obj + ": " + num1 + "/" + num2);
|
||||||
|
|
||||||
@ -1350,7 +1358,7 @@ public class Quester {
|
|||||||
|
|
||||||
} else if (objective.equalsIgnoreCase("damageBlock")) {
|
} else if (objective.equalsIgnoreCase("damageBlock")) {
|
||||||
|
|
||||||
String message = ChatColor.GREEN + "(" + Lang.get("completed") + ") " + Lang.get("damage") + " " + prettyItemString(material.getId());
|
String message = ChatColor.GREEN + "(" + Lang.get("completed") + ") " + Lang.get("damage") + " " + prettyItemString(material.name());
|
||||||
message = message + " " + getCurrentStage(quest).blocksToDamage.get(material) + "/" + getCurrentStage(quest).blocksToDamage.get(material);
|
message = message + " " + getCurrentStage(quest).blocksToDamage.get(material) + "/" + getCurrentStage(quest).blocksToDamage.get(material);
|
||||||
p.sendMessage(message);
|
p.sendMessage(message);
|
||||||
if (testComplete(quest)) {
|
if (testComplete(quest)) {
|
||||||
@ -1359,7 +1367,7 @@ public class Quester {
|
|||||||
|
|
||||||
} else if (objective.equalsIgnoreCase("breakBlock")) {
|
} else if (objective.equalsIgnoreCase("breakBlock")) {
|
||||||
|
|
||||||
String message = ChatColor.GREEN + "(" + Lang.get("completed") + ") " + Lang.get("break") + " " + prettyItemString(material.getId());
|
String message = ChatColor.GREEN + "(" + Lang.get("completed") + ") " + Lang.get("break") + " " + prettyItemString(material.name());
|
||||||
message = message + " " + getCurrentStage(quest).blocksToBreak.get(material) + "/" + getCurrentStage(quest).blocksToBreak.get(material);
|
message = message + " " + getCurrentStage(quest).blocksToBreak.get(material) + "/" + getCurrentStage(quest).blocksToBreak.get(material);
|
||||||
p.sendMessage(message);
|
p.sendMessage(message);
|
||||||
if (testComplete(quest)) {
|
if (testComplete(quest)) {
|
||||||
@ -1368,7 +1376,7 @@ public class Quester {
|
|||||||
|
|
||||||
} else if (objective.equalsIgnoreCase("placeBlock")) {
|
} else if (objective.equalsIgnoreCase("placeBlock")) {
|
||||||
|
|
||||||
String message = ChatColor.GREEN + "(" + Lang.get("completed") + ") " + Lang.get("place") + " " + prettyItemString(material.getId());
|
String message = ChatColor.GREEN + "(" + Lang.get("completed") + ") " + Lang.get("place") + " " + prettyItemString(material.name());
|
||||||
message = message + " " + getCurrentStage(quest).blocksToPlace.get(material) + "/" + getCurrentStage(quest).blocksToPlace.get(material);
|
message = message + " " + getCurrentStage(quest).blocksToPlace.get(material) + "/" + getCurrentStage(quest).blocksToPlace.get(material);
|
||||||
p.sendMessage(message);
|
p.sendMessage(message);
|
||||||
if (testComplete(quest)) {
|
if (testComplete(quest)) {
|
||||||
@ -1377,7 +1385,7 @@ public class Quester {
|
|||||||
|
|
||||||
} else if (objective.equalsIgnoreCase("useBlock")) {
|
} else if (objective.equalsIgnoreCase("useBlock")) {
|
||||||
|
|
||||||
String message = ChatColor.GREEN + "(" + Lang.get("completed") + ") " + Lang.get("use") + " " + prettyItemString(material.getId());
|
String message = ChatColor.GREEN + "(" + Lang.get("completed") + ") " + Lang.get("use") + " " + prettyItemString(material.name());
|
||||||
message = message + " " + getCurrentStage(quest).blocksToUse.get(material) + "/" + getCurrentStage(quest).blocksToUse.get(material);
|
message = message + " " + getCurrentStage(quest).blocksToUse.get(material) + "/" + getCurrentStage(quest).blocksToUse.get(material);
|
||||||
p.sendMessage(message);
|
p.sendMessage(message);
|
||||||
if (testComplete(quest)) {
|
if (testComplete(quest)) {
|
||||||
@ -1386,7 +1394,7 @@ public class Quester {
|
|||||||
|
|
||||||
} else if (objective.equalsIgnoreCase("cutBlock")) {
|
} else if (objective.equalsIgnoreCase("cutBlock")) {
|
||||||
|
|
||||||
String message = ChatColor.GREEN + "(" + Lang.get("completed") + ") " + Lang.get("cut") + " " + prettyItemString(material.getId());
|
String message = ChatColor.GREEN + "(" + Lang.get("completed") + ") " + Lang.get("cut") + " " + prettyItemString(material.name());
|
||||||
message = message + " " + getCurrentStage(quest).blocksToCut.get(material) + "/" + getCurrentStage(quest).blocksToCut.get(material);
|
message = message + " " + getCurrentStage(quest).blocksToCut.get(material) + "/" + getCurrentStage(quest).blocksToCut.get(material);
|
||||||
p.sendMessage(message);
|
p.sendMessage(message);
|
||||||
if (testComplete(quest)) {
|
if (testComplete(quest)) {
|
||||||
@ -1405,7 +1413,7 @@ public class Quester {
|
|||||||
} else if (objective.equalsIgnoreCase("enchantItem")) {
|
} else if (objective.equalsIgnoreCase("enchantItem")) {
|
||||||
|
|
||||||
String obj = Lang.get("enchantItem");
|
String obj = Lang.get("enchantItem");
|
||||||
obj = obj.replaceAll("<item>", prettyItemString(material.getId()));
|
obj = obj.replaceAll("<item>", prettyItemString(material.name()));
|
||||||
obj = obj.replaceAll("<enchantment>", Quester.prettyEnchantmentString(enchantment));
|
obj = obj.replaceAll("<enchantment>", Quester.prettyEnchantmentString(enchantment));
|
||||||
String message = ChatColor.GREEN + "(" + Lang.get("completed") + ") " + obj;
|
String message = ChatColor.GREEN + "(" + Lang.get("completed") + ") " + obj;
|
||||||
for (Map<Enchantment, Material> map : getCurrentStage(quest).itemsToEnchant.keySet()) {
|
for (Map<Enchantment, Material> map : getCurrentStage(quest).itemsToEnchant.keySet()) {
|
||||||
@ -1850,8 +1858,8 @@ public class Quester {
|
|||||||
return capitalized;
|
return capitalized;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String prettyItemString(int itemID) {
|
public static String prettyItemString(String itemName) {
|
||||||
String baseString = Material.getMaterial(itemID).toString();
|
String baseString = Material.getMaterial(itemName).toString();
|
||||||
String[] substrings = baseString.split("_");
|
String[] substrings = baseString.split("_");
|
||||||
String prettyString = "";
|
String prettyString = "";
|
||||||
int size = 1;
|
int size = 1;
|
||||||
@ -2070,75 +2078,75 @@ public class Quester {
|
|||||||
|
|
||||||
if (getQuestData(quest).blocksDamaged.isEmpty() == false) {
|
if (getQuestData(quest).blocksDamaged.isEmpty() == false) {
|
||||||
|
|
||||||
LinkedList<Integer> blockIds = new LinkedList<Integer>();
|
LinkedList<String> blockNames = new LinkedList<String>();
|
||||||
LinkedList<Integer> blockAmounts = new LinkedList<Integer>();
|
LinkedList<Integer> blockAmounts = new LinkedList<Integer>();
|
||||||
|
|
||||||
for (Material m : getQuestData(quest).blocksDamaged.keySet()) {
|
for (Material m : getQuestData(quest).blocksDamaged.keySet()) {
|
||||||
blockIds.add(m.getId());
|
blockNames.add(m.name());
|
||||||
blockAmounts.add(getQuestData(quest).blocksDamaged.get(m));
|
blockAmounts.add(getQuestData(quest).blocksDamaged.get(m));
|
||||||
}
|
}
|
||||||
|
|
||||||
questSec.set("blocks-damaged-ids", blockIds);
|
questSec.set("blocks-damaged-names", blockNames);
|
||||||
questSec.set("blocks-damaged-amounts", blockAmounts);
|
questSec.set("blocks-damaged-amounts", blockAmounts);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getQuestData(quest).blocksBroken.isEmpty() == false) {
|
if (getQuestData(quest).blocksBroken.isEmpty() == false) {
|
||||||
|
|
||||||
LinkedList<Integer> blockIds = new LinkedList<Integer>();
|
LinkedList<String> blockNames = new LinkedList<String>();
|
||||||
LinkedList<Integer> blockAmounts = new LinkedList<Integer>();
|
LinkedList<Integer> blockAmounts = new LinkedList<Integer>();
|
||||||
|
|
||||||
for (Material m : getQuestData(quest).blocksBroken.keySet()) {
|
for (Material m : getQuestData(quest).blocksBroken.keySet()) {
|
||||||
blockIds.add(m.getId());
|
blockNames.add(m.name());
|
||||||
blockAmounts.add(getQuestData(quest).blocksBroken.get(m));
|
blockAmounts.add(getQuestData(quest).blocksBroken.get(m));
|
||||||
}
|
}
|
||||||
|
|
||||||
questSec.set("blocks-broken-ids", blockIds);
|
questSec.set("blocks-broken-names", blockNames);
|
||||||
questSec.set("blocks-broken-amounts", blockAmounts);
|
questSec.set("blocks-broken-amounts", blockAmounts);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getQuestData(quest).blocksPlaced.isEmpty() == false) {
|
if (getQuestData(quest).blocksPlaced.isEmpty() == false) {
|
||||||
|
|
||||||
LinkedList<Integer> blockIds = new LinkedList<Integer>();
|
LinkedList<String> blockNames = new LinkedList<String>();
|
||||||
LinkedList<Integer> blockAmounts = new LinkedList<Integer>();
|
LinkedList<Integer> blockAmounts = new LinkedList<Integer>();
|
||||||
|
|
||||||
for (Material m : getQuestData(quest).blocksPlaced.keySet()) {
|
for (Material m : getQuestData(quest).blocksPlaced.keySet()) {
|
||||||
blockIds.add(m.getId());
|
blockNames.add(m.name());
|
||||||
blockAmounts.add(getQuestData(quest).blocksPlaced.get(m));
|
blockAmounts.add(getQuestData(quest).blocksPlaced.get(m));
|
||||||
}
|
}
|
||||||
|
|
||||||
questSec.set("blocks-placed-ids", blockIds);
|
questSec.set("blocks-placed-names", blockNames);
|
||||||
questSec.set("blocks-placed-amounts", blockAmounts);
|
questSec.set("blocks-placed-amounts", blockAmounts);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getQuestData(quest).blocksUsed.isEmpty() == false) {
|
if (getQuestData(quest).blocksUsed.isEmpty() == false) {
|
||||||
|
|
||||||
LinkedList<Integer> blockIds = new LinkedList<Integer>();
|
LinkedList<String> blockNames = new LinkedList<String>();
|
||||||
LinkedList<Integer> blockAmounts = new LinkedList<Integer>();
|
LinkedList<Integer> blockAmounts = new LinkedList<Integer>();
|
||||||
|
|
||||||
for (Material m : getQuestData(quest).blocksUsed.keySet()) {
|
for (Material m : getQuestData(quest).blocksUsed.keySet()) {
|
||||||
blockIds.add(m.getId());
|
blockNames.add(m.name());
|
||||||
blockAmounts.add(getQuestData(quest).blocksUsed.get(m));
|
blockAmounts.add(getQuestData(quest).blocksUsed.get(m));
|
||||||
}
|
}
|
||||||
|
|
||||||
questSec.set("blocks-used-ids", blockIds);
|
questSec.set("blocks-used-names", blockNames);
|
||||||
questSec.set("blocks-used-amounts", blockAmounts);
|
questSec.set("blocks-used-amounts", blockAmounts);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getQuestData(quest).blocksCut.isEmpty() == false) {
|
if (getQuestData(quest).blocksCut.isEmpty() == false) {
|
||||||
|
|
||||||
LinkedList<Integer> blockIds = new LinkedList<Integer>();
|
LinkedList<String> blockNames = new LinkedList<String>();
|
||||||
LinkedList<Integer> blockAmounts = new LinkedList<Integer>();
|
LinkedList<Integer> blockAmounts = new LinkedList<Integer>();
|
||||||
|
|
||||||
for (Material m : getQuestData(quest).blocksCut.keySet()) {
|
for (Material m : getQuestData(quest).blocksCut.keySet()) {
|
||||||
blockIds.add(m.getId());
|
blockNames.add(m.name());
|
||||||
blockAmounts.add(getQuestData(quest).blocksCut.get(m));
|
blockAmounts.add(getQuestData(quest).blocksCut.get(m));
|
||||||
}
|
}
|
||||||
|
|
||||||
questSec.set("blocks-cut-ids", blockIds);
|
questSec.set("blocks-cut-names", blockNames);
|
||||||
questSec.set("blocks-cut-amounts", blockAmounts);
|
questSec.set("blocks-cut-amounts", blockAmounts);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -2154,7 +2162,7 @@ public class Quester {
|
|||||||
if (getQuestData(quest).itemsEnchanted.isEmpty() == false) {
|
if (getQuestData(quest).itemsEnchanted.isEmpty() == false) {
|
||||||
|
|
||||||
LinkedList<String> enchantments = new LinkedList<String>();
|
LinkedList<String> enchantments = new LinkedList<String>();
|
||||||
LinkedList<Integer> itemIds = new LinkedList<Integer>();
|
LinkedList<String> itemNames = new LinkedList<String>();
|
||||||
LinkedList<Integer> enchAmounts = new LinkedList<Integer>();
|
LinkedList<Integer> enchAmounts = new LinkedList<Integer>();
|
||||||
|
|
||||||
for (Entry<Map<Enchantment, Material>, Integer> e : getQuestData(quest).itemsEnchanted.entrySet()) {
|
for (Entry<Map<Enchantment, Material>, Integer> e : getQuestData(quest).itemsEnchanted.entrySet()) {
|
||||||
@ -2164,14 +2172,14 @@ public class Quester {
|
|||||||
for (Entry<Enchantment, Material> e2 : enchMap.entrySet()) {
|
for (Entry<Enchantment, Material> e2 : enchMap.entrySet()) {
|
||||||
|
|
||||||
enchantments.add(Quester.prettyEnchantmentString((Enchantment) e2.getKey()));
|
enchantments.add(Quester.prettyEnchantmentString((Enchantment) e2.getKey()));
|
||||||
itemIds.add(((Material) e2.getValue()).getId());
|
itemNames.add(((Material) e2.getValue()).name());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
questSec.set("enchantments", enchantments);
|
questSec.set("enchantments", enchantments);
|
||||||
questSec.set("enchantment-item-ids", itemIds);
|
questSec.set("enchantment-item-names", itemNames);
|
||||||
questSec.set("times-enchanted", enchAmounts);
|
questSec.set("times-enchanted", enchAmounts);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -2293,17 +2301,17 @@ public class Quester {
|
|||||||
|
|
||||||
if (getQuestData(quest).potionsBrewed.isEmpty() == false) {
|
if (getQuestData(quest).potionsBrewed.isEmpty() == false) {
|
||||||
|
|
||||||
LinkedList<Integer> potionIds = new LinkedList<Integer>();
|
LinkedList<String> potionNames = new LinkedList<String>();
|
||||||
LinkedList<Integer> potionAmounts = new LinkedList<Integer>();
|
LinkedList<Integer> potionAmounts = new LinkedList<Integer>();
|
||||||
|
|
||||||
for (Entry<Integer, Integer> entry : getQuestData(quest).potionsBrewed.entrySet()) {
|
for (Entry<String, Integer> entry : getQuestData(quest).potionsBrewed.entrySet()) {
|
||||||
|
|
||||||
potionIds.add(entry.getKey());
|
potionNames.add(entry.getKey());
|
||||||
potionAmounts.add(entry.getValue());
|
potionAmounts.add(entry.getValue());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
questSec.set("potions-brewed-ids", potionIds);
|
questSec.set("potions-brewed-names", potionNames);
|
||||||
questSec.set("potions-brewed-amounts", potionAmounts);
|
questSec.set("potions-brewed-amounts", potionAmounts);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -2577,66 +2585,66 @@ public class Quester {
|
|||||||
|
|
||||||
addEmpties(quest);
|
addEmpties(quest);
|
||||||
|
|
||||||
if (questSec.contains("blocks-damaged-ids")) {
|
if (questSec.contains("blocks-damaged-names")) {
|
||||||
|
|
||||||
List<Integer> ids = questSec.getIntegerList("blocks-damaged-ids");
|
List<String> names = questSec.getStringList("blocks-damaged-names");
|
||||||
List<Integer> amounts = questSec.getIntegerList("blocks-damaged-amounts");
|
List<Integer> amounts = questSec.getIntegerList("blocks-damaged-amounts");
|
||||||
|
|
||||||
for (int i : ids) {
|
for (String s : names) {
|
||||||
|
|
||||||
getQuestData(quest).blocksDamaged.put(Material.getMaterial(i), amounts.get(ids.indexOf(i)));
|
getQuestData(quest).blocksDamaged.put(Material.matchMaterial(s), amounts.get(names.indexOf(s)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (questSec.contains("blocks-broken-ids")) {
|
if (questSec.contains("blocks-broken-names")) {
|
||||||
|
|
||||||
List<Integer> ids = questSec.getIntegerList("blocks-broken-ids");
|
List<String> names = questSec.getStringList("blocks-broken-names");
|
||||||
List<Integer> amounts = questSec.getIntegerList("blocks-broken-amounts");
|
List<Integer> amounts = questSec.getIntegerList("blocks-broken-amounts");
|
||||||
|
|
||||||
for (int i : ids) {
|
for (String s : names) {
|
||||||
|
|
||||||
getQuestData(quest).blocksBroken.put(Material.getMaterial(i), amounts.get(ids.indexOf(i)));
|
getQuestData(quest).blocksBroken.put(Material.matchMaterial(s), amounts.get(names.indexOf(s)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (questSec.contains("blocks-placed-ids")) {
|
if (questSec.contains("blocks-placed-names")) {
|
||||||
|
|
||||||
List<Integer> ids = questSec.getIntegerList("blocks-placed-ids");
|
List<String> names = questSec.getStringList("blocks-placed-names");
|
||||||
List<Integer> amounts = questSec.getIntegerList("blocks-placed-amounts");
|
List<Integer> amounts = questSec.getIntegerList("blocks-placed-amounts");
|
||||||
|
|
||||||
for (int i : ids) {
|
for (String s : names) {
|
||||||
|
|
||||||
getQuestData(quest).blocksPlaced.put(Material.getMaterial(i), amounts.get(ids.indexOf(i)));
|
getQuestData(quest).blocksPlaced.put(Material.matchMaterial(s), amounts.get(names.indexOf(s)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (questSec.contains("blocks-used-ids")) {
|
if (questSec.contains("blocks-used-names")) {
|
||||||
|
|
||||||
List<Integer> ids = questSec.getIntegerList("blocks-used-ids");
|
List<String> names = questSec.getStringList("blocks-used-names");
|
||||||
List<Integer> amounts = questSec.getIntegerList("blocks-used-amounts");
|
List<Integer> amounts = questSec.getIntegerList("blocks-used-amounts");
|
||||||
|
|
||||||
for (int i : ids) {
|
for (String s : names) {
|
||||||
|
|
||||||
getQuestData(quest).blocksUsed.put(Material.getMaterial(i), amounts.get(ids.indexOf(i)));
|
getQuestData(quest).blocksUsed.put(Material.matchMaterial(s), amounts.get(names.indexOf(s)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (questSec.contains("blocks-cut-ids")) {
|
if (questSec.contains("blocks-cut-names")) {
|
||||||
|
|
||||||
List<Integer> ids = questSec.getIntegerList("blocks-cut-ids");
|
List<String> names = questSec.getStringList("blocks-cut-names");
|
||||||
List<Integer> amounts = questSec.getIntegerList("blocks-cut-amounts");
|
List<Integer> amounts = questSec.getIntegerList("blocks-cut-amounts");
|
||||||
|
|
||||||
for (int i : ids) {
|
for (String s : names) {
|
||||||
|
|
||||||
getQuestData(quest).blocksCut.put(Material.getMaterial(i), amounts.get(ids.indexOf(i)));
|
getQuestData(quest).blocksCut.put(Material.matchMaterial(s), amounts.get(names.indexOf(s)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2668,14 +2676,14 @@ public class Quester {
|
|||||||
LinkedList<Integer> amounts = new LinkedList<Integer>();
|
LinkedList<Integer> amounts = new LinkedList<Integer>();
|
||||||
|
|
||||||
List<String> enchantNames = questSec.getStringList("enchantments");
|
List<String> enchantNames = questSec.getStringList("enchantments");
|
||||||
List<Integer> ids = questSec.getIntegerList("enchantment-item-ids");
|
List<String> names = questSec.getStringList("enchantment-item-names");
|
||||||
List<Integer> times = questSec.getIntegerList("times-enchanted");
|
List<Integer> times = questSec.getIntegerList("times-enchanted");
|
||||||
|
|
||||||
for (String s : enchantNames) {
|
for (String s : enchantNames) {
|
||||||
|
|
||||||
enchantments.add(Quests.getEnchantment(s));
|
enchantments.add(Quests.getEnchantment(s));
|
||||||
|
|
||||||
materials.add(Material.getMaterial(ids.get(enchantNames.indexOf(s))));
|
materials.add(Material.matchMaterial(names.get(enchantNames.indexOf(s))));
|
||||||
amounts.add(times.get(enchantNames.indexOf(s)));
|
amounts.add(times.get(enchantNames.indexOf(s)));
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -2819,14 +2827,14 @@ public class Quester {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (questSec.contains("potions-brewed-ids")) {
|
if (questSec.contains("potions-brewed-names")) {
|
||||||
|
|
||||||
List<Integer> ids = questSec.getIntegerList("potions-brewed-ids");
|
List<String> names = questSec.getStringList("potions-brewed-names");
|
||||||
List<Integer> amounts = questSec.getIntegerList("potions-brewed-amounts");
|
List<Integer> amounts = questSec.getIntegerList("potions-brewed-amounts");
|
||||||
|
|
||||||
for (int i : ids) {
|
for (String s : names) {
|
||||||
|
|
||||||
getQuestData(quest).potionsBrewed.put(i, amounts.get(ids.indexOf(i)));
|
getQuestData(quest).potionsBrewed.put(s, amounts.get(names.indexOf(s)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2926,51 +2934,51 @@ public static ConfigurationSection getLegacyQuestData(FileConfiguration questSec
|
|||||||
|
|
||||||
ConfigurationSection newData = questSec.createSection("questData");
|
ConfigurationSection newData = questSec.createSection("questData");
|
||||||
|
|
||||||
if (questSec.contains("blocks-damaged-ids")) {
|
if (questSec.contains("blocks-damaged-names")) {
|
||||||
|
|
||||||
List<Integer> ids = questSec.getIntegerList("blocks-damaged-ids");
|
List<String> names = questSec.getStringList("blocks-damaged-names");
|
||||||
List<Integer> amounts = questSec.getIntegerList("blocks-damaged-amounts");
|
List<Integer> amounts = questSec.getIntegerList("blocks-damaged-amounts");
|
||||||
|
|
||||||
newData.set(questName + ".blocks-damaged-ids", ids);
|
newData.set(questName + ".blocks-damaged-names", names);
|
||||||
newData.set(questName + ".blocks-damaged-amounts", amounts);
|
newData.set(questName + ".blocks-damaged-amounts", amounts);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (questSec.contains("blocks-broken-ids")) {
|
if (questSec.contains("blocks-broken-names")) {
|
||||||
|
|
||||||
List<Integer> ids = questSec.getIntegerList("blocks-broken-ids");
|
List<String> names = questSec.getStringList("blocks-broken-names");
|
||||||
List<Integer> amounts = questSec.getIntegerList("blocks-broken-amounts");
|
List<Integer> amounts = questSec.getIntegerList("blocks-broken-amounts");
|
||||||
|
|
||||||
newData.set(questName + ".blocks-broken-ids", ids);
|
newData.set(questName + ".blocks-broken-names", names);
|
||||||
newData.set(questName + ".blocks-broken-amounts", amounts);
|
newData.set(questName + ".blocks-broken-amounts", amounts);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (questSec.contains("blocks-placed-ids")) {
|
if (questSec.contains("blocks-placed-names")) {
|
||||||
|
|
||||||
List<Integer> ids = questSec.getIntegerList("blocks-placed-ids");
|
List<String> names = questSec.getStringList("blocks-placed-names");
|
||||||
List<Integer> amounts = questSec.getIntegerList("blocks-placed-amounts");
|
List<Integer> amounts = questSec.getIntegerList("blocks-placed-amounts");
|
||||||
|
|
||||||
newData.set(questName + ".blocks-placed-ids", ids);
|
newData.set(questName + ".blocks-placed-names", names);
|
||||||
newData.set(questName + ".blocks-placed-amounts", amounts);
|
newData.set(questName + ".blocks-placed-amounts", amounts);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (questSec.contains("blocks-used-ids")) {
|
if (questSec.contains("blocks-used-names")) {
|
||||||
|
|
||||||
List<Integer> ids = questSec.getIntegerList("blocks-used-ids");
|
List<String> names = questSec.getStringList("blocks-used-names");
|
||||||
List<Integer> amounts = questSec.getIntegerList("blocks-used-amounts");
|
List<Integer> amounts = questSec.getIntegerList("blocks-used-amounts");
|
||||||
|
|
||||||
newData.set(questName + ".blocks-used-ids", ids);
|
newData.set(questName + ".blocks-used-names", names);
|
||||||
newData.set(questName + ".blocks-used-amounts", amounts);
|
newData.set(questName + ".blocks-used-amounts", amounts);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (questSec.contains("blocks-cut-ids")) {
|
if (questSec.contains("blocks-cut-names")) {
|
||||||
|
|
||||||
List<Integer> ids = questSec.getIntegerList("blocks-cut-ids");
|
List<String> names = questSec.getStringList("blocks-cut-names");
|
||||||
List<Integer> amounts = questSec.getIntegerList("blocks-cut-amounts");
|
List<Integer> amounts = questSec.getIntegerList("blocks-cut-amounts");
|
||||||
|
|
||||||
newData.set(questName + ".blocks-cut-ids", ids);
|
newData.set(questName + ".blocks-cut-names", names);
|
||||||
newData.set(questName + ".blocks-cut-amounts", amounts);
|
newData.set(questName + ".blocks-cut-amounts", amounts);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -2993,11 +3001,11 @@ public static ConfigurationSection getLegacyQuestData(FileConfiguration questSec
|
|||||||
if (questSec.contains("enchantments")) {
|
if (questSec.contains("enchantments")) {
|
||||||
|
|
||||||
List<String> enchantNames = questSec.getStringList("enchantments");
|
List<String> enchantNames = questSec.getStringList("enchantments");
|
||||||
List<Integer> ids = questSec.getIntegerList("enchantment-item-ids");
|
List<String> names = questSec.getStringList("enchantment-item-names");
|
||||||
List<Integer> times = questSec.getIntegerList("times-enchanted");
|
List<Integer> times = questSec.getIntegerList("times-enchanted");
|
||||||
|
|
||||||
newData.set(questName + ".enchantments", enchantNames);
|
newData.set(questName + ".enchantments", enchantNames);
|
||||||
newData.set(questName + ".enchantment-item-ids", ids);
|
newData.set(questName + ".enchantment-item-names", names);
|
||||||
newData.set(questName + ".times-enchanted", times);
|
newData.set(questName + ".times-enchanted", times);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -3062,12 +3070,12 @@ public static ConfigurationSection getLegacyQuestData(FileConfiguration questSec
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (questSec.contains("potions-brewed-ids")) {
|
if (questSec.contains("potions-brewed-names")) {
|
||||||
|
|
||||||
List<Integer> ids = questSec.getIntegerList("potions-brewed-ids");
|
List<String> names = questSec.getStringList("potions-brewed-names");
|
||||||
List<Integer> amounts = questSec.getIntegerList("potions-brewed-amounts");
|
List<Integer> amounts = questSec.getIntegerList("potions-brewed-amounts");
|
||||||
|
|
||||||
newData.set(questName + ".potions-brewed-ids", ids);
|
newData.set(questName + ".potions-brewed-names", names);
|
||||||
newData.set(questName + ".potions-brewed-amounts", amounts);
|
newData.set(questName + ".potions-brewed-amounts", amounts);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -27,7 +27,6 @@ import org.bukkit.inventory.meta.ItemMeta;
|
|||||||
public class ItemStackPrompt extends FixedSetPrompt implements ColorUtil {
|
public class ItemStackPrompt extends FixedSetPrompt implements ColorUtil {
|
||||||
|
|
||||||
//Stores itemstack in "tempStack" context data.
|
//Stores itemstack in "tempStack" context data.
|
||||||
//Stores id in "tempId"
|
|
||||||
//Stores amount in "tempAmount"
|
//Stores amount in "tempAmount"
|
||||||
//Stores data in "tempData"
|
//Stores data in "tempData"
|
||||||
//Stores enchantments in "tempEnchantments"
|
//Stores enchantments in "tempEnchantments"
|
||||||
@ -45,7 +44,7 @@ public class ItemStackPrompt extends FixedSetPrompt implements ColorUtil {
|
|||||||
@Override
|
@Override
|
||||||
public String getPromptText(ConversationContext cc) {
|
public String getPromptText(ConversationContext cc) {
|
||||||
String menu = YELLOW + Lang.get("createItemTitle") + "\n";
|
String menu = YELLOW + Lang.get("createItemTitle") + "\n";
|
||||||
if (cc.getSessionData("tempId") != null) {
|
if (cc.getSessionData("tempName") != null) {
|
||||||
String stackData = getItemData(cc);
|
String stackData = getItemData(cc);
|
||||||
if (stackData != null) {
|
if (stackData != null) {
|
||||||
menu += stackData;
|
menu += stackData;
|
||||||
@ -65,6 +64,7 @@ public class ItemStackPrompt extends FixedSetPrompt implements ColorUtil {
|
|||||||
return menu;
|
return menu;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
protected Prompt acceptValidatedInput(ConversationContext cc, String input) {
|
protected Prompt acceptValidatedInput(ConversationContext cc, String input) {
|
||||||
|
|
||||||
@ -83,8 +83,6 @@ public class ItemStackPrompt extends FixedSetPrompt implements ColorUtil {
|
|||||||
cc.setSessionData("tempEnchantments", null);
|
cc.setSessionData("tempEnchantments", null);
|
||||||
cc.setSessionData("tempName", null);
|
cc.setSessionData("tempName", null);
|
||||||
cc.setSessionData("tempLore", null);
|
cc.setSessionData("tempLore", null);
|
||||||
|
|
||||||
cc.setSessionData("tempId", is.getTypeId());
|
|
||||||
cc.setSessionData("tempAmount", is.getAmount());
|
cc.setSessionData("tempAmount", is.getAmount());
|
||||||
if (is.getDurability() != 0) {
|
if (is.getDurability() != 0) {
|
||||||
cc.setSessionData("tempData", is.getDurability());
|
cc.setSessionData("tempData", is.getDurability());
|
||||||
@ -115,7 +113,7 @@ public class ItemStackPrompt extends FixedSetPrompt implements ColorUtil {
|
|||||||
return new IDPrompt();
|
return new IDPrompt();
|
||||||
} else if (input.equalsIgnoreCase("2")) {
|
} else if (input.equalsIgnoreCase("2")) {
|
||||||
|
|
||||||
if (cc.getSessionData("tempId") != null) {
|
if (cc.getSessionData("tempName") != null) {
|
||||||
return new AmountPrompt();
|
return new AmountPrompt();
|
||||||
} else {
|
} else {
|
||||||
cc.getForWhom().sendRawMessage(RED + Lang.get("itemCreateNoID"));
|
cc.getForWhom().sendRawMessage(RED + Lang.get("itemCreateNoID"));
|
||||||
@ -124,7 +122,7 @@ public class ItemStackPrompt extends FixedSetPrompt implements ColorUtil {
|
|||||||
|
|
||||||
} else if (input.equalsIgnoreCase("3")) {
|
} else if (input.equalsIgnoreCase("3")) {
|
||||||
|
|
||||||
if (cc.getSessionData("tempId") != null && cc.getSessionData("tempAmount") != null) {
|
if (cc.getSessionData("tempName") != null && cc.getSessionData("tempAmount") != null) {
|
||||||
return new DataPrompt();
|
return new DataPrompt();
|
||||||
} else {
|
} else {
|
||||||
cc.getForWhom().sendRawMessage(RED + Lang.get("itemCreateNoIDAmount"));
|
cc.getForWhom().sendRawMessage(RED + Lang.get("itemCreateNoIDAmount"));
|
||||||
@ -133,7 +131,7 @@ public class ItemStackPrompt extends FixedSetPrompt implements ColorUtil {
|
|||||||
|
|
||||||
} else if (input.equalsIgnoreCase("4")) {
|
} else if (input.equalsIgnoreCase("4")) {
|
||||||
|
|
||||||
if (cc.getSessionData("tempId") != null && cc.getSessionData("tempAmount") != null) {
|
if (cc.getSessionData("tempName") != null && cc.getSessionData("tempAmount") != null) {
|
||||||
return new EnchantmentPrompt();
|
return new EnchantmentPrompt();
|
||||||
} else {
|
} else {
|
||||||
cc.getForWhom().sendRawMessage(RED + Lang.get("itemCreateNoIDAmount"));
|
cc.getForWhom().sendRawMessage(RED + Lang.get("itemCreateNoIDAmount"));
|
||||||
@ -142,7 +140,7 @@ public class ItemStackPrompt extends FixedSetPrompt implements ColorUtil {
|
|||||||
|
|
||||||
} else if (input.equalsIgnoreCase("5")) {
|
} else if (input.equalsIgnoreCase("5")) {
|
||||||
|
|
||||||
if (cc.getSessionData("tempId") != null && cc.getSessionData("tempAmount") != null) {
|
if (cc.getSessionData("tempName") != null && cc.getSessionData("tempAmount") != null) {
|
||||||
return new NamePrompt();
|
return new NamePrompt();
|
||||||
} else {
|
} else {
|
||||||
cc.getForWhom().sendRawMessage(RED + Lang.get("itemCreateNoIDAmount"));
|
cc.getForWhom().sendRawMessage(RED + Lang.get("itemCreateNoIDAmount"));
|
||||||
@ -151,7 +149,7 @@ public class ItemStackPrompt extends FixedSetPrompt implements ColorUtil {
|
|||||||
|
|
||||||
} else if (input.equalsIgnoreCase("6")) {
|
} else if (input.equalsIgnoreCase("6")) {
|
||||||
|
|
||||||
if (cc.getSessionData("tempId") != null && cc.getSessionData("tempAmount") != null) {
|
if (cc.getSessionData("tempName") != null && cc.getSessionData("tempAmount") != null) {
|
||||||
return new LorePrompt();
|
return new LorePrompt();
|
||||||
} else {
|
} else {
|
||||||
cc.getForWhom().sendRawMessage(RED + Lang.get("itemCreateNoIDAmount"));
|
cc.getForWhom().sendRawMessage(RED + Lang.get("itemCreateNoIDAmount"));
|
||||||
@ -161,7 +159,6 @@ public class ItemStackPrompt extends FixedSetPrompt implements ColorUtil {
|
|||||||
} else if (input.equalsIgnoreCase("7")) {
|
} else if (input.equalsIgnoreCase("7")) {
|
||||||
|
|
||||||
cc.setSessionData("tempStack", null);
|
cc.setSessionData("tempStack", null);
|
||||||
cc.setSessionData("tempId", null);
|
|
||||||
cc.setSessionData("tempAmount", null);
|
cc.setSessionData("tempAmount", null);
|
||||||
cc.setSessionData("tempData", null);
|
cc.setSessionData("tempData", null);
|
||||||
cc.setSessionData("tempEnchantments", null);
|
cc.setSessionData("tempEnchantments", null);
|
||||||
@ -170,9 +167,8 @@ public class ItemStackPrompt extends FixedSetPrompt implements ColorUtil {
|
|||||||
|
|
||||||
} else if (input.equalsIgnoreCase("8")) {
|
} else if (input.equalsIgnoreCase("8")) {
|
||||||
|
|
||||||
if (cc.getSessionData("tempId") != null && cc.getSessionData("tempAmount") != null) {
|
if (cc.getSessionData("tempName") != null && cc.getSessionData("tempAmount") != null) {
|
||||||
|
|
||||||
int id = (Integer) cc.getSessionData("tempId");
|
|
||||||
int amount = (Integer) cc.getSessionData("tempAmount");
|
int amount = (Integer) cc.getSessionData("tempAmount");
|
||||||
short data = -1;
|
short data = -1;
|
||||||
Map<Enchantment, Integer> enchs = null;
|
Map<Enchantment, Integer> enchs = null;
|
||||||
@ -192,7 +188,7 @@ public class ItemStackPrompt extends FixedSetPrompt implements ColorUtil {
|
|||||||
lore = (LinkedList<String>) cc.getSessionData("tempLore");
|
lore = (LinkedList<String>) cc.getSessionData("tempLore");
|
||||||
}
|
}
|
||||||
|
|
||||||
ItemStack stack = new ItemStack(id, amount);
|
ItemStack stack = new ItemStack(Material.matchMaterial(name), amount);
|
||||||
ItemMeta meta = stack.getItemMeta();
|
ItemMeta meta = stack.getItemMeta();
|
||||||
|
|
||||||
if (data != -1) {
|
if (data != -1) {
|
||||||
@ -256,7 +252,7 @@ public class ItemStackPrompt extends FixedSetPrompt implements ColorUtil {
|
|||||||
return new IDPrompt();
|
return new IDPrompt();
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
cc.setSessionData("tempId", mat.getId());
|
cc.setSessionData("tempName", mat.name());
|
||||||
cc.setSessionData("tempAmount", 1);
|
cc.setSessionData("tempAmount", 1);
|
||||||
|
|
||||||
if (dataString != null) {
|
if (dataString != null) {
|
||||||
@ -425,6 +421,7 @@ public class ItemStackPrompt extends FixedSetPrompt implements ColorUtil {
|
|||||||
|
|
||||||
if (cc.getSessionData("tempEnchantments") != null) {
|
if (cc.getSessionData("tempEnchantments") != null) {
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
Map<Enchantment, Integer> enchs = (Map<Enchantment, Integer>) cc.getSessionData("tempEnchantments");
|
Map<Enchantment, Integer> enchs = (Map<Enchantment, Integer>) cc.getSessionData("tempEnchantments");
|
||||||
enchs.put((Enchantment) cc.getSessionData("tempEnchant"), num);
|
enchs.put((Enchantment) cc.getSessionData("tempEnchant"), num);
|
||||||
cc.setSessionData("tempEnchantments", enchs);
|
cc.setSessionData("tempEnchantments", enchs);
|
||||||
@ -508,14 +505,14 @@ public class ItemStackPrompt extends FixedSetPrompt implements ColorUtil {
|
|||||||
|
|
||||||
private String getItemData(ConversationContext cc) {
|
private String getItemData(ConversationContext cc) {
|
||||||
|
|
||||||
if (cc.getSessionData("tempId") != null) {
|
if (cc.getSessionData("tempName") != null) {
|
||||||
|
|
||||||
String item;
|
String item;
|
||||||
|
|
||||||
if (cc.getSessionData("tempName") == null) {
|
if (cc.getSessionData("tempName") == null) {
|
||||||
|
|
||||||
Integer id = (Integer) cc.getSessionData("tempId");
|
String name = (String) cc.getSessionData("tempName");
|
||||||
item = AQUA + Quester.prettyItemString(id);
|
item = AQUA + Quester.prettyItemString(name);
|
||||||
|
|
||||||
if (cc.getSessionData("tempData") != null) {
|
if (cc.getSessionData("tempData") != null) {
|
||||||
item += ":" + BLUE + (Short) cc.getSessionData("tempData");
|
item += ":" + BLUE + (Short) cc.getSessionData("tempData");
|
||||||
@ -524,8 +521,8 @@ public class ItemStackPrompt extends FixedSetPrompt implements ColorUtil {
|
|||||||
} else {
|
} else {
|
||||||
|
|
||||||
item = PINK + "" + ITALIC + (String) cc.getSessionData("tempName") + RESET + "" + GRAY + " (";
|
item = PINK + "" + ITALIC + (String) cc.getSessionData("tempName") + RESET + "" + GRAY + " (";
|
||||||
Integer id = (Integer) cc.getSessionData("tempId");
|
String name = (String) cc.getSessionData("tempName");
|
||||||
item += AQUA + Quester.prettyItemString(id);
|
item += AQUA + Quester.prettyItemString(name);
|
||||||
if (cc.getSessionData("tempData") != null) {
|
if (cc.getSessionData("tempData") != null) {
|
||||||
item += ":" + BLUE + (Short) cc.getSessionData("tempData");
|
item += ":" + BLUE + (Short) cc.getSessionData("tempData");
|
||||||
}
|
}
|
||||||
@ -543,6 +540,7 @@ public class ItemStackPrompt extends FixedSetPrompt implements ColorUtil {
|
|||||||
|
|
||||||
if (cc.getSessionData("tempEnchantments") != null) {
|
if (cc.getSessionData("tempEnchantments") != null) {
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
Map<Enchantment, Integer> enchantments = (Map<Enchantment, Integer>) cc.getSessionData("tempEnchantments");
|
Map<Enchantment, Integer> enchantments = (Map<Enchantment, Integer>) cc.getSessionData("tempEnchantments");
|
||||||
for (Entry<Enchantment, Integer> e : enchantments.entrySet()) {
|
for (Entry<Enchantment, Integer> e : enchantments.entrySet()) {
|
||||||
|
|
||||||
@ -554,6 +552,7 @@ public class ItemStackPrompt extends FixedSetPrompt implements ColorUtil {
|
|||||||
|
|
||||||
if (cc.getSessionData("tempLore") != null) {
|
if (cc.getSessionData("tempLore") != null) {
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
List<String> lore = (List<String>) cc.getSessionData("tempLore");
|
List<String> lore = (List<String>) cc.getSessionData("tempLore");
|
||||||
|
|
||||||
item += DARKGREEN + "(Lore)\n\"";
|
item += DARKGREEN + "(Lore)\n\"";
|
||||||
|
@ -112,19 +112,19 @@ public class StagesPrompt extends StringPrompt implements ColorUtil {
|
|||||||
pref = "stage" + current;
|
pref = "stage" + current;
|
||||||
newPref = "stage" + (current - 1);
|
newPref = "stage" + (current - 1);
|
||||||
|
|
||||||
cc.setSessionData(newPref + CK.S_BREAK_IDS, cc.getSessionData(pref + CK.S_BREAK_IDS));
|
cc.setSessionData(newPref + CK.S_BREAK_NAMES, cc.getSessionData(pref + CK.S_BREAK_NAMES));
|
||||||
cc.setSessionData(newPref + CK.S_BREAK_AMOUNTS, cc.getSessionData(pref + CK.S_BREAK_AMOUNTS));
|
cc.setSessionData(newPref + CK.S_BREAK_AMOUNTS, cc.getSessionData(pref + CK.S_BREAK_AMOUNTS));
|
||||||
|
|
||||||
cc.setSessionData(newPref + CK.S_DAMAGE_IDS, cc.getSessionData(pref + CK.S_DAMAGE_IDS));
|
cc.setSessionData(newPref + CK.S_DAMAGE_NAMES, cc.getSessionData(pref + CK.S_DAMAGE_NAMES));
|
||||||
cc.setSessionData(newPref + CK.S_DAMAGE_AMOUNTS, cc.getSessionData(pref + CK.S_DAMAGE_AMOUNTS));
|
cc.setSessionData(newPref + CK.S_DAMAGE_AMOUNTS, cc.getSessionData(pref + CK.S_DAMAGE_AMOUNTS));
|
||||||
|
|
||||||
cc.setSessionData(newPref + CK.S_PLACE_IDS, cc.getSessionData(pref + CK.S_PLACE_IDS));
|
cc.setSessionData(newPref + CK.S_PLACE_NAMES, cc.getSessionData(pref + CK.S_PLACE_NAMES));
|
||||||
cc.setSessionData(newPref + CK.S_PLACE_IDS, cc.getSessionData(pref + CK.S_PLACE_AMOUNTS));
|
cc.setSessionData(newPref + CK.S_PLACE_NAMES, cc.getSessionData(pref + CK.S_PLACE_AMOUNTS));
|
||||||
|
|
||||||
cc.setSessionData(newPref + CK.S_USE_IDS, cc.getSessionData(pref + CK.S_USE_IDS));
|
cc.setSessionData(newPref + CK.S_USE_NAMES, cc.getSessionData(pref + CK.S_USE_NAMES));
|
||||||
cc.setSessionData(newPref + CK.S_USE_AMOUNTS, cc.getSessionData(pref + CK.S_USE_AMOUNTS));
|
cc.setSessionData(newPref + CK.S_USE_AMOUNTS, cc.getSessionData(pref + CK.S_USE_AMOUNTS));
|
||||||
|
|
||||||
cc.setSessionData(newPref + CK.S_CUT_IDS, cc.getSessionData(pref + CK.S_CUT_IDS));
|
cc.setSessionData(newPref + CK.S_CUT_NAMES, cc.getSessionData(pref + CK.S_CUT_NAMES));
|
||||||
cc.setSessionData(newPref + CK.S_CUT_AMOUNTS, cc.getSessionData(pref + CK.S_CUT_AMOUNTS));
|
cc.setSessionData(newPref + CK.S_CUT_AMOUNTS, cc.getSessionData(pref + CK.S_CUT_AMOUNTS));
|
||||||
|
|
||||||
cc.setSessionData(newPref + CK.S_FISH, cc.getSessionData(pref + CK.S_FISH));
|
cc.setSessionData(newPref + CK.S_FISH, cc.getSessionData(pref + CK.S_FISH));
|
||||||
@ -132,7 +132,7 @@ public class StagesPrompt extends StringPrompt implements ColorUtil {
|
|||||||
cc.setSessionData(newPref + CK.S_PLAYER_KILL, cc.getSessionData(pref + CK.S_PLAYER_KILL));
|
cc.setSessionData(newPref + CK.S_PLAYER_KILL, cc.getSessionData(pref + CK.S_PLAYER_KILL));
|
||||||
|
|
||||||
cc.setSessionData(newPref + CK.S_ENCHANT_TYPES, cc.getSessionData(pref + CK.S_ENCHANT_TYPES));
|
cc.setSessionData(newPref + CK.S_ENCHANT_TYPES, cc.getSessionData(pref + CK.S_ENCHANT_TYPES));
|
||||||
cc.setSessionData(newPref + CK.S_ENCHANT_IDS, cc.getSessionData(pref + CK.S_ENCHANT_IDS));
|
cc.setSessionData(newPref + CK.S_ENCHANT_NAMES, cc.getSessionData(pref + CK.S_ENCHANT_NAMES));
|
||||||
cc.setSessionData(newPref + CK.S_ENCHANT_AMOUNTS, cc.getSessionData(pref + CK.S_ENCHANT_AMOUNTS));
|
cc.setSessionData(newPref + CK.S_ENCHANT_AMOUNTS, cc.getSessionData(pref + CK.S_ENCHANT_AMOUNTS));
|
||||||
|
|
||||||
cc.setSessionData(newPref + CK.S_DELIVERY_ITEMS, cc.getSessionData(pref + CK.S_DELIVERY_ITEMS));
|
cc.setSessionData(newPref + CK.S_DELIVERY_ITEMS, cc.getSessionData(pref + CK.S_DELIVERY_ITEMS));
|
||||||
@ -188,19 +188,19 @@ public class StagesPrompt extends StringPrompt implements ColorUtil {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cc.setSessionData(pref + CK.S_BREAK_IDS, null);
|
cc.setSessionData(pref + CK.S_BREAK_NAMES, null);
|
||||||
cc.setSessionData(pref + CK.S_BREAK_AMOUNTS, null);
|
cc.setSessionData(pref + CK.S_BREAK_AMOUNTS, null);
|
||||||
|
|
||||||
cc.setSessionData(pref + CK.S_DAMAGE_IDS, null);
|
cc.setSessionData(pref + CK.S_DAMAGE_NAMES, null);
|
||||||
cc.setSessionData(pref + CK.S_DAMAGE_AMOUNTS, null);
|
cc.setSessionData(pref + CK.S_DAMAGE_AMOUNTS, null);
|
||||||
|
|
||||||
cc.setSessionData(pref + CK.S_PLACE_IDS, null);
|
cc.setSessionData(pref + CK.S_PLACE_NAMES, null);
|
||||||
cc.setSessionData(pref + CK.S_PLACE_AMOUNTS, null);
|
cc.setSessionData(pref + CK.S_PLACE_AMOUNTS, null);
|
||||||
|
|
||||||
cc.setSessionData(pref + CK.S_USE_IDS, null);
|
cc.setSessionData(pref + CK.S_USE_NAMES, null);
|
||||||
cc.setSessionData(pref + CK.S_USE_AMOUNTS, null);
|
cc.setSessionData(pref + CK.S_USE_AMOUNTS, null);
|
||||||
|
|
||||||
cc.setSessionData(pref + CK.S_CUT_IDS, null);
|
cc.setSessionData(pref + CK.S_CUT_NAMES, null);
|
||||||
cc.setSessionData(pref + CK.S_CUT_AMOUNTS, null);
|
cc.setSessionData(pref + CK.S_CUT_AMOUNTS, null);
|
||||||
|
|
||||||
cc.setSessionData(pref + CK.S_FISH, null);
|
cc.setSessionData(pref + CK.S_FISH, null);
|
||||||
@ -208,7 +208,7 @@ public class StagesPrompt extends StringPrompt implements ColorUtil {
|
|||||||
cc.setSessionData(pref + CK.S_PLAYER_KILL, null);
|
cc.setSessionData(pref + CK.S_PLAYER_KILL, null);
|
||||||
|
|
||||||
cc.setSessionData(pref + CK.S_ENCHANT_TYPES, null);
|
cc.setSessionData(pref + CK.S_ENCHANT_TYPES, null);
|
||||||
cc.setSessionData(pref + CK.S_ENCHANT_IDS, null);
|
cc.setSessionData(pref + CK.S_ENCHANT_NAMES, null);
|
||||||
cc.setSessionData(pref + CK.S_ENCHANT_AMOUNTS, null);
|
cc.setSessionData(pref + CK.S_ENCHANT_AMOUNTS, null);
|
||||||
|
|
||||||
cc.setSessionData(pref + CK.S_DELIVERY_ITEMS, null);
|
cc.setSessionData(pref + CK.S_DELIVERY_ITEMS, null);
|
||||||
|
@ -52,20 +52,20 @@ public class CK {
|
|||||||
public static final String REW_CUSTOM_DATA_DESCRIPTIONS = "customRewDataDesc";
|
public static final String REW_CUSTOM_DATA_DESCRIPTIONS = "customRewDataDesc";
|
||||||
public static final String REW_CUSTOM_DATA_TEMP = "customRewDataTemp";
|
public static final String REW_CUSTOM_DATA_TEMP = "customRewDataTemp";
|
||||||
//Stages
|
//Stages
|
||||||
public static final String S_BREAK_IDS = "breakIds";
|
public static final String S_BREAK_NAMES = "breakNames";
|
||||||
public static final String S_BREAK_AMOUNTS = "breakAmounts";
|
public static final String S_BREAK_AMOUNTS = "breakAmounts";
|
||||||
public static final String S_DAMAGE_IDS = "damageIds";
|
public static final String S_DAMAGE_NAMES = "damageNames";
|
||||||
public static final String S_DAMAGE_AMOUNTS = "damageAmounts";
|
public static final String S_DAMAGE_AMOUNTS = "damageAmounts";
|
||||||
public static final String S_PLACE_IDS = "placeIds";
|
public static final String S_PLACE_NAMES = "placeNames";
|
||||||
public static final String S_PLACE_AMOUNTS = "placeAmounts";
|
public static final String S_PLACE_AMOUNTS = "placeAmounts";
|
||||||
public static final String S_USE_IDS = "useIds";
|
public static final String S_USE_NAMES = "useNames";
|
||||||
public static final String S_USE_AMOUNTS = "useAmounts";
|
public static final String S_USE_AMOUNTS = "useAmounts";
|
||||||
public static final String S_CUT_IDS = "cutIds";
|
public static final String S_CUT_NAMES = "cutNames";
|
||||||
public static final String S_CUT_AMOUNTS = "cutAmounts";
|
public static final String S_CUT_AMOUNTS = "cutAmounts";
|
||||||
public static final String S_FISH = "fish";
|
public static final String S_FISH = "fish";
|
||||||
public static final String S_PLAYER_KILL = "playerKill";
|
public static final String S_PLAYER_KILL = "playerKill";
|
||||||
public static final String S_ENCHANT_TYPES = "enchantTypes";
|
public static final String S_ENCHANT_TYPES = "enchantTypes";
|
||||||
public static final String S_ENCHANT_IDS = "enchantIds";
|
public static final String S_ENCHANT_NAMES = "enchantNames";
|
||||||
public static final String S_ENCHANT_AMOUNTS = "enchantAmounts";
|
public static final String S_ENCHANT_AMOUNTS = "enchantAmounts";
|
||||||
public static final String S_DELIVERY_ITEMS = "deliveryItems";
|
public static final String S_DELIVERY_ITEMS = "deliveryItems";
|
||||||
public static final String S_DELIVERY_NPCS = "deliveryNPCs";
|
public static final String S_DELIVERY_NPCS = "deliveryNPCs";
|
||||||
|
@ -13,17 +13,17 @@ import org.bukkit.inventory.meta.ItemMeta;
|
|||||||
public class ItemUtil implements ColorUtil {
|
public class ItemUtil implements ColorUtil {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Will compare stacks by id, amount, data, name/lore and enchantments
|
* Will compare stacks by name, amount, data, display name/lore and enchantments
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @param one ItemStack to compare
|
* @param one ItemStack to compare
|
||||||
* @param two ItemStack to compare to
|
* @param two ItemStack to compare to
|
||||||
* @return 0 if stacks are equal, or the first inequality from the following
|
* @return 0 if stacks are equal, or the first inequality from the following
|
||||||
* values:<br>
|
* values:<br>
|
||||||
* @return -1 -> stack ids are unequal<br>
|
* @return -1 -> stack names are unequal<br>
|
||||||
* @return -2 -> stack amounts are unequal<br>
|
* @return -2 -> stack amounts are unequal<br>
|
||||||
* @return -3 -> stack data is unequal<br>
|
* @return -3 -> stack data is unequal<br>
|
||||||
* @return -4 -> stack name/lore is unequal<br>
|
* @return -4 -> stack display name/lore is unequal<br>
|
||||||
* @return -5 -> stack enchantments are unequal<br>
|
* @return -5 -> stack enchantments are unequal<br>
|
||||||
*/
|
*/
|
||||||
public static int compareItems(ItemStack one, ItemStack two, boolean ignoreAmount) {
|
public static int compareItems(ItemStack one, ItemStack two, boolean ignoreAmount) {
|
||||||
@ -36,7 +36,7 @@ public class ItemUtil implements ColorUtil {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (one.getTypeId() != two.getTypeId()) {
|
if (one.getType().name() != two.getType().name()) {
|
||||||
return -1;
|
return -1;
|
||||||
} else if ((one.getAmount() != two.getAmount()) && ignoreAmount == false) {
|
} else if ((one.getAmount() != two.getAmount()) && ignoreAmount == false) {
|
||||||
return -2;
|
return -2;
|
||||||
@ -87,8 +87,8 @@ public class ItemUtil implements ColorUtil {
|
|||||||
LinkedList<String> lore = new LinkedList<String>();
|
LinkedList<String> lore = new LinkedList<String>();
|
||||||
for (String arg : args) {
|
for (String arg : args) {
|
||||||
|
|
||||||
if (arg.startsWith("id-")) {
|
if (arg.startsWith("name-")) {
|
||||||
stack = new ItemStack(Integer.parseInt(arg.substring(3)));
|
stack = new ItemStack(Material.matchMaterial(arg.substring(3)));
|
||||||
meta = stack.getItemMeta();
|
meta = stack.getItemMeta();
|
||||||
} else if (arg.startsWith("amount-")) {
|
} else if (arg.startsWith("amount-")) {
|
||||||
stack.setAmount(Integer.parseInt(arg.substring(7)));
|
stack.setAmount(Integer.parseInt(arg.substring(7)));
|
||||||
@ -124,7 +124,7 @@ public class ItemUtil implements ColorUtil {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
serial = "id-" + is.getTypeId();
|
serial = "name-" + is.getType().name();
|
||||||
serial += ":amount-" + is.getAmount();
|
serial += ":amount-" + is.getAmount();
|
||||||
if (is.getDurability() != 0) {
|
if (is.getDurability() != 0) {
|
||||||
serial += ":data-" + is.getDurability();
|
serial += ":data-" + is.getDurability();
|
||||||
@ -161,7 +161,7 @@ public class ItemUtil implements ColorUtil {
|
|||||||
if (is.hasItemMeta() && is.getItemMeta().hasDisplayName()) {
|
if (is.hasItemMeta() && is.getItemMeta().hasDisplayName()) {
|
||||||
text = "" + DARKAQUA + ITALIC + is.getItemMeta().getDisplayName() + RESET + AQUA + " x " + is.getAmount();
|
text = "" + DARKAQUA + ITALIC + is.getItemMeta().getDisplayName() + RESET + AQUA + " x " + is.getAmount();
|
||||||
} else {
|
} else {
|
||||||
text = AQUA + Quester.prettyItemString(is.getTypeId());
|
text = AQUA + Quester.prettyItemString(is.getType().name());
|
||||||
if (is.getDurability() != 0) {
|
if (is.getDurability() != 0) {
|
||||||
text += AQUA + ":" + is.getDurability();
|
text += AQUA + ":" + is.getDurability();
|
||||||
}
|
}
|
||||||
@ -185,7 +185,7 @@ public class ItemUtil implements ColorUtil {
|
|||||||
if (is.hasItemMeta() && is.getItemMeta().hasDisplayName()) {
|
if (is.hasItemMeta() && is.getItemMeta().hasDisplayName()) {
|
||||||
text = "" + DARKAQUA + ITALIC + is.getItemMeta().getDisplayName() + RESET + AQUA + " x " + is.getAmount();
|
text = "" + DARKAQUA + ITALIC + is.getItemMeta().getDisplayName() + RESET + AQUA + " x " + is.getAmount();
|
||||||
} else {
|
} else {
|
||||||
text = AQUA + Quester.prettyItemString(is.getTypeId());
|
text = AQUA + Quester.prettyItemString(is.getType().name());
|
||||||
if (is.getDurability() != 0) {
|
if (is.getDurability() != 0) {
|
||||||
text += AQUA + ":" + is.getDurability();
|
text += AQUA + ":" + is.getDurability();
|
||||||
}
|
}
|
||||||
@ -205,7 +205,7 @@ public class ItemUtil implements ColorUtil {
|
|||||||
if (is.hasItemMeta() && is.getItemMeta().hasDisplayName()) {
|
if (is.hasItemMeta() && is.getItemMeta().hasDisplayName()) {
|
||||||
text = "" + DARKAQUA + ITALIC + is.getItemMeta().getDisplayName();
|
text = "" + DARKAQUA + ITALIC + is.getItemMeta().getDisplayName();
|
||||||
} else {
|
} else {
|
||||||
text = AQUA + Quester.prettyItemString(is.getTypeId());
|
text = AQUA + Quester.prettyItemString(is.getType().name());
|
||||||
}
|
}
|
||||||
|
|
||||||
return text;
|
return text;
|
||||||
|
@ -283,7 +283,7 @@ public class Lang {
|
|||||||
langMap.put("stageEditorCompleteMessage", "Complete Message");
|
langMap.put("stageEditorCompleteMessage", "Complete Message");
|
||||||
langMap.put("stageEditorDelete", "Delete Stage");
|
langMap.put("stageEditorDelete", "Delete Stage");
|
||||||
|
|
||||||
langMap.put("stageEditorSetBlockIds", "Set block IDs");
|
langMap.put("stageEditorSetBlockNames", "Set block names");
|
||||||
langMap.put("stageEditorSetBlockAmounts", "Set block amounts");
|
langMap.put("stageEditorSetBlockAmounts", "Set block amounts");
|
||||||
langMap.put("stageEditorSetDamageAmounts", "Set damage amounts");
|
langMap.put("stageEditorSetDamageAmounts", "Set damage amounts");
|
||||||
langMap.put("stageEditorSetPlaceAmounts", "Set place amounts");
|
langMap.put("stageEditorSetPlaceAmounts", "Set place amounts");
|
||||||
@ -293,7 +293,7 @@ public class Lang {
|
|||||||
langMap.put("stageEditorSetEnchantAmounts", "Set enchant amounts");
|
langMap.put("stageEditorSetEnchantAmounts", "Set enchant amounts");
|
||||||
langMap.put("stageEditorSetMobAmounts", "Set mob amounts");
|
langMap.put("stageEditorSetMobAmounts", "Set mob amounts");
|
||||||
langMap.put("stageEditorSetEnchantments", "Set enchantments");
|
langMap.put("stageEditorSetEnchantments", "Set enchantments");
|
||||||
langMap.put("stageEditorSetItemIds", "Set item ids");
|
langMap.put("stageEditorSetItemNames", "Set item ids");
|
||||||
langMap.put("stageEditorSetKillIds", "Set NPC IDs");
|
langMap.put("stageEditorSetKillIds", "Set NPC IDs");
|
||||||
langMap.put("stageEditorSetMobTypes", "Set mob types");
|
langMap.put("stageEditorSetMobTypes", "Set mob types");
|
||||||
langMap.put("stageEditorSetKillLocations", "Set kill locations");
|
langMap.put("stageEditorSetKillLocations", "Set kill locations");
|
||||||
@ -318,7 +318,7 @@ public class Lang {
|
|||||||
langMap.put("stageEditorCustomCleared", "Custom objectives cleared.");
|
langMap.put("stageEditorCustomCleared", "Custom objectives cleared.");
|
||||||
langMap.put("stageEditorCustomDataPrompt", "Enter value for <data>:");
|
langMap.put("stageEditorCustomDataPrompt", "Enter value for <data>:");
|
||||||
|
|
||||||
langMap.put("stageEditorEnterBlockIds", "Enter block IDs, separating each one by a space, or enter \'cancel\' to return.");
|
langMap.put("stageEditorEnterBlockNames", "Enter block names, separating each one by a space, or enter \'cancel\' to return.");
|
||||||
langMap.put("stageEditorBreakBlocksPrompt", "Enter block amounts (numbers), separating each one by a space, or enter \'cancel\' to return.");
|
langMap.put("stageEditorBreakBlocksPrompt", "Enter block amounts (numbers), separating each one by a space, or enter \'cancel\' to return.");
|
||||||
langMap.put("stageEditorDamageBlocksPrompt", "Enter damage amounts (numbers), separating each one by a space, or enter \'cancel\' to return.");
|
langMap.put("stageEditorDamageBlocksPrompt", "Enter damage amounts (numbers), separating each one by a space, or enter \'cancel\' to return.");
|
||||||
langMap.put("stageEditorPlaceBlocksPrompt", "Enter place amounts (numbers), separating each one by a space, or enter \'cancel\' to return.");
|
langMap.put("stageEditorPlaceBlocksPrompt", "Enter place amounts (numbers), separating each one by a space, or enter \'cancel\' to return.");
|
||||||
@ -328,7 +328,7 @@ public class Lang {
|
|||||||
langMap.put("stageEditorKillPlayerPrompt", "Enter number of players to kill, or 0 to clear the player kill objective, or -1 to cancel");
|
langMap.put("stageEditorKillPlayerPrompt", "Enter number of players to kill, or 0 to clear the player kill objective, or -1 to cancel");
|
||||||
langMap.put("stageEditorEnchantTypePrompt", "Enter enchantment names, separating each one by a comma, or enter \'cancel\' to return.");
|
langMap.put("stageEditorEnchantTypePrompt", "Enter enchantment names, separating each one by a comma, or enter \'cancel\' to return.");
|
||||||
langMap.put("stageEditorEnchantAmountsPrompt", "Enter enchant amounts (numbers), separating each one by a space, or enter \'cancel\' to return.");
|
langMap.put("stageEditorEnchantAmountsPrompt", "Enter enchant amounts (numbers), separating each one by a space, or enter \'cancel\' to return.");
|
||||||
langMap.put("stageEditorItemIDsPrompt", "Enter item IDs, separating each one by a space, or enter \'cancel\' to return.");
|
langMap.put("stageEditorItemNamesPrompt", "Enter item names, separating each one by a space, or enter \'cancel\' to return.");
|
||||||
langMap.put("stageEditorNPCPrompt", "Enter NPC ids, separating each one by a space, or enter \'cancel\' to return.");
|
langMap.put("stageEditorNPCPrompt", "Enter NPC ids, separating each one by a space, or enter \'cancel\' to return.");
|
||||||
langMap.put("stageEditorNPCToTalkToPrompt", "Enter NPC IDs, separating each one by a space, or enter \'clear\' to clear the NPC ID list, or \'cancel\' to return.");
|
langMap.put("stageEditorNPCToTalkToPrompt", "Enter NPC IDs, separating each one by a space, or enter \'clear\' to clear the NPC ID list, or \'cancel\' to return.");
|
||||||
langMap.put("stageEditorDeliveryMessagesPrompt", "Enter delivery messages, separating each one by a semi-colon or enter \'cancel\' to return.");
|
langMap.put("stageEditorDeliveryMessagesPrompt", "Enter delivery messages, separating each one by a semi-colon or enter \'cancel\' to return.");
|
||||||
@ -368,11 +368,11 @@ public class Lang {
|
|||||||
langMap.put("stageEditorDeliveryMessages", "Set delivery messages");
|
langMap.put("stageEditorDeliveryMessages", "Set delivery messages");
|
||||||
|
|
||||||
langMap.put("stageEditorContainsDuplicates", "List contains duplicates!");
|
langMap.put("stageEditorContainsDuplicates", "List contains duplicates!");
|
||||||
langMap.put("stageEditorInvalidBlockID", "is not a valid block ID!");
|
langMap.put("stageEditorInvalidBlockName", "is not a valid block name!");
|
||||||
langMap.put("stageEditorInvalidEnchantment", "is not a valid enchantment name!");
|
langMap.put("stageEditorInvalidEnchantment", "is not a valid enchantment name!");
|
||||||
langMap.put("stageEditorInvalidNPC", "is not a valid NPC ID!");
|
langMap.put("stageEditorInvalidNPC", "is not a valid NPC ID!");
|
||||||
langMap.put("stageEditorInvalidMob", "is not a valid mob name!");
|
langMap.put("stageEditorInvalidMob", "is not a valid mob name!");
|
||||||
langMap.put("stageEditorInvalidItemID", "is not a valid item ID!");
|
langMap.put("stageEditorInvalidItemName", "is not a valid item name!");
|
||||||
langMap.put("stageEditorInvalidNumber", "is not a number!");
|
langMap.put("stageEditorInvalidNumber", "is not a number!");
|
||||||
langMap.put("stageEditorInvalidDye", "is not a valid dye color!");
|
langMap.put("stageEditorInvalidDye", "is not a valid dye color!");
|
||||||
langMap.put("stageEditorInvalidEvent", "is not a valid event name!");
|
langMap.put("stageEditorInvalidEvent", "is not a valid event name!");
|
||||||
@ -388,7 +388,7 @@ public class Lang {
|
|||||||
langMap.put("stageEditorNotGreaterThanZero", "is not greater than 0!");
|
langMap.put("stageEditorNotGreaterThanZero", "is not greater than 0!");
|
||||||
langMap.put("stageEditorNotListofNumbers", "Invalid entry, input was not a list of numbers!");
|
langMap.put("stageEditorNotListofNumbers", "Invalid entry, input was not a list of numbers!");
|
||||||
langMap.put("stageEditorNoDelaySet", "You must set a delay first!");
|
langMap.put("stageEditorNoDelaySet", "You must set a delay first!");
|
||||||
langMap.put("stageEditorNoBlockIds", "You must set Block IDs first!");
|
langMap.put("stageEditorNoBlockNames", "You must set block names first!");
|
||||||
langMap.put("stageEditorNoEnchantments", "You must set enchantments first!");
|
langMap.put("stageEditorNoEnchantments", "You must set enchantments first!");
|
||||||
langMap.put("stageEditorNoItems", "You must add items first!");
|
langMap.put("stageEditorNoItems", "You must add items first!");
|
||||||
langMap.put("stageEditorNoDeliveryMessage", "You must set at least one delivery message!");
|
langMap.put("stageEditorNoDeliveryMessage", "You must set at least one delivery message!");
|
||||||
@ -405,7 +405,7 @@ public class Lang {
|
|||||||
langMap.put("stageEditorNoLocationsSet", "No locations set");
|
langMap.put("stageEditorNoLocationsSet", "No locations set");
|
||||||
langMap.put("stageEditorNoColorsSet", "No colors set");
|
langMap.put("stageEditorNoColorsSet", "No colors set");
|
||||||
|
|
||||||
langMap.put("stageEditorListNotSameSize", "The block IDs list and the amounts list are not the same size!");
|
langMap.put("stageEditorListNotSameSize", "The block names list and the amounts list are not the same size!");
|
||||||
langMap.put("stageEditorEnchantmentNotSameSize", "The enchantments list, the item id list and the enchant amount list are not the same size!");
|
langMap.put("stageEditorEnchantmentNotSameSize", "The enchantments list, the item id list and the enchant amount list are not the same size!");
|
||||||
langMap.put("stageEditorDeliveriesNotSameSize", "The item list and the NPC list are not equal in size!");
|
langMap.put("stageEditorDeliveriesNotSameSize", "The item list and the NPC list are not equal in size!");
|
||||||
langMap.put("stageEditorNPCKillsNotSameSize", "The NPC IDs list and the kill amounts list are not the same size!");
|
langMap.put("stageEditorNPCKillsNotSameSize", "The NPC IDs list and the kill amounts list are not the same size!");
|
||||||
@ -506,11 +506,11 @@ public class Lang {
|
|||||||
langMap.put("eventEditorSetItems", "Give items");
|
langMap.put("eventEditorSetItems", "Give items");
|
||||||
langMap.put("eventEditorItemsCleared", "Event items cleared.");
|
langMap.put("eventEditorItemsCleared", "Event items cleared.");
|
||||||
langMap.put("eventEditorAddItem", "Add item");
|
langMap.put("eventEditorAddItem", "Add item");
|
||||||
langMap.put("eventEditorSetItemIDs", "Set item IDs");
|
langMap.put("eventEditorSetItemNames", "Set item names");
|
||||||
langMap.put("eventEditorSetItemAmounts", "Set item amounts");
|
langMap.put("eventEditorSetItemAmounts", "Set item amounts");
|
||||||
langMap.put("eventEditorNoIDs", "No IDs set");
|
langMap.put("eventEditorNoNames", "No names set");
|
||||||
langMap.put("eventEditorMustSetIDs", "You must set item IDs first!");
|
langMap.put("eventEditorMustSetNames", "You must set item names first!");
|
||||||
langMap.put("eventEditorInvalidID", "is not a valid item ID!");
|
langMap.put("eventEditorInvalidName", "is not a valid item name!");
|
||||||
langMap.put("eventEditorNotGreaterThanZero", "is not greater than 0!");
|
langMap.put("eventEditorNotGreaterThanZero", "is not greater than 0!");
|
||||||
langMap.put("eventEditorNotANumber", "is not a number!");
|
langMap.put("eventEditorNotANumber", "is not a number!");
|
||||||
|
|
||||||
@ -587,7 +587,7 @@ public class Lang {
|
|||||||
langMap.put("eventEditorExplosionPrompt", "Right-click on a block to spawn an explosion at, then enter 'add' to add it to the list, or enter 'clear' to clear the explosions list, or 'cancel' to return");
|
langMap.put("eventEditorExplosionPrompt", "Right-click on a block to spawn an explosion at, then enter 'add' to add it to the list, or enter 'clear' to clear the explosions list, or 'cancel' to return");
|
||||||
langMap.put("eventEditorSelectBlockFirst", "You must select a block first.");
|
langMap.put("eventEditorSelectBlockFirst", "You must select a block first.");
|
||||||
langMap.put("eventEditorSetMessagePrompt", "Enter message, or enter \'none\' to delete, (or \'cancel\' to return)");
|
langMap.put("eventEditorSetMessagePrompt", "Enter message, or enter \'none\' to delete, (or \'cancel\' to return)");
|
||||||
langMap.put("eventEditorSetItemIDsPrompt", "Enter item IDs separating each one by a space, or enter 'cancel' to return.");
|
langMap.put("eventEditorSetItemNamesPrompt", "Enter item names separating each one by a space, or enter 'cancel' to return.");
|
||||||
langMap.put("eventEditorSetItemAmountsPrompt", "Enter item amounts (numbers) separating each one by a space, or enter 'cancel' to return.");
|
langMap.put("eventEditorSetItemAmountsPrompt", "Enter item amounts (numbers) separating each one by a space, or enter 'cancel' to return.");
|
||||||
langMap.put("eventEditorSetMobTypesPrompt", "Enter mob name, or enter 'cancel' to return");
|
langMap.put("eventEditorSetMobTypesPrompt", "Enter mob name, or enter 'cancel' to return");
|
||||||
langMap.put("eventEditorSetMobAmountsPrompt", "Enter mob amount, or enter 'cancel' to return");
|
langMap.put("eventEditorSetMobAmountsPrompt", "Enter mob amount, or enter 'cancel' to return");
|
||||||
@ -716,14 +716,14 @@ public class Lang {
|
|||||||
|
|
||||||
//Item Prompt
|
//Item Prompt
|
||||||
langMap.put("itemCreateLoadHand", "Load item in hand");
|
langMap.put("itemCreateLoadHand", "Load item in hand");
|
||||||
langMap.put("itemCreateSetID", "Set ID");
|
langMap.put("itemCreateSetName", "Set name");
|
||||||
langMap.put("itemCreateSetAmount", "Set Amount");
|
langMap.put("itemCreateSetAmount", "Set Amount");
|
||||||
langMap.put("itemCreateSetData", "Set data");
|
langMap.put("itemCreateSetData", "Set data");
|
||||||
langMap.put("itemCreateSetEnchs", "Add/clear enchantments");
|
langMap.put("itemCreateSetEnchs", "Add/clear enchantments");
|
||||||
langMap.put("itemCreateSetName", "Set name");
|
langMap.put("itemCreateSetName", "Set name");
|
||||||
langMap.put("itemCreateSetLore", "Set lore");
|
langMap.put("itemCreateSetLore", "Set lore");
|
||||||
|
|
||||||
langMap.put("itemCreateEnterID", "Enter an item ID, or 'cancel' to return.");
|
langMap.put("itemCreateEnterName", "Enter an item name, or 'cancel' to return.");
|
||||||
langMap.put("itemCreateEnterAmount", "Enter item amount (max. 64), or 'cancel' to return.");
|
langMap.put("itemCreateEnterAmount", "Enter item amount (max. 64), or 'cancel' to return.");
|
||||||
langMap.put("itemCreateEnterData", "Enter item data, or 'clear' to clear the data, or 'cancel' to return.");
|
langMap.put("itemCreateEnterData", "Enter item data, or 'clear' to clear the data, or 'cancel' to return.");
|
||||||
langMap.put("itemCreateEnterEnch", "Enter an enchantment name, or 'clear' to clear the enchantments, or 'cancel' to return.");
|
langMap.put("itemCreateEnterEnch", "Enter an enchantment name, or 'clear' to clear the enchantments, or 'cancel' to return.");
|
||||||
@ -733,8 +733,8 @@ public class Lang {
|
|||||||
|
|
||||||
langMap.put("itemCreateLoaded", "Item loaded.");
|
langMap.put("itemCreateLoaded", "Item loaded.");
|
||||||
langMap.put("itemCreateNoItem", "No item in hand!");
|
langMap.put("itemCreateNoItem", "No item in hand!");
|
||||||
langMap.put("itemCreateNoID", "You must set an ID first!");
|
langMap.put("itemCreateNoName", "You must set a name first!");
|
||||||
langMap.put("itemCreateInvalidID", "Invalid item ID!");
|
langMap.put("itemCreateInvalidName", "Invalid item name!");
|
||||||
langMap.put("itemCreateInvalidAmount", "Amount must be between 1-64!");
|
langMap.put("itemCreateInvalidAmount", "Amount must be between 1-64!");
|
||||||
langMap.put("itemCreateInvalidData", "Invalid item data!");
|
langMap.put("itemCreateInvalidData", "Invalid item data!");
|
||||||
langMap.put("itemCreateInvalidEnch", "Invalid enchantment name!");
|
langMap.put("itemCreateInvalidEnch", "Invalid enchantment name!");
|
||||||
@ -742,7 +742,7 @@ public class Lang {
|
|||||||
langMap.put("itemCreateInvalidInput", "Invalid input!");
|
langMap.put("itemCreateInvalidInput", "Invalid input!");
|
||||||
langMap.put("itemCreateNotNumber", "Input was not a number!");
|
langMap.put("itemCreateNotNumber", "Input was not a number!");
|
||||||
|
|
||||||
langMap.put("itemCreateNoIDAmount", "You must set an ID and amount first!");
|
langMap.put("itemCreateNoNameAmount", "You must set a name and amount first!");
|
||||||
langMap.put("itemCreateCriticalError", "A critical error has occurred.");
|
langMap.put("itemCreateCriticalError", "A critical error has occurred.");
|
||||||
//
|
//
|
||||||
|
|
||||||
@ -1027,6 +1027,7 @@ public class Lang {
|
|||||||
langMap.put("noneSet", "None set");
|
langMap.put("noneSet", "None set");
|
||||||
langMap.put("noDelaySet", "No delay set");
|
langMap.put("noDelaySet", "No delay set");
|
||||||
langMap.put("noIdsSet", "No IDs set");
|
langMap.put("noIdsSet", "No IDs set");
|
||||||
|
langMap.put("noNamesSet", "No names set");
|
||||||
langMap.put("worlds", "Worlds");
|
langMap.put("worlds", "Worlds");
|
||||||
langMap.put("mobs", "Mobs");
|
langMap.put("mobs", "Mobs");
|
||||||
langMap.put("points", "points");
|
langMap.put("points", "points");
|
||||||
|
Loading…
Reference in New Issue
Block a user