mirror of
https://github.com/PikaMug/Quests.git
synced 2024-12-24 10:09:49 +01:00
commit
2bbae892ec
2
dist/pom.xml
vendored
2
dist/pom.xml
vendored
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>me.blackvein.quests</groupId>
|
<groupId>me.blackvein.quests</groupId>
|
||||||
<artifactId>quests-parent</artifactId>
|
<artifactId>quests-parent</artifactId>
|
||||||
<version>3.8.1</version>
|
<version>3.8.2</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>quests-dist</artifactId>
|
<artifactId>quests-dist</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>me.blackvein.quests</groupId>
|
<groupId>me.blackvein.quests</groupId>
|
||||||
<artifactId>quests-parent</artifactId>
|
<artifactId>quests-parent</artifactId>
|
||||||
<version>3.8.1</version>
|
<version>3.8.2</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>quests-main</artifactId>
|
<artifactId>quests-main</artifactId>
|
||||||
|
|
||||||
|
@ -12,9 +12,14 @@
|
|||||||
|
|
||||||
package me.blackvein.quests;
|
package me.blackvein.quests;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.plugin.RegisteredServiceProvider;
|
import org.bukkit.plugin.RegisteredServiceProvider;
|
||||||
|
|
||||||
import me.blackvein.quests.util.DenizenAPI;
|
import me.blackvein.quests.util.DenizenAPI;
|
||||||
|
import me.blackvein.quests.util.Lang;
|
||||||
import me.blackvein.quests.util.WorldGuardAPI;
|
import me.blackvein.quests.util.WorldGuardAPI;
|
||||||
import me.clip.placeholderapi.PlaceholderAPIPlugin;
|
import me.clip.placeholderapi.PlaceholderAPIPlugin;
|
||||||
import net.citizensnpcs.api.CitizensPlugin;
|
import net.citizensnpcs.api.CitizensPlugin;
|
||||||
@ -27,7 +32,11 @@ import com.alessiodp.parties.api.Parties;
|
|||||||
import com.alessiodp.parties.api.interfaces.PartiesAPI;
|
import com.alessiodp.parties.api.interfaces.PartiesAPI;
|
||||||
import com.codisimus.plugins.phatloots.PhatLoots;
|
import com.codisimus.plugins.phatloots.PhatLoots;
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
|
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||||
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||||
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
import com.herocraftonline.heroes.Heroes;
|
import com.herocraftonline.heroes.Heroes;
|
||||||
|
import com.herocraftonline.heroes.characters.Hero;
|
||||||
|
|
||||||
import de.erethon.dungeonsxl.DungeonsXL;
|
import de.erethon.dungeonsxl.DungeonsXL;
|
||||||
|
|
||||||
@ -40,7 +49,7 @@ public class Dependencies {
|
|||||||
private static mcMMO mcmmo = null;
|
private static mcMMO mcmmo = null;
|
||||||
private static Heroes heroes = null;
|
private static Heroes heroes = null;
|
||||||
private static PhatLoots phatLoots = null;
|
private static PhatLoots phatLoots = null;
|
||||||
private static PlaceholderAPIPlugin placeholder = null;
|
public static PlaceholderAPIPlugin placeholder = null;
|
||||||
private static CitizensPlugin citizens = null;
|
private static CitizensPlugin citizens = null;
|
||||||
private static DenizenAPI denizenApi = null;
|
private static DenizenAPI denizenApi = null;
|
||||||
private static CitizensBooksAPI citizensBooks = null;
|
private static CitizensBooksAPI citizensBooks = null;
|
||||||
@ -215,7 +224,61 @@ public class Dependencies {
|
|||||||
return (permission != null);
|
return (permission != null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getCurrency(boolean plural) {
|
||||||
|
if (getVaultEconomy() == null) {
|
||||||
|
return Lang.get("money");
|
||||||
|
}
|
||||||
|
if (plural) {
|
||||||
|
if (getVaultEconomy().currencyNamePlural().trim().isEmpty()) {
|
||||||
|
return Lang.get("money");
|
||||||
|
} else {
|
||||||
|
return getVaultEconomy().currencyNamePlural();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (getVaultEconomy().currencyNameSingular().trim().isEmpty()) {
|
||||||
|
return Lang.get("money");
|
||||||
|
} else {
|
||||||
|
return getVaultEconomy().currencyNameSingular();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public boolean runDenizenScript(String scriptName, Quester quester) {
|
public boolean runDenizenScript(String scriptName, Quester quester) {
|
||||||
return plugin.getDenizenTrigger().runDenizenScript(scriptName, quester);
|
return plugin.getDenizenTrigger().runDenizenScript(scriptName, quester);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Location getNPCLocation(int id) {
|
||||||
|
return citizens.getNPCRegistry().getById(id).getStoredLocation();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNPCName(int id) {
|
||||||
|
return citizens.getNPCRegistry().getById(id).getName();
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getMcmmoSkillLevel(SkillType st, String player) {
|
||||||
|
McMMOPlayer mPlayer = UserManager.getPlayer(player);
|
||||||
|
if (mPlayer == null) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
return mPlayer.getProfile().getSkillLevel(st);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Hero getHero(UUID uuid) {
|
||||||
|
Player p = plugin.getServer().getPlayer(uuid);
|
||||||
|
if (p == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return heroes.getCharacterManager().getHero(p);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean testPrimaryHeroesClass(String primaryClass, UUID uuid) {
|
||||||
|
Hero hero = getHero(uuid);
|
||||||
|
return hero.getHeroClass().getName().equalsIgnoreCase(primaryClass);
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
|
public boolean testSecondaryHeroesClass(String secondaryClass, UUID uuid) {
|
||||||
|
Hero hero = getHero(uuid);
|
||||||
|
return hero.getSecondClass().getName().equalsIgnoreCase(secondaryClass);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -41,6 +41,8 @@ import me.blackvein.quests.events.quester.QuesterPreChangeStageEvent;
|
|||||||
import me.blackvein.quests.events.quester.QuesterPreCompleteQuestEvent;
|
import me.blackvein.quests.events.quester.QuesterPreCompleteQuestEvent;
|
||||||
import me.blackvein.quests.events.quester.QuesterPreFailQuestEvent;
|
import me.blackvein.quests.events.quester.QuesterPreFailQuestEvent;
|
||||||
import me.blackvein.quests.exceptions.InvalidStageException;
|
import me.blackvein.quests.exceptions.InvalidStageException;
|
||||||
|
import me.blackvein.quests.util.ConfigUtil;
|
||||||
|
import me.blackvein.quests.util.InventoryUtil;
|
||||||
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 me.clip.placeholderapi.PlaceholderAPI;
|
import me.clip.placeholderapi.PlaceholderAPI;
|
||||||
@ -53,11 +55,11 @@ public class Quest {
|
|||||||
private String name;
|
private String name;
|
||||||
protected String description;
|
protected String description;
|
||||||
protected String finished;
|
protected String finished;
|
||||||
protected String region = null;
|
|
||||||
protected ItemStack guiDisplay = null;
|
protected ItemStack guiDisplay = null;
|
||||||
private LinkedList<Stage> orderedStages = new LinkedList<Stage>();
|
private LinkedList<Stage> orderedStages = new LinkedList<Stage>();
|
||||||
protected NPC npcStart;
|
protected NPC npcStart;
|
||||||
protected Location blockStart;
|
protected Location blockStart;
|
||||||
|
protected String regionStart = null;
|
||||||
protected Action initialAction;
|
protected Action initialAction;
|
||||||
private Requirements reqs = new Requirements();
|
private Requirements reqs = new Requirements();
|
||||||
private Planner pln = new Planner();
|
private Planner pln = new Planner();
|
||||||
@ -92,12 +94,26 @@ public class Quest {
|
|||||||
this.finished = finished;
|
this.finished = finished;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getRegion() {
|
public String getRegionStart() {
|
||||||
return region;
|
return regionStart;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setRegionStart(String regionStart) {
|
||||||
|
this.regionStart = regionStart;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Use {@link #getRegionStart()}
|
||||||
|
*/
|
||||||
|
public String getRegion() {
|
||||||
|
return getRegionStart();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Use {@link #setRegion(String)}
|
||||||
|
*/
|
||||||
public void setRegion(String region) {
|
public void setRegion(String region) {
|
||||||
this.region = region;
|
setRegionStart(region);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ItemStack getGUIDisplay() {
|
public ItemStack getGUIDisplay() {
|
||||||
@ -184,7 +200,7 @@ public class Quest {
|
|||||||
}
|
}
|
||||||
String stageCompleteMessage = currentStage.completeMessage;
|
String stageCompleteMessage = currentStage.completeMessage;
|
||||||
if (stageCompleteMessage != null) {
|
if (stageCompleteMessage != null) {
|
||||||
quester.getPlayer().sendMessage(plugin.parseStringWithPossibleLineBreaks(stageCompleteMessage,
|
quester.getPlayer().sendMessage(ConfigUtil.parseStringWithPossibleLineBreaks(stageCompleteMessage,
|
||||||
this, quester.getPlayer()));
|
this, quester.getPlayer()));
|
||||||
}
|
}
|
||||||
if (plugin.getSettings().canUseCompass()) {
|
if (plugin.getSettings().canUseCompass()) {
|
||||||
@ -260,7 +276,7 @@ public class Quest {
|
|||||||
plugin.showObjectives(this, quester, false);
|
plugin.showObjectives(this, quester, false);
|
||||||
String stageStartMessage = quester.getCurrentStage(this).startMessage;
|
String stageStartMessage = quester.getCurrentStage(this).startMessage;
|
||||||
if (stageStartMessage != null) {
|
if (stageStartMessage != null) {
|
||||||
quester.getPlayer().sendMessage(plugin.parseStringWithPossibleLineBreaks(stageStartMessage, this,
|
quester.getPlayer().sendMessage(ConfigUtil.parseStringWithPossibleLineBreaks(stageStartMessage, this,
|
||||||
quester.getPlayer()));
|
quester.getPlayer()));
|
||||||
}
|
}
|
||||||
quester.updateJournal();
|
quester.updateJournal();
|
||||||
@ -289,9 +305,9 @@ public class Quest {
|
|||||||
}
|
}
|
||||||
Location targetLocation = null;
|
Location targetLocation = null;
|
||||||
if (nextStage.citizensToInteract != null && nextStage.citizensToInteract.size() > 0) {
|
if (nextStage.citizensToInteract != null && nextStage.citizensToInteract.size() > 0) {
|
||||||
targetLocation = plugin.getNPCLocation(nextStage.citizensToInteract.getFirst());
|
targetLocation = plugin.getDependencies().getNPCLocation(nextStage.citizensToInteract.getFirst());
|
||||||
} else if (nextStage.citizensToKill != null && nextStage.citizensToKill.size() > 0) {
|
} else if (nextStage.citizensToKill != null && nextStage.citizensToKill.size() > 0) {
|
||||||
targetLocation = plugin.getNPCLocation(nextStage.citizensToKill.getFirst());
|
targetLocation = plugin.getDependencies().getNPCLocation(nextStage.citizensToKill.getFirst());
|
||||||
} else if (nextStage.locationsToReach != null && nextStage.locationsToReach.size() > 0) {
|
} else if (nextStage.locationsToReach != null && nextStage.locationsToReach.size() > 0) {
|
||||||
targetLocation = nextStage.locationsToReach.getFirst();
|
targetLocation = nextStage.locationsToReach.getFirst();
|
||||||
} else if (nextStage.itemDeliveryTargets != null && nextStage.itemDeliveryTargets.size() > 0) {
|
} else if (nextStage.itemDeliveryTargets != null && nextStage.itemDeliveryTargets.size() > 0) {
|
||||||
@ -359,12 +375,14 @@ public class Quest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (reqs.getHeroesPrimaryClass() != null) {
|
if (reqs.getHeroesPrimaryClass() != null) {
|
||||||
if (plugin.testPrimaryHeroesClass(reqs.getHeroesPrimaryClass(), player.getUniqueId()) == false) {
|
if (plugin.getDependencies()
|
||||||
|
.testPrimaryHeroesClass(reqs.getHeroesPrimaryClass(), player.getUniqueId()) == false) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (reqs.getHeroesSecondaryClass() != null) {
|
if (reqs.getHeroesSecondaryClass() != null) {
|
||||||
if (plugin.testSecondaryHeroesClass(reqs.getHeroesSecondaryClass(), player.getUniqueId()) == false) {
|
if (plugin.getDependencies()
|
||||||
|
.testSecondaryHeroesClass(reqs.getHeroesSecondaryClass(), player.getUniqueId()) == false) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -447,7 +465,7 @@ public class Quest {
|
|||||||
}
|
}
|
||||||
for (ItemStack i : rews.getItems()) {
|
for (ItemStack i : rews.getItems()) {
|
||||||
try {
|
try {
|
||||||
Quests.addItem(player, i);
|
InventoryUtil.addItem(player, i);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
plugin.getLogger().severe("Unable to add null reward item to inventory of "
|
plugin.getLogger().severe("Unable to add null reward item to inventory of "
|
||||||
+ player.getName() + " upon completion of quest " + name);
|
+ player.getName() + " upon completion of quest " + name);
|
||||||
@ -511,7 +529,7 @@ public class Quest {
|
|||||||
phatLootItems.addAll(lb.getItemList());
|
phatLootItems.addAll(lb.getItemList());
|
||||||
for (ItemStack is : lb.getItemList()) {
|
for (ItemStack is : lb.getItemList()) {
|
||||||
try {
|
try {
|
||||||
Quests.addItem(player, is);
|
InventoryUtil.addItem(player, is);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
plugin.getLogger().severe("Unable to add PhatLoots item to inventory of " + player.getName()
|
plugin.getLogger().severe("Unable to add PhatLoots item to inventory of " + player.getName()
|
||||||
+ " upon completion of quest " + name);
|
+ " upon completion of quest " + name);
|
||||||
@ -653,13 +671,11 @@ public class Quest {
|
|||||||
int index = 0;
|
int index = 0;
|
||||||
for (String s : rews.getCommands()) {
|
for (String s : rews.getCommands()) {
|
||||||
if (rews.getCommandsOverrideDisplay().isEmpty() == false && rews.getCommandsOverrideDisplay().size()
|
if (rews.getCommandsOverrideDisplay().isEmpty() == false && rews.getCommandsOverrideDisplay().size()
|
||||||
>= index) {
|
> index) {
|
||||||
if (rews.getCommandsOverrideDisplay().size() > index) {
|
|
||||||
if (!rews.getCommandsOverrideDisplay().get(index).trim().equals("")) {
|
if (!rews.getCommandsOverrideDisplay().get(index).trim().equals("")) {
|
||||||
player.sendMessage("- " + ChatColor.DARK_GREEN
|
player.sendMessage("- " + ChatColor.DARK_GREEN
|
||||||
+ rews.getCommandsOverrideDisplay().get(index));
|
+ rews.getCommandsOverrideDisplay().get(index));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
player.sendMessage("- " + ChatColor.DARK_GREEN + s);
|
player.sendMessage("- " + ChatColor.DARK_GREEN + s);
|
||||||
}
|
}
|
||||||
@ -779,11 +795,11 @@ public class Quest {
|
|||||||
* @return true if player is in region
|
* @return true if player is in region
|
||||||
*/
|
*/
|
||||||
private boolean isInRegion(Player player) {
|
private boolean isInRegion(Player player) {
|
||||||
if (region == null) {
|
if (regionStart == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (plugin.getDependencies().getWorldGuardApi()
|
if (plugin.getDependencies().getWorldGuardApi()
|
||||||
.getApplicableRegionsIDs(player.getWorld(), player.getLocation()).contains(region)) {
|
.getApplicableRegionsIDs(player.getWorld(), player.getLocation()).contains(regionStart)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -398,21 +398,29 @@ public class QuestData {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
public LinkedHashMap<ItemStack, Integer> itemsDelivered = new LinkedHashMap<ItemStack, Integer>() {
|
public LinkedList<ItemStack> itemsDelivered = new LinkedList<ItemStack>() {
|
||||||
|
|
||||||
private static final long serialVersionUID = 2712497347022734646L;
|
private static final long serialVersionUID = 2712497347022734646L;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer put(ItemStack key, Integer val) {
|
public ItemStack set(int index, ItemStack key) {
|
||||||
Integer data = super.put(key, val);
|
ItemStack data = super.set(index, key);
|
||||||
if (doJournalUpdate)
|
if (doJournalUpdate)
|
||||||
quester.updateJournal();
|
quester.updateJournal();
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer remove(Object key) {
|
public boolean add(ItemStack key) {
|
||||||
Integer i = super.remove(key);
|
boolean data = super.add(key);
|
||||||
|
if (doJournalUpdate)
|
||||||
|
quester.updateJournal();
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean remove(Object key) {
|
||||||
|
boolean i = super.remove(key);
|
||||||
if (doJournalUpdate)
|
if (doJournalUpdate)
|
||||||
quester.updateJournal();
|
quester.updateJournal();
|
||||||
return i;
|
return i;
|
||||||
@ -426,10 +434,11 @@ public class QuestData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void putAll(Map<? extends ItemStack, ? extends Integer> m) {
|
public boolean addAll(Collection<? extends ItemStack> m) {
|
||||||
super.putAll(m);
|
boolean i = super.addAll(m);
|
||||||
if (doJournalUpdate)
|
if (doJournalUpdate)
|
||||||
quester.updateJournal();
|
quester.updateJournal();
|
||||||
|
return i;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -58,6 +58,7 @@ import me.blackvein.quests.prompts.RewardsPrompt;
|
|||||||
import me.blackvein.quests.prompts.PlannerPrompt;
|
import me.blackvein.quests.prompts.PlannerPrompt;
|
||||||
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 me.blackvein.quests.util.ConfigUtil;
|
||||||
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 me.blackvein.quests.util.MiscUtil;
|
import me.blackvein.quests.util.MiscUtil;
|
||||||
@ -496,7 +497,7 @@ public class QuestFactory implements ConversationAbandonedListener {
|
|||||||
for (Quest q : plugin.getQuests()) {
|
for (Quest q : plugin.getQuests()) {
|
||||||
s += ChatColor.GRAY + "- " + ChatColor.YELLOW + q.getName() + "\n";
|
s += ChatColor.GRAY + "- " + ChatColor.YELLOW + q.getName() + "\n";
|
||||||
}
|
}
|
||||||
return s + ChatColor.GOLD + Lang.get("questEditorEditEnterQuestName");
|
return s + ChatColor.GOLD + Lang.get("questEditorEnterQuestName");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -514,6 +515,382 @@ public class QuestFactory implements ConversationAbandonedListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
|
public static void loadQuest(ConversationContext cc, Quest q) {
|
||||||
|
cc.setSessionData(CK.ED_QUEST_EDIT, q.getName());
|
||||||
|
cc.setSessionData(CK.Q_NAME, q.getName());
|
||||||
|
if (q.npcStart != null) {
|
||||||
|
cc.setSessionData(CK.Q_START_NPC, q.npcStart.getId());
|
||||||
|
}
|
||||||
|
cc.setSessionData(CK.Q_START_BLOCK, q.blockStart);
|
||||||
|
cc.setSessionData(CK.Q_ASK_MESSAGE, q.description);
|
||||||
|
cc.setSessionData(CK.Q_FINISH_MESSAGE, q.finished);
|
||||||
|
if (q.initialAction != null) {
|
||||||
|
cc.setSessionData(CK.Q_INITIAL_EVENT, q.initialAction.getName());
|
||||||
|
}
|
||||||
|
if (q.regionStart != null) {
|
||||||
|
cc.setSessionData(CK.Q_REGION, q.regionStart);
|
||||||
|
}
|
||||||
|
if (q.guiDisplay != null) {
|
||||||
|
cc.setSessionData(CK.Q_GUIDISPLAY, q.guiDisplay);
|
||||||
|
}
|
||||||
|
Requirements reqs = q.getRequirements();
|
||||||
|
if (reqs.getMoney() != 0) {
|
||||||
|
cc.setSessionData(CK.REQ_MONEY, reqs.getMoney());
|
||||||
|
}
|
||||||
|
if (reqs.getQuestPoints() != 0) {
|
||||||
|
cc.setSessionData(CK.REQ_QUEST_POINTS, reqs.getQuestPoints());
|
||||||
|
}
|
||||||
|
if (reqs.getItems().isEmpty() == false) {
|
||||||
|
cc.setSessionData(CK.REQ_ITEMS, reqs.getItems());
|
||||||
|
cc.setSessionData(CK.REQ_ITEMS_REMOVE, reqs.getRemoveItems());
|
||||||
|
}
|
||||||
|
if (reqs.getNeededQuests().isEmpty() == false) {
|
||||||
|
cc.setSessionData(CK.REQ_QUEST, reqs.getNeededQuests());
|
||||||
|
}
|
||||||
|
if (reqs.getBlockQuests().isEmpty() == false) {
|
||||||
|
cc.setSessionData(CK.REQ_QUEST_BLOCK, reqs.getBlockQuests());
|
||||||
|
}
|
||||||
|
if (reqs.getMcmmoSkills().isEmpty() == false) {
|
||||||
|
cc.setSessionData(CK.REQ_MCMMO_SKILLS, reqs.getMcmmoAmounts());
|
||||||
|
cc.setSessionData(CK.REQ_MCMMO_SKILL_AMOUNTS, reqs.getMcmmoAmounts());
|
||||||
|
}
|
||||||
|
if (reqs.getPermissions().isEmpty() == false) {
|
||||||
|
cc.setSessionData(CK.REQ_PERMISSION, reqs.getPermissions());
|
||||||
|
}
|
||||||
|
if (reqs.getHeroesPrimaryClass() != null) {
|
||||||
|
cc.setSessionData(CK.REQ_HEROES_PRIMARY_CLASS, reqs.getHeroesPrimaryClass());
|
||||||
|
}
|
||||||
|
if (reqs.getHeroesSecondaryClass() != null) {
|
||||||
|
cc.setSessionData(CK.REQ_HEROES_SECONDARY_CLASS, reqs.getHeroesSecondaryClass());
|
||||||
|
}
|
||||||
|
if (reqs.getFailRequirements() != null) {
|
||||||
|
cc.setSessionData(CK.Q_FAIL_MESSAGE, reqs.getFailRequirements());
|
||||||
|
}
|
||||||
|
if (reqs.getCustomRequirements().isEmpty() == false) {
|
||||||
|
LinkedList<String> list = new LinkedList<String>();
|
||||||
|
LinkedList<Map<String, Object>> datamapList = new LinkedList<Map<String, Object>>();
|
||||||
|
for (Entry<String, Map<String, Object>> entry : reqs.getCustomRequirements().entrySet()) {
|
||||||
|
list.add(entry.getKey());
|
||||||
|
datamapList.add(entry.getValue());
|
||||||
|
}
|
||||||
|
cc.setSessionData(CK.REQ_CUSTOM, list);
|
||||||
|
cc.setSessionData(CK.REQ_CUSTOM_DATA, datamapList);
|
||||||
|
}
|
||||||
|
Rewards rews = q.getRewards();
|
||||||
|
if (rews.getMoney() != 0) {
|
||||||
|
cc.setSessionData(CK.REW_MONEY, rews.getMoney());
|
||||||
|
}
|
||||||
|
if (rews.getQuestPoints() != 0) {
|
||||||
|
cc.setSessionData(CK.REW_QUEST_POINTS, rews.getQuestPoints());
|
||||||
|
}
|
||||||
|
if (rews.getExp() != 0) {
|
||||||
|
cc.setSessionData(CK.REW_EXP, rews.getExp());
|
||||||
|
}
|
||||||
|
if (rews.getItems().isEmpty() == false) {
|
||||||
|
cc.setSessionData(CK.REW_ITEMS, rews.getItems());
|
||||||
|
}
|
||||||
|
if (rews.getCommands().isEmpty() == false) {
|
||||||
|
cc.setSessionData(CK.REW_COMMAND, rews.getCommands());
|
||||||
|
}
|
||||||
|
if (rews.getCommandsOverrideDisplay().isEmpty() == false) {
|
||||||
|
cc.setSessionData(CK.REW_COMMAND_OVERRIDE_DISPLAY, rews.getCommandsOverrideDisplay());
|
||||||
|
}
|
||||||
|
if (rews.getPermissions().isEmpty() == false) {
|
||||||
|
cc.setSessionData(CK.REW_PERMISSION, rews.getPermissions());
|
||||||
|
}
|
||||||
|
if (rews.getMcmmoSkills().isEmpty() == false) {
|
||||||
|
cc.setSessionData(CK.REW_MCMMO_SKILLS, rews.getMcmmoSkills());
|
||||||
|
cc.setSessionData(CK.REW_MCMMO_AMOUNTS, rews.getMcmmoAmounts());
|
||||||
|
}
|
||||||
|
if (rews.getHeroesClasses().isEmpty() == false) {
|
||||||
|
cc.setSessionData(CK.REW_HEROES_CLASSES, rews.getHeroesClasses());
|
||||||
|
cc.setSessionData(CK.REW_HEROES_AMOUNTS, rews.getHeroesAmounts());
|
||||||
|
}
|
||||||
|
if (rews.getPhatLoots().isEmpty() == false) {
|
||||||
|
cc.setSessionData(CK.REW_PHAT_LOOTS, rews.getPhatLoots());
|
||||||
|
}
|
||||||
|
if (rews.getCustomRewards().isEmpty() == false) {
|
||||||
|
cc.setSessionData(CK.REW_CUSTOM, new LinkedList<String>(rews.getCustomRewards().keySet()));
|
||||||
|
cc.setSessionData(CK.REW_CUSTOM_DATA, new LinkedList<Object>(rews.getCustomRewards().values()));
|
||||||
|
}
|
||||||
|
Planner pln = q.getPlanner();
|
||||||
|
if (pln.getStart() != null) {
|
||||||
|
cc.setSessionData(CK.PLN_START_DATE, pln.getStart());
|
||||||
|
}
|
||||||
|
if (pln.getEnd() != null) {
|
||||||
|
cc.setSessionData(CK.PLN_END_DATE, pln.getEnd());
|
||||||
|
}
|
||||||
|
if (pln.getRepeat() != -1) {
|
||||||
|
cc.setSessionData(CK.PLN_REPEAT_CYCLE, pln.getRepeat());
|
||||||
|
}
|
||||||
|
if (pln.getCooldown() != -1) {
|
||||||
|
cc.setSessionData(CK.PLN_COOLDOWN, pln.getCooldown());
|
||||||
|
}
|
||||||
|
Options opt = q.getOptions();
|
||||||
|
cc.setSessionData(CK.OPT_ALLOW_COMMANDS, opt.getAllowCommands());
|
||||||
|
cc.setSessionData(CK.OPT_ALLOW_QUITTING, opt.getAllowQuitting());
|
||||||
|
cc.setSessionData(CK.OPT_USE_DUNGEONSXL_PLUGIN, opt.getUseDungeonsXLPlugin());
|
||||||
|
cc.setSessionData(CK.OPT_USE_PARTIES_PLUGIN, opt.getUsePartiesPlugin());
|
||||||
|
cc.setSessionData(CK.OPT_SHARE_PROGRESS_LEVEL, opt.getShareProgressLevel());
|
||||||
|
cc.setSessionData(CK.OPT_REQUIRE_SAME_QUEST, opt.getRequireSameQuest());
|
||||||
|
// Stages (Objectives)
|
||||||
|
int index = 1;
|
||||||
|
for (Stage stage : q.getStages()) {
|
||||||
|
final String pref = "stage" + index;
|
||||||
|
index++;
|
||||||
|
cc.setSessionData(pref, Boolean.TRUE);
|
||||||
|
if (stage.blocksToBreak != null) {
|
||||||
|
LinkedList<String> names = new LinkedList<String>();
|
||||||
|
LinkedList<Integer> amnts = new LinkedList<Integer>();
|
||||||
|
LinkedList<Short> durab = new LinkedList<Short>();
|
||||||
|
for (ItemStack e : stage.blocksToBreak) {
|
||||||
|
names.add(e.getType().name());
|
||||||
|
amnts.add(e.getAmount());
|
||||||
|
durab.add(e.getDurability());
|
||||||
|
}
|
||||||
|
cc.setSessionData(pref + CK.S_BREAK_NAMES, names);
|
||||||
|
cc.setSessionData(pref + CK.S_BREAK_AMOUNTS, amnts);
|
||||||
|
cc.setSessionData(pref + CK.S_BREAK_DURABILITY, durab);
|
||||||
|
}
|
||||||
|
if (stage.blocksToDamage != null) {
|
||||||
|
LinkedList<String> names = new LinkedList<String>();
|
||||||
|
LinkedList<Integer> amnts = new LinkedList<Integer>();
|
||||||
|
LinkedList<Short> durab = new LinkedList<Short>();
|
||||||
|
for (ItemStack e : stage.blocksToDamage) {
|
||||||
|
names.add(e.getType().name());
|
||||||
|
amnts.add(e.getAmount());
|
||||||
|
durab.add(e.getDurability());
|
||||||
|
}
|
||||||
|
cc.setSessionData(pref + CK.S_DAMAGE_NAMES, names);
|
||||||
|
cc.setSessionData(pref + CK.S_DAMAGE_AMOUNTS, amnts);
|
||||||
|
cc.setSessionData(pref + CK.S_DAMAGE_DURABILITY, durab);
|
||||||
|
}
|
||||||
|
if (stage.blocksToPlace != null) {
|
||||||
|
LinkedList<String> names = new LinkedList<String>();
|
||||||
|
LinkedList<Integer> amnts = new LinkedList<Integer>();
|
||||||
|
LinkedList<Short> durab = new LinkedList<Short>();
|
||||||
|
for (ItemStack e : stage.blocksToPlace) {
|
||||||
|
names.add(e.getType().name());
|
||||||
|
amnts.add(e.getAmount());
|
||||||
|
durab.add(e.getDurability());
|
||||||
|
}
|
||||||
|
cc.setSessionData(pref + CK.S_PLACE_NAMES, names);
|
||||||
|
cc.setSessionData(pref + CK.S_PLACE_AMOUNTS, amnts);
|
||||||
|
cc.setSessionData(pref + CK.S_PLACE_DURABILITY, durab);
|
||||||
|
}
|
||||||
|
if (stage.blocksToUse != null) {
|
||||||
|
LinkedList<String> names = new LinkedList<String>();
|
||||||
|
LinkedList<Integer> amnts = new LinkedList<Integer>();
|
||||||
|
LinkedList<Short> durab = new LinkedList<Short>();
|
||||||
|
for (ItemStack e : stage.blocksToUse) {
|
||||||
|
names.add(e.getType().name());
|
||||||
|
amnts.add(e.getAmount());
|
||||||
|
durab.add(e.getDurability());
|
||||||
|
}
|
||||||
|
cc.setSessionData(pref + CK.S_USE_NAMES, names);
|
||||||
|
cc.setSessionData(pref + CK.S_USE_AMOUNTS, amnts);
|
||||||
|
cc.setSessionData(pref + CK.S_USE_DURABILITY, durab);
|
||||||
|
}
|
||||||
|
if (stage.blocksToCut != null) {
|
||||||
|
LinkedList<String> names = new LinkedList<String>();
|
||||||
|
LinkedList<Integer> amnts = new LinkedList<Integer>();
|
||||||
|
LinkedList<Short> durab = new LinkedList<Short>();
|
||||||
|
for (ItemStack e : stage.blocksToCut) {
|
||||||
|
names.add(e.getType().name());
|
||||||
|
amnts.add(e.getAmount());
|
||||||
|
durab.add(e.getDurability());
|
||||||
|
}
|
||||||
|
cc.setSessionData(pref + CK.S_CUT_NAMES, names);
|
||||||
|
cc.setSessionData(pref + CK.S_CUT_AMOUNTS, amnts);
|
||||||
|
cc.setSessionData(pref + CK.S_CUT_DURABILITY, durab);
|
||||||
|
}
|
||||||
|
if (stage.getItemsToCraft().isEmpty() == false) {
|
||||||
|
LinkedList<ItemStack> items = new LinkedList<ItemStack>();
|
||||||
|
for (ItemStack is : stage.getItemsToCraft()) {
|
||||||
|
items.add(is);
|
||||||
|
}
|
||||||
|
cc.setSessionData(pref + CK.S_CRAFT_ITEMS, items);
|
||||||
|
}
|
||||||
|
if (stage.getItemsToSmelt().isEmpty() == false) {
|
||||||
|
LinkedList<ItemStack> items = new LinkedList<ItemStack>();
|
||||||
|
for (ItemStack is : stage.getItemsToSmelt()) {
|
||||||
|
items.add(is);
|
||||||
|
}
|
||||||
|
cc.setSessionData(pref + CK.S_SMELT_ITEMS, items);
|
||||||
|
}
|
||||||
|
if (stage.itemsToEnchant.isEmpty() == false) {
|
||||||
|
LinkedList<String> enchants = new LinkedList<String>();
|
||||||
|
LinkedList<String> names = new LinkedList<String>();
|
||||||
|
LinkedList<Integer> amounts = new LinkedList<Integer>();
|
||||||
|
for (Entry<Map<Enchantment, Material>, Integer> e : stage.itemsToEnchant.entrySet()) {
|
||||||
|
amounts.add(e.getValue());
|
||||||
|
for (Entry<Enchantment, Material> e2 : e.getKey().entrySet()) {
|
||||||
|
names.add(e2.getValue().name());
|
||||||
|
enchants.add(ItemUtil.getPrettyEnchantmentName(e2.getKey()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cc.setSessionData(pref + CK.S_ENCHANT_TYPES, enchants);
|
||||||
|
cc.setSessionData(pref + CK.S_ENCHANT_NAMES, names);
|
||||||
|
cc.setSessionData(pref + CK.S_ENCHANT_AMOUNTS, amounts);
|
||||||
|
}
|
||||||
|
if (stage.getItemsToBrew().isEmpty() == false) {
|
||||||
|
LinkedList<ItemStack> items = new LinkedList<ItemStack>();
|
||||||
|
for (ItemStack is : stage.getItemsToBrew()) {
|
||||||
|
items.add(is);
|
||||||
|
}
|
||||||
|
cc.setSessionData(pref + CK.S_BREW_ITEMS, items);
|
||||||
|
}
|
||||||
|
if (stage.fishToCatch != null) {
|
||||||
|
cc.setSessionData(pref + CK.S_FISH, stage.fishToCatch);
|
||||||
|
}
|
||||||
|
if (stage.playersToKill != null) {
|
||||||
|
cc.setSessionData(pref + CK.S_PLAYER_KILL, stage.playersToKill);
|
||||||
|
}
|
||||||
|
if (stage.getItemsToDeliver().isEmpty() == false) {
|
||||||
|
LinkedList<ItemStack> items = new LinkedList<ItemStack>();
|
||||||
|
LinkedList<Integer> npcs = new LinkedList<Integer>();
|
||||||
|
for (ItemStack is : stage.getItemsToDeliver()) {
|
||||||
|
items.add(is);
|
||||||
|
}
|
||||||
|
for (Integer n : stage.getItemDeliveryTargets()) {
|
||||||
|
npcs.add(n);
|
||||||
|
}
|
||||||
|
cc.setSessionData(pref + CK.S_DELIVERY_ITEMS, items);
|
||||||
|
cc.setSessionData(pref + CK.S_DELIVERY_NPCS, npcs);
|
||||||
|
cc.setSessionData(pref + CK.S_DELIVERY_MESSAGES, stage.deliverMessages);
|
||||||
|
}
|
||||||
|
if (stage.citizensToInteract.isEmpty() == false) {
|
||||||
|
LinkedList<Integer> npcs = new LinkedList<Integer>();
|
||||||
|
for (Integer n : stage.citizensToInteract) {
|
||||||
|
npcs.add(n);
|
||||||
|
}
|
||||||
|
cc.setSessionData(pref + CK.S_NPCS_TO_TALK_TO, npcs);
|
||||||
|
}
|
||||||
|
if (stage.citizensToKill.isEmpty() == false) {
|
||||||
|
LinkedList<Integer> npcs = new LinkedList<Integer>();
|
||||||
|
for (Integer n : stage.citizensToKill) {
|
||||||
|
npcs.add(n);
|
||||||
|
}
|
||||||
|
cc.setSessionData(pref + CK.S_NPCS_TO_KILL, npcs);
|
||||||
|
cc.setSessionData(pref + CK.S_NPCS_TO_KILL_AMOUNTS, stage.citizenNumToKill);
|
||||||
|
}
|
||||||
|
if (stage.mobsToKill.isEmpty() == false) {
|
||||||
|
LinkedList<String> mobs = new LinkedList<String>();
|
||||||
|
for (EntityType et : stage.mobsToKill) {
|
||||||
|
mobs.add(MiscUtil.getPrettyMobName(et));
|
||||||
|
}
|
||||||
|
cc.setSessionData(pref + CK.S_MOB_TYPES, mobs);
|
||||||
|
cc.setSessionData(pref + CK.S_MOB_AMOUNTS, stage.mobNumToKill);
|
||||||
|
if (stage.locationsToKillWithin.isEmpty() == false) {
|
||||||
|
LinkedList<String> locs = new LinkedList<String>();
|
||||||
|
for (Location l : stage.locationsToKillWithin) {
|
||||||
|
locs.add(Quests.getLocationInfo(l));
|
||||||
|
}
|
||||||
|
cc.setSessionData(pref + CK.S_MOB_KILL_LOCATIONS, locs);
|
||||||
|
cc.setSessionData(pref + CK.S_MOB_KILL_LOCATIONS_RADIUS, stage.radiiToKillWithin);
|
||||||
|
cc.setSessionData(pref + CK.S_MOB_KILL_LOCATIONS_NAMES, stage.killNames);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (stage.locationsToReach.isEmpty() == false) {
|
||||||
|
LinkedList<String> locs = new LinkedList<String>();
|
||||||
|
for (Location l : stage.locationsToReach) {
|
||||||
|
locs.add(Quests.getLocationInfo(l));
|
||||||
|
}
|
||||||
|
cc.setSessionData(pref + CK.S_REACH_LOCATIONS, locs);
|
||||||
|
cc.setSessionData(pref + CK.S_REACH_LOCATIONS_RADIUS, stage.radiiToReachWithin);
|
||||||
|
cc.setSessionData(pref + CK.S_REACH_LOCATIONS_NAMES, stage.locationNames);
|
||||||
|
}
|
||||||
|
if (stage.mobsToTame.isEmpty() == false) {
|
||||||
|
LinkedList<String> mobs = new LinkedList<String>();
|
||||||
|
LinkedList<Integer> amnts = new LinkedList<Integer>();
|
||||||
|
for (Entry<EntityType, Integer> e : stage.mobsToTame.entrySet()) {
|
||||||
|
mobs.add(MiscUtil.getPrettyMobName(e.getKey()));
|
||||||
|
amnts.add(e.getValue());
|
||||||
|
}
|
||||||
|
cc.setSessionData(pref + CK.S_TAME_TYPES, mobs);
|
||||||
|
cc.setSessionData(pref + CK.S_TAME_AMOUNTS, amnts);
|
||||||
|
}
|
||||||
|
if (stage.sheepToShear.isEmpty() == false) {
|
||||||
|
LinkedList<String> colors = new LinkedList<String>();
|
||||||
|
LinkedList<Integer> amnts = new LinkedList<Integer>();
|
||||||
|
for (Entry<DyeColor, Integer> e : stage.sheepToShear.entrySet()) {
|
||||||
|
colors.add(MiscUtil.getPrettyDyeColorName(e.getKey()));
|
||||||
|
amnts.add(e.getValue());
|
||||||
|
}
|
||||||
|
cc.setSessionData(pref + CK.S_SHEAR_COLORS, colors);
|
||||||
|
cc.setSessionData(pref + CK.S_SHEAR_AMOUNTS, amnts);
|
||||||
|
}
|
||||||
|
if (stage.passwordDisplays.isEmpty() == false) {
|
||||||
|
cc.setSessionData(pref + CK.S_PASSWORD_DISPLAYS, stage.passwordDisplays);
|
||||||
|
cc.setSessionData(pref + CK.S_PASSWORD_PHRASES, stage.passwordPhrases);
|
||||||
|
}
|
||||||
|
if (stage.customObjectives.isEmpty() == false) {
|
||||||
|
LinkedList<String> list = new LinkedList<String>();
|
||||||
|
LinkedList<Integer> countList = new LinkedList<Integer>();
|
||||||
|
LinkedList<Entry<String, Object>> datamapList = new LinkedList<Entry<String, Object>>();
|
||||||
|
for (int i = 0; i < stage.customObjectives.size(); i++) {
|
||||||
|
list.add(stage.customObjectives.get(i).getName());
|
||||||
|
countList.add(stage.customObjectiveCounts.get(i));
|
||||||
|
}
|
||||||
|
datamapList.addAll(stage.customObjectiveData);
|
||||||
|
cc.setSessionData(pref + CK.S_CUSTOM_OBJECTIVES, list);
|
||||||
|
cc.setSessionData(pref + CK.S_CUSTOM_OBJECTIVES_COUNT, countList);
|
||||||
|
cc.setSessionData(pref + CK.S_CUSTOM_OBJECTIVES_DATA, datamapList);
|
||||||
|
}
|
||||||
|
if (stage.startEvent != null) {
|
||||||
|
cc.setSessionData(pref + CK.S_START_EVENT, stage.startEvent.getName());
|
||||||
|
}
|
||||||
|
if (stage.finishEvent != null) {
|
||||||
|
cc.setSessionData(pref + CK.S_FINISH_EVENT, stage.finishEvent.getName());
|
||||||
|
}
|
||||||
|
if (stage.deathEvent != null) {
|
||||||
|
cc.setSessionData(pref + CK.S_DEATH_EVENT, stage.deathEvent.getName());
|
||||||
|
}
|
||||||
|
if (stage.disconnectEvent != null) {
|
||||||
|
cc.setSessionData(pref + CK.S_DISCONNECT_EVENT, stage.disconnectEvent.getName());
|
||||||
|
}
|
||||||
|
if (stage.chatEvents != null) {
|
||||||
|
LinkedList<String> chatEvents = new LinkedList<String>();
|
||||||
|
LinkedList<String> chatEventTriggers = new LinkedList<String>();
|
||||||
|
for (String s : stage.chatEvents.keySet()) {
|
||||||
|
chatEventTriggers.add(s);
|
||||||
|
chatEvents.add(stage.chatEvents.get(s).getName());
|
||||||
|
}
|
||||||
|
cc.setSessionData(pref + CK.S_CHAT_EVENTS, chatEvents);
|
||||||
|
cc.setSessionData(pref + CK.S_CHAT_EVENT_TRIGGERS, chatEventTriggers);
|
||||||
|
}
|
||||||
|
if (stage.commandEvents != null) {
|
||||||
|
LinkedList<String> commandEvents = new LinkedList<String>();
|
||||||
|
LinkedList<String> commandEventTriggers = new LinkedList<String>();
|
||||||
|
for (String s : stage.commandEvents.keySet()) {
|
||||||
|
commandEventTriggers.add(s);
|
||||||
|
commandEvents.add(stage.commandEvents.get(s).getName());
|
||||||
|
}
|
||||||
|
cc.setSessionData(pref + CK.S_COMMAND_EVENTS, commandEvents);
|
||||||
|
cc.setSessionData(pref + CK.S_COMMAND_EVENT_TRIGGERS, commandEventTriggers);
|
||||||
|
}
|
||||||
|
if (stage.delay != -1) {
|
||||||
|
cc.setSessionData(pref + CK.S_DELAY, stage.delay);
|
||||||
|
if (stage.delayMessage != null) {
|
||||||
|
cc.setSessionData(pref + CK.S_DELAY_MESSAGE, stage.delayMessage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (stage.script != null) {
|
||||||
|
cc.setSessionData(pref + CK.S_DENIZEN, stage.script);
|
||||||
|
}
|
||||||
|
if (stage.objectiveOverride != null) {
|
||||||
|
cc.setSessionData(pref + CK.S_OVERRIDE_DISPLAY, stage.objectiveOverride);
|
||||||
|
}
|
||||||
|
if (stage.completeMessage != null) {
|
||||||
|
cc.setSessionData(pref + CK.S_COMPLETE_MESSAGE, stage.completeMessage);
|
||||||
|
}
|
||||||
|
if (stage.startMessage != null) {
|
||||||
|
cc.setSessionData(pref + CK.S_START_MESSAGE, stage.startMessage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private class QuestNamePrompt extends StringPrompt {
|
private class QuestNamePrompt extends StringPrompt {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -1032,7 +1409,7 @@ public class QuestFactory implements ConversationAbandonedListener {
|
|||||||
npcStart = (Integer) cc.getSessionData(CK.Q_START_NPC);
|
npcStart = (Integer) cc.getSessionData(CK.Q_START_NPC);
|
||||||
}
|
}
|
||||||
if (cc.getSessionData(CK.Q_START_BLOCK) != null) {
|
if (cc.getSessionData(CK.Q_START_BLOCK) != null) {
|
||||||
blockStart = Quests.getLocationInfo((Location) cc.getSessionData(CK.Q_START_BLOCK));
|
blockStart = ConfigUtil.getLocationInfo((Location) cc.getSessionData(CK.Q_START_BLOCK));
|
||||||
}
|
}
|
||||||
if (cc.getSessionData(CK.REQ_MONEY) != null) {
|
if (cc.getSessionData(CK.REQ_MONEY) != null) {
|
||||||
moneyReq = (Integer) cc.getSessionData(CK.REQ_MONEY);
|
moneyReq = (Integer) cc.getSessionData(CK.REQ_MONEY);
|
||||||
@ -1638,382 +2015,6 @@ public class QuestFactory implements ConversationAbandonedListener {
|
|||||||
sch.set("require-same-quest", requireSameQuestOpt);
|
sch.set("require-same-quest", requireSameQuestOpt);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
public static void loadQuest(ConversationContext cc, Quest q) {
|
|
||||||
cc.setSessionData(CK.ED_QUEST_EDIT, q.getName());
|
|
||||||
cc.setSessionData(CK.Q_NAME, q.getName());
|
|
||||||
if (q.npcStart != null) {
|
|
||||||
cc.setSessionData(CK.Q_START_NPC, q.npcStart.getId());
|
|
||||||
}
|
|
||||||
cc.setSessionData(CK.Q_START_BLOCK, q.blockStart);
|
|
||||||
cc.setSessionData(CK.Q_ASK_MESSAGE, q.description);
|
|
||||||
cc.setSessionData(CK.Q_FINISH_MESSAGE, q.finished);
|
|
||||||
if (q.initialAction != null) {
|
|
||||||
cc.setSessionData(CK.Q_INITIAL_EVENT, q.initialAction.getName());
|
|
||||||
}
|
|
||||||
if (q.region != null) {
|
|
||||||
cc.setSessionData(CK.Q_REGION, q.region);
|
|
||||||
}
|
|
||||||
if (q.guiDisplay != null) {
|
|
||||||
cc.setSessionData(CK.Q_GUIDISPLAY, q.guiDisplay);
|
|
||||||
}
|
|
||||||
Requirements reqs = q.getRequirements();
|
|
||||||
if (reqs.getMoney() != 0) {
|
|
||||||
cc.setSessionData(CK.REQ_MONEY, reqs.getMoney());
|
|
||||||
}
|
|
||||||
if (reqs.getQuestPoints() != 0) {
|
|
||||||
cc.setSessionData(CK.REQ_QUEST_POINTS, reqs.getQuestPoints());
|
|
||||||
}
|
|
||||||
if (reqs.getItems().isEmpty() == false) {
|
|
||||||
cc.setSessionData(CK.REQ_ITEMS, reqs.getItems());
|
|
||||||
cc.setSessionData(CK.REQ_ITEMS_REMOVE, reqs.getRemoveItems());
|
|
||||||
}
|
|
||||||
if (reqs.getNeededQuests().isEmpty() == false) {
|
|
||||||
cc.setSessionData(CK.REQ_QUEST, reqs.getNeededQuests());
|
|
||||||
}
|
|
||||||
if (reqs.getBlockQuests().isEmpty() == false) {
|
|
||||||
cc.setSessionData(CK.REQ_QUEST_BLOCK, reqs.getBlockQuests());
|
|
||||||
}
|
|
||||||
if (reqs.getMcmmoSkills().isEmpty() == false) {
|
|
||||||
cc.setSessionData(CK.REQ_MCMMO_SKILLS, reqs.getMcmmoAmounts());
|
|
||||||
cc.setSessionData(CK.REQ_MCMMO_SKILL_AMOUNTS, reqs.getMcmmoAmounts());
|
|
||||||
}
|
|
||||||
if (reqs.getPermissions().isEmpty() == false) {
|
|
||||||
cc.setSessionData(CK.REQ_PERMISSION, reqs.getPermissions());
|
|
||||||
}
|
|
||||||
if (reqs.getHeroesPrimaryClass() != null) {
|
|
||||||
cc.setSessionData(CK.REQ_HEROES_PRIMARY_CLASS, reqs.getHeroesPrimaryClass());
|
|
||||||
}
|
|
||||||
if (reqs.getHeroesSecondaryClass() != null) {
|
|
||||||
cc.setSessionData(CK.REQ_HEROES_SECONDARY_CLASS, reqs.getHeroesSecondaryClass());
|
|
||||||
}
|
|
||||||
if (reqs.getFailRequirements() != null) {
|
|
||||||
cc.setSessionData(CK.Q_FAIL_MESSAGE, reqs.getFailRequirements());
|
|
||||||
}
|
|
||||||
if (reqs.getCustomRequirements().isEmpty() == false) {
|
|
||||||
LinkedList<String> list = new LinkedList<String>();
|
|
||||||
LinkedList<Map<String, Object>> datamapList = new LinkedList<Map<String, Object>>();
|
|
||||||
for (Entry<String, Map<String, Object>> entry : reqs.getCustomRequirements().entrySet()) {
|
|
||||||
list.add(entry.getKey());
|
|
||||||
datamapList.add(entry.getValue());
|
|
||||||
}
|
|
||||||
cc.setSessionData(CK.REQ_CUSTOM, list);
|
|
||||||
cc.setSessionData(CK.REQ_CUSTOM_DATA, datamapList);
|
|
||||||
}
|
|
||||||
Rewards rews = q.getRewards();
|
|
||||||
if (rews.getMoney() != 0) {
|
|
||||||
cc.setSessionData(CK.REW_MONEY, rews.getMoney());
|
|
||||||
}
|
|
||||||
if (rews.getQuestPoints() != 0) {
|
|
||||||
cc.setSessionData(CK.REW_QUEST_POINTS, rews.getQuestPoints());
|
|
||||||
}
|
|
||||||
if (rews.getExp() != 0) {
|
|
||||||
cc.setSessionData(CK.REW_EXP, rews.getExp());
|
|
||||||
}
|
|
||||||
if (rews.getItems().isEmpty() == false) {
|
|
||||||
cc.setSessionData(CK.REW_ITEMS, rews.getItems());
|
|
||||||
}
|
|
||||||
if (rews.getCommands().isEmpty() == false) {
|
|
||||||
cc.setSessionData(CK.REW_COMMAND, rews.getCommands());
|
|
||||||
}
|
|
||||||
if (rews.getCommandsOverrideDisplay().isEmpty() == false) {
|
|
||||||
cc.setSessionData(CK.REW_COMMAND_OVERRIDE_DISPLAY, rews.getCommandsOverrideDisplay());
|
|
||||||
}
|
|
||||||
if (rews.getPermissions().isEmpty() == false) {
|
|
||||||
cc.setSessionData(CK.REW_PERMISSION, rews.getPermissions());
|
|
||||||
}
|
|
||||||
if (rews.getMcmmoSkills().isEmpty() == false) {
|
|
||||||
cc.setSessionData(CK.REW_MCMMO_SKILLS, rews.getMcmmoSkills());
|
|
||||||
cc.setSessionData(CK.REW_MCMMO_AMOUNTS, rews.getMcmmoAmounts());
|
|
||||||
}
|
|
||||||
if (rews.getHeroesClasses().isEmpty() == false) {
|
|
||||||
cc.setSessionData(CK.REW_HEROES_CLASSES, rews.getHeroesClasses());
|
|
||||||
cc.setSessionData(CK.REW_HEROES_AMOUNTS, rews.getHeroesAmounts());
|
|
||||||
}
|
|
||||||
if (rews.getPhatLoots().isEmpty() == false) {
|
|
||||||
cc.setSessionData(CK.REW_PHAT_LOOTS, rews.getPhatLoots());
|
|
||||||
}
|
|
||||||
if (rews.getCustomRewards().isEmpty() == false) {
|
|
||||||
cc.setSessionData(CK.REW_CUSTOM, new LinkedList<String>(rews.getCustomRewards().keySet()));
|
|
||||||
cc.setSessionData(CK.REW_CUSTOM_DATA, new LinkedList<Object>(rews.getCustomRewards().values()));
|
|
||||||
}
|
|
||||||
Planner pln = q.getPlanner();
|
|
||||||
if (pln.getStart() != null) {
|
|
||||||
cc.setSessionData(CK.PLN_START_DATE, pln.getStart());
|
|
||||||
}
|
|
||||||
if (pln.getEnd() != null) {
|
|
||||||
cc.setSessionData(CK.PLN_END_DATE, pln.getEnd());
|
|
||||||
}
|
|
||||||
if (pln.getRepeat() != -1) {
|
|
||||||
cc.setSessionData(CK.PLN_REPEAT_CYCLE, pln.getRepeat());
|
|
||||||
}
|
|
||||||
if (pln.getCooldown() != -1) {
|
|
||||||
cc.setSessionData(CK.PLN_COOLDOWN, pln.getCooldown());
|
|
||||||
}
|
|
||||||
Options opt = q.getOptions();
|
|
||||||
cc.setSessionData(CK.OPT_ALLOW_COMMANDS, opt.getAllowCommands());
|
|
||||||
cc.setSessionData(CK.OPT_ALLOW_QUITTING, opt.getAllowQuitting());
|
|
||||||
cc.setSessionData(CK.OPT_USE_DUNGEONSXL_PLUGIN, opt.getUseDungeonsXLPlugin());
|
|
||||||
cc.setSessionData(CK.OPT_USE_PARTIES_PLUGIN, opt.getUsePartiesPlugin());
|
|
||||||
cc.setSessionData(CK.OPT_SHARE_PROGRESS_LEVEL, opt.getShareProgressLevel());
|
|
||||||
cc.setSessionData(CK.OPT_REQUIRE_SAME_QUEST, opt.getRequireSameQuest());
|
|
||||||
// Stages (Objectives)
|
|
||||||
int index = 1;
|
|
||||||
for (Stage stage : q.getStages()) {
|
|
||||||
final String pref = "stage" + index;
|
|
||||||
index++;
|
|
||||||
cc.setSessionData(pref, Boolean.TRUE);
|
|
||||||
if (stage.blocksToBreak != null) {
|
|
||||||
LinkedList<String> names = new LinkedList<String>();
|
|
||||||
LinkedList<Integer> amnts = new LinkedList<Integer>();
|
|
||||||
LinkedList<Short> durab = new LinkedList<Short>();
|
|
||||||
for (ItemStack e : stage.blocksToBreak) {
|
|
||||||
names.add(e.getType().name());
|
|
||||||
amnts.add(e.getAmount());
|
|
||||||
durab.add(e.getDurability());
|
|
||||||
}
|
|
||||||
cc.setSessionData(pref + CK.S_BREAK_NAMES, names);
|
|
||||||
cc.setSessionData(pref + CK.S_BREAK_AMOUNTS, amnts);
|
|
||||||
cc.setSessionData(pref + CK.S_BREAK_DURABILITY, durab);
|
|
||||||
}
|
|
||||||
if (stage.blocksToDamage != null) {
|
|
||||||
LinkedList<String> names = new LinkedList<String>();
|
|
||||||
LinkedList<Integer> amnts = new LinkedList<Integer>();
|
|
||||||
LinkedList<Short> durab = new LinkedList<Short>();
|
|
||||||
for (ItemStack e : stage.blocksToDamage) {
|
|
||||||
names.add(e.getType().name());
|
|
||||||
amnts.add(e.getAmount());
|
|
||||||
durab.add(e.getDurability());
|
|
||||||
}
|
|
||||||
cc.setSessionData(pref + CK.S_DAMAGE_NAMES, names);
|
|
||||||
cc.setSessionData(pref + CK.S_DAMAGE_AMOUNTS, amnts);
|
|
||||||
cc.setSessionData(pref + CK.S_DAMAGE_DURABILITY, durab);
|
|
||||||
}
|
|
||||||
if (stage.blocksToPlace != null) {
|
|
||||||
LinkedList<String> names = new LinkedList<String>();
|
|
||||||
LinkedList<Integer> amnts = new LinkedList<Integer>();
|
|
||||||
LinkedList<Short> durab = new LinkedList<Short>();
|
|
||||||
for (ItemStack e : stage.blocksToPlace) {
|
|
||||||
names.add(e.getType().name());
|
|
||||||
amnts.add(e.getAmount());
|
|
||||||
durab.add(e.getDurability());
|
|
||||||
}
|
|
||||||
cc.setSessionData(pref + CK.S_PLACE_NAMES, names);
|
|
||||||
cc.setSessionData(pref + CK.S_PLACE_AMOUNTS, amnts);
|
|
||||||
cc.setSessionData(pref + CK.S_PLACE_DURABILITY, durab);
|
|
||||||
}
|
|
||||||
if (stage.blocksToUse != null) {
|
|
||||||
LinkedList<String> names = new LinkedList<String>();
|
|
||||||
LinkedList<Integer> amnts = new LinkedList<Integer>();
|
|
||||||
LinkedList<Short> durab = new LinkedList<Short>();
|
|
||||||
for (ItemStack e : stage.blocksToUse) {
|
|
||||||
names.add(e.getType().name());
|
|
||||||
amnts.add(e.getAmount());
|
|
||||||
durab.add(e.getDurability());
|
|
||||||
}
|
|
||||||
cc.setSessionData(pref + CK.S_USE_NAMES, names);
|
|
||||||
cc.setSessionData(pref + CK.S_USE_AMOUNTS, amnts);
|
|
||||||
cc.setSessionData(pref + CK.S_USE_DURABILITY, durab);
|
|
||||||
}
|
|
||||||
if (stage.blocksToCut != null) {
|
|
||||||
LinkedList<String> names = new LinkedList<String>();
|
|
||||||
LinkedList<Integer> amnts = new LinkedList<Integer>();
|
|
||||||
LinkedList<Short> durab = new LinkedList<Short>();
|
|
||||||
for (ItemStack e : stage.blocksToCut) {
|
|
||||||
names.add(e.getType().name());
|
|
||||||
amnts.add(e.getAmount());
|
|
||||||
durab.add(e.getDurability());
|
|
||||||
}
|
|
||||||
cc.setSessionData(pref + CK.S_CUT_NAMES, names);
|
|
||||||
cc.setSessionData(pref + CK.S_CUT_AMOUNTS, amnts);
|
|
||||||
cc.setSessionData(pref + CK.S_CUT_DURABILITY, durab);
|
|
||||||
}
|
|
||||||
if (stage.getItemsToCraft().isEmpty() == false) {
|
|
||||||
LinkedList<ItemStack> items = new LinkedList<ItemStack>();
|
|
||||||
for (ItemStack is : stage.getItemsToCraft()) {
|
|
||||||
items.add(is);
|
|
||||||
}
|
|
||||||
cc.setSessionData(pref + CK.S_CRAFT_ITEMS, items);
|
|
||||||
}
|
|
||||||
if (stage.getItemsToSmelt().isEmpty() == false) {
|
|
||||||
LinkedList<ItemStack> items = new LinkedList<ItemStack>();
|
|
||||||
for (ItemStack is : stage.getItemsToSmelt()) {
|
|
||||||
items.add(is);
|
|
||||||
}
|
|
||||||
cc.setSessionData(pref + CK.S_SMELT_ITEMS, items);
|
|
||||||
}
|
|
||||||
if (stage.itemsToEnchant.isEmpty() == false) {
|
|
||||||
LinkedList<String> enchants = new LinkedList<String>();
|
|
||||||
LinkedList<String> names = new LinkedList<String>();
|
|
||||||
LinkedList<Integer> amounts = new LinkedList<Integer>();
|
|
||||||
for (Entry<Map<Enchantment, Material>, Integer> e : stage.itemsToEnchant.entrySet()) {
|
|
||||||
amounts.add(e.getValue());
|
|
||||||
for (Entry<Enchantment, Material> e2 : e.getKey().entrySet()) {
|
|
||||||
names.add(e2.getValue().name());
|
|
||||||
enchants.add(ItemUtil.getPrettyEnchantmentName(e2.getKey()));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
cc.setSessionData(pref + CK.S_ENCHANT_TYPES, enchants);
|
|
||||||
cc.setSessionData(pref + CK.S_ENCHANT_NAMES, names);
|
|
||||||
cc.setSessionData(pref + CK.S_ENCHANT_AMOUNTS, amounts);
|
|
||||||
}
|
|
||||||
if (stage.getItemsToBrew().isEmpty() == false) {
|
|
||||||
LinkedList<ItemStack> items = new LinkedList<ItemStack>();
|
|
||||||
for (ItemStack is : stage.getItemsToBrew()) {
|
|
||||||
items.add(is);
|
|
||||||
}
|
|
||||||
cc.setSessionData(pref + CK.S_BREW_ITEMS, items);
|
|
||||||
}
|
|
||||||
if (stage.fishToCatch != null) {
|
|
||||||
cc.setSessionData(pref + CK.S_FISH, stage.fishToCatch);
|
|
||||||
}
|
|
||||||
if (stage.playersToKill != null) {
|
|
||||||
cc.setSessionData(pref + CK.S_PLAYER_KILL, stage.playersToKill);
|
|
||||||
}
|
|
||||||
if (stage.getItemsToDeliver().isEmpty() == false) {
|
|
||||||
LinkedList<ItemStack> items = new LinkedList<ItemStack>();
|
|
||||||
LinkedList<Integer> npcs = new LinkedList<Integer>();
|
|
||||||
for (ItemStack is : stage.getItemsToDeliver()) {
|
|
||||||
items.add(is);
|
|
||||||
}
|
|
||||||
for (Integer n : stage.getItemDeliveryTargets()) {
|
|
||||||
npcs.add(n);
|
|
||||||
}
|
|
||||||
cc.setSessionData(pref + CK.S_DELIVERY_ITEMS, items);
|
|
||||||
cc.setSessionData(pref + CK.S_DELIVERY_NPCS, npcs);
|
|
||||||
cc.setSessionData(pref + CK.S_DELIVERY_MESSAGES, stage.deliverMessages);
|
|
||||||
}
|
|
||||||
if (stage.citizensToInteract.isEmpty() == false) {
|
|
||||||
LinkedList<Integer> npcs = new LinkedList<Integer>();
|
|
||||||
for (Integer n : stage.citizensToInteract) {
|
|
||||||
npcs.add(n);
|
|
||||||
}
|
|
||||||
cc.setSessionData(pref + CK.S_NPCS_TO_TALK_TO, npcs);
|
|
||||||
}
|
|
||||||
if (stage.citizensToKill.isEmpty() == false) {
|
|
||||||
LinkedList<Integer> npcs = new LinkedList<Integer>();
|
|
||||||
for (Integer n : stage.citizensToKill) {
|
|
||||||
npcs.add(n);
|
|
||||||
}
|
|
||||||
cc.setSessionData(pref + CK.S_NPCS_TO_KILL, npcs);
|
|
||||||
cc.setSessionData(pref + CK.S_NPCS_TO_KILL_AMOUNTS, stage.citizenNumToKill);
|
|
||||||
}
|
|
||||||
if (stage.mobsToKill.isEmpty() == false) {
|
|
||||||
LinkedList<String> mobs = new LinkedList<String>();
|
|
||||||
for (EntityType et : stage.mobsToKill) {
|
|
||||||
mobs.add(MiscUtil.getPrettyMobName(et));
|
|
||||||
}
|
|
||||||
cc.setSessionData(pref + CK.S_MOB_TYPES, mobs);
|
|
||||||
cc.setSessionData(pref + CK.S_MOB_AMOUNTS, stage.mobNumToKill);
|
|
||||||
if (stage.locationsToKillWithin.isEmpty() == false) {
|
|
||||||
LinkedList<String> locs = new LinkedList<String>();
|
|
||||||
for (Location l : stage.locationsToKillWithin) {
|
|
||||||
locs.add(Quests.getLocationInfo(l));
|
|
||||||
}
|
|
||||||
cc.setSessionData(pref + CK.S_MOB_KILL_LOCATIONS, locs);
|
|
||||||
cc.setSessionData(pref + CK.S_MOB_KILL_LOCATIONS_RADIUS, stage.radiiToKillWithin);
|
|
||||||
cc.setSessionData(pref + CK.S_MOB_KILL_LOCATIONS_NAMES, stage.killNames);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (stage.locationsToReach.isEmpty() == false) {
|
|
||||||
LinkedList<String> locs = new LinkedList<String>();
|
|
||||||
for (Location l : stage.locationsToReach) {
|
|
||||||
locs.add(Quests.getLocationInfo(l));
|
|
||||||
}
|
|
||||||
cc.setSessionData(pref + CK.S_REACH_LOCATIONS, locs);
|
|
||||||
cc.setSessionData(pref + CK.S_REACH_LOCATIONS_RADIUS, stage.radiiToReachWithin);
|
|
||||||
cc.setSessionData(pref + CK.S_REACH_LOCATIONS_NAMES, stage.locationNames);
|
|
||||||
}
|
|
||||||
if (stage.mobsToTame.isEmpty() == false) {
|
|
||||||
LinkedList<String> mobs = new LinkedList<String>();
|
|
||||||
LinkedList<Integer> amnts = new LinkedList<Integer>();
|
|
||||||
for (Entry<EntityType, Integer> e : stage.mobsToTame.entrySet()) {
|
|
||||||
mobs.add(MiscUtil.getPrettyMobName(e.getKey()));
|
|
||||||
amnts.add(e.getValue());
|
|
||||||
}
|
|
||||||
cc.setSessionData(pref + CK.S_TAME_TYPES, mobs);
|
|
||||||
cc.setSessionData(pref + CK.S_TAME_AMOUNTS, amnts);
|
|
||||||
}
|
|
||||||
if (stage.sheepToShear.isEmpty() == false) {
|
|
||||||
LinkedList<String> colors = new LinkedList<String>();
|
|
||||||
LinkedList<Integer> amnts = new LinkedList<Integer>();
|
|
||||||
for (Entry<DyeColor, Integer> e : stage.sheepToShear.entrySet()) {
|
|
||||||
colors.add(MiscUtil.getPrettyDyeColorName(e.getKey()));
|
|
||||||
amnts.add(e.getValue());
|
|
||||||
}
|
|
||||||
cc.setSessionData(pref + CK.S_SHEAR_COLORS, colors);
|
|
||||||
cc.setSessionData(pref + CK.S_SHEAR_AMOUNTS, amnts);
|
|
||||||
}
|
|
||||||
if (stage.passwordDisplays.isEmpty() == false) {
|
|
||||||
cc.setSessionData(pref + CK.S_PASSWORD_DISPLAYS, stage.passwordDisplays);
|
|
||||||
cc.setSessionData(pref + CK.S_PASSWORD_PHRASES, stage.passwordPhrases);
|
|
||||||
}
|
|
||||||
if (stage.customObjectives.isEmpty() == false) {
|
|
||||||
LinkedList<String> list = new LinkedList<String>();
|
|
||||||
LinkedList<Integer> countList = new LinkedList<Integer>();
|
|
||||||
LinkedList<Entry<String, Object>> datamapList = new LinkedList<Entry<String, Object>>();
|
|
||||||
for (int i = 0; i < stage.customObjectives.size(); i++) {
|
|
||||||
list.add(stage.customObjectives.get(i).getName());
|
|
||||||
countList.add(stage.customObjectiveCounts.get(i));
|
|
||||||
}
|
|
||||||
datamapList.addAll(stage.customObjectiveData);
|
|
||||||
cc.setSessionData(pref + CK.S_CUSTOM_OBJECTIVES, list);
|
|
||||||
cc.setSessionData(pref + CK.S_CUSTOM_OBJECTIVES_COUNT, countList);
|
|
||||||
cc.setSessionData(pref + CK.S_CUSTOM_OBJECTIVES_DATA, datamapList);
|
|
||||||
}
|
|
||||||
if (stage.startEvent != null) {
|
|
||||||
cc.setSessionData(pref + CK.S_START_EVENT, stage.startEvent.getName());
|
|
||||||
}
|
|
||||||
if (stage.finishEvent != null) {
|
|
||||||
cc.setSessionData(pref + CK.S_FINISH_EVENT, stage.finishEvent.getName());
|
|
||||||
}
|
|
||||||
if (stage.deathEvent != null) {
|
|
||||||
cc.setSessionData(pref + CK.S_DEATH_EVENT, stage.deathEvent.getName());
|
|
||||||
}
|
|
||||||
if (stage.disconnectEvent != null) {
|
|
||||||
cc.setSessionData(pref + CK.S_DISCONNECT_EVENT, stage.disconnectEvent.getName());
|
|
||||||
}
|
|
||||||
if (stage.chatEvents != null) {
|
|
||||||
LinkedList<String> chatEvents = new LinkedList<String>();
|
|
||||||
LinkedList<String> chatEventTriggers = new LinkedList<String>();
|
|
||||||
for (String s : stage.chatEvents.keySet()) {
|
|
||||||
chatEventTriggers.add(s);
|
|
||||||
chatEvents.add(stage.chatEvents.get(s).getName());
|
|
||||||
}
|
|
||||||
cc.setSessionData(pref + CK.S_CHAT_EVENTS, chatEvents);
|
|
||||||
cc.setSessionData(pref + CK.S_CHAT_EVENT_TRIGGERS, chatEventTriggers);
|
|
||||||
}
|
|
||||||
if (stage.commandEvents != null) {
|
|
||||||
LinkedList<String> commandEvents = new LinkedList<String>();
|
|
||||||
LinkedList<String> commandEventTriggers = new LinkedList<String>();
|
|
||||||
for (String s : stage.commandEvents.keySet()) {
|
|
||||||
commandEventTriggers.add(s);
|
|
||||||
commandEvents.add(stage.commandEvents.get(s).getName());
|
|
||||||
}
|
|
||||||
cc.setSessionData(pref + CK.S_COMMAND_EVENTS, commandEvents);
|
|
||||||
cc.setSessionData(pref + CK.S_COMMAND_EVENT_TRIGGERS, commandEventTriggers);
|
|
||||||
}
|
|
||||||
if (stage.delay != -1) {
|
|
||||||
cc.setSessionData(pref + CK.S_DELAY, stage.delay);
|
|
||||||
if (stage.delayMessage != null) {
|
|
||||||
cc.setSessionData(pref + CK.S_DELAY_MESSAGE, stage.delayMessage);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (stage.script != null) {
|
|
||||||
cc.setSessionData(pref + CK.S_DENIZEN, stage.script);
|
|
||||||
}
|
|
||||||
if (stage.objectiveOverride != null) {
|
|
||||||
cc.setSessionData(pref + CK.S_OVERRIDE_DISPLAY, stage.objectiveOverride);
|
|
||||||
}
|
|
||||||
if (stage.completeMessage != null) {
|
|
||||||
cc.setSessionData(pref + CK.S_COMPLETE_MESSAGE, stage.completeMessage);
|
|
||||||
}
|
|
||||||
if (stage.startMessage != null) {
|
|
||||||
cc.setSessionData(pref + CK.S_START_MESSAGE, stage.startMessage);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private class SelectDeletePrompt extends StringPrompt {
|
private class SelectDeletePrompt extends StringPrompt {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -20,7 +20,9 @@ import org.bukkit.entity.LivingEntity;
|
|||||||
import org.bukkit.inventory.EntityEquipment;
|
import org.bukkit.inventory.EntityEquipment;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
|
import me.blackvein.quests.util.ConfigUtil;
|
||||||
import me.blackvein.quests.util.ItemUtil;
|
import me.blackvein.quests.util.ItemUtil;
|
||||||
|
import me.blackvein.quests.util.MiscUtil;
|
||||||
|
|
||||||
public class QuestMob {
|
public class QuestMob {
|
||||||
|
|
||||||
@ -153,7 +155,7 @@ public class QuestMob {
|
|||||||
string += "::name-" + name;
|
string += "::name-" + name;
|
||||||
}
|
}
|
||||||
if (spawnLocation != null) {
|
if (spawnLocation != null) {
|
||||||
string += "::spawn-" + Quests.getLocationInfo(spawnLocation);
|
string += "::spawn-" + ConfigUtil.getLocationInfo(spawnLocation);
|
||||||
}
|
}
|
||||||
if (spawnAmounts != null) {
|
if (spawnAmounts != null) {
|
||||||
string += "::amounts-" + spawnAmounts;
|
string += "::amounts-" + spawnAmounts;
|
||||||
@ -191,11 +193,11 @@ public class QuestMob {
|
|||||||
String[] args = str.split("::");
|
String[] args = str.split("::");
|
||||||
for (String string : args) {
|
for (String string : args) {
|
||||||
if (string.startsWith("type-")) {
|
if (string.startsWith("type-")) {
|
||||||
entityType = Quests.getMobType(string.substring(5));
|
entityType = MiscUtil.getProperMobType(string.substring(5));
|
||||||
} else if (string.startsWith("name-")) {
|
} else if (string.startsWith("name-")) {
|
||||||
name = string.substring(5);
|
name = string.substring(5);
|
||||||
} else if (string.startsWith("spawn-")) {
|
} else if (string.startsWith("spawn-")) {
|
||||||
loc = Quests.getLocation(string.substring(6));
|
loc = ConfigUtil.getLocation(string.substring(6));
|
||||||
} else if (string.startsWith("amounts-")) {
|
} else if (string.startsWith("amounts-")) {
|
||||||
amounts = Integer.parseInt(string.substring(8));
|
amounts = Integer.parseInt(string.substring(8));
|
||||||
} else if (string.startsWith("hand-")) {
|
} else if (string.startsWith("hand-")) {
|
||||||
|
@ -54,11 +54,14 @@ import de.erethon.dungeonsxl.player.DGroup;
|
|||||||
import me.blackvein.quests.events.quest.QuestTakeEvent;
|
import me.blackvein.quests.events.quest.QuestTakeEvent;
|
||||||
import me.blackvein.quests.events.quester.QuesterPostStartQuestEvent;
|
import me.blackvein.quests.events.quester.QuesterPostStartQuestEvent;
|
||||||
import me.blackvein.quests.events.quester.QuesterPreStartQuestEvent;
|
import me.blackvein.quests.events.quester.QuesterPreStartQuestEvent;
|
||||||
import me.blackvein.quests.timers.StageTimer;
|
import me.blackvein.quests.tasks.StageTimer;
|
||||||
|
import me.blackvein.quests.util.ConfigUtil;
|
||||||
|
import me.blackvein.quests.util.InventoryUtil;
|
||||||
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 me.blackvein.quests.util.LocaleQuery;
|
import me.blackvein.quests.util.LocaleQuery;
|
||||||
import me.blackvein.quests.util.MiscUtil;
|
import me.blackvein.quests.util.MiscUtil;
|
||||||
|
import me.clip.placeholderapi.PlaceholderAPI;
|
||||||
import net.citizensnpcs.api.npc.NPC;
|
import net.citizensnpcs.api.npc.NPC;
|
||||||
|
|
||||||
public class Quester {
|
public class Quester {
|
||||||
@ -419,7 +422,7 @@ public class Quester {
|
|||||||
String early = Lang.get("plnTooEarly");
|
String early = Lang.get("plnTooEarly");
|
||||||
early = early.replace("<quest>", ChatColor.AQUA + q.getName() + ChatColor.YELLOW);
|
early = early.replace("<quest>", ChatColor.AQUA + q.getName() + ChatColor.YELLOW);
|
||||||
early = early.replace("<time>", ChatColor.DARK_PURPLE
|
early = early.replace("<time>", ChatColor.DARK_PURPLE
|
||||||
+ Quests.getTime(start - System.currentTimeMillis()) + ChatColor.YELLOW);
|
+ MiscUtil.getTime(start - System.currentTimeMillis()) + ChatColor.YELLOW);
|
||||||
player.sendMessage(ChatColor.YELLOW + early);
|
player.sendMessage(ChatColor.YELLOW + early);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -429,7 +432,7 @@ public class Quester {
|
|||||||
String late = Lang.get("plnTooLate");
|
String late = Lang.get("plnTooLate");
|
||||||
late = late.replace("<quest>", ChatColor.AQUA + q.getName() + ChatColor.RED);
|
late = late.replace("<quest>", ChatColor.AQUA + q.getName() + ChatColor.RED);
|
||||||
late = late.replace("<time>", ChatColor.DARK_PURPLE
|
late = late.replace("<time>", ChatColor.DARK_PURPLE
|
||||||
+ Quests.getTime(System.currentTimeMillis() - end) + ChatColor.RED);
|
+ MiscUtil.getTime(System.currentTimeMillis() - end) + ChatColor.RED);
|
||||||
player.sendMessage(ChatColor.RED + late);
|
player.sendMessage(ChatColor.RED + late);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -470,7 +473,7 @@ public class Quester {
|
|||||||
String early = Lang.get("plnTooEarly");
|
String early = Lang.get("plnTooEarly");
|
||||||
early = early.replace("<quest>", ChatColor.AQUA + q.getName() + ChatColor.YELLOW);
|
early = early.replace("<quest>", ChatColor.AQUA + q.getName() + ChatColor.YELLOW);
|
||||||
early = early.replace("<time>", ChatColor.DARK_PURPLE
|
early = early.replace("<time>", ChatColor.DARK_PURPLE
|
||||||
+ Quests.getTime(nextStart - System.currentTimeMillis()) + ChatColor.YELLOW);
|
+ MiscUtil.getTime(nextStart - System.currentTimeMillis()) + ChatColor.YELLOW);
|
||||||
player.sendMessage(ChatColor.YELLOW + early);
|
player.sendMessage(ChatColor.YELLOW + early);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -494,7 +497,7 @@ public class Quester {
|
|||||||
}
|
}
|
||||||
for (ItemStack is : reqs.getItems()) {
|
for (ItemStack is : reqs.getItems()) {
|
||||||
if (reqs.getRemoveItems().get(reqs.getItems().indexOf(is)) == true) {
|
if (reqs.getRemoveItems().get(reqs.getItems().indexOf(is)) == true) {
|
||||||
Quests.removeItem(player.getInventory(), is);
|
InventoryUtil.removeItem(player.getInventory(), is);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
String accepted = Lang.get(getPlayer(), "questAccepted");
|
String accepted = Lang.get(getPlayer(), "questAccepted");
|
||||||
@ -516,7 +519,8 @@ public class Quester {
|
|||||||
plugin.showObjectives(q, this, false);
|
plugin.showObjectives(q, this, false);
|
||||||
String stageStartMessage = stage.startMessage;
|
String stageStartMessage = stage.startMessage;
|
||||||
if (stageStartMessage != null) {
|
if (stageStartMessage != null) {
|
||||||
getPlayer().sendMessage(plugin.parseStringWithPossibleLineBreaks(stageStartMessage, q, getPlayer()));
|
getPlayer().sendMessage(ConfigUtil
|
||||||
|
.parseStringWithPossibleLineBreaks(stageStartMessage, q, getPlayer()));
|
||||||
}
|
}
|
||||||
if (stage.chatEvents.isEmpty() == false) {
|
if (stage.chatEvents.isEmpty() == false) {
|
||||||
for (String chatTrigger : stage.chatEvents.keySet()) {
|
for (String chatTrigger : stage.chatEvents.keySet()) {
|
||||||
@ -786,23 +790,20 @@ public class Quester {
|
|||||||
}
|
}
|
||||||
int index = 0;
|
int index = 0;
|
||||||
for (ItemStack is : getCurrentStage(quest).itemsToDeliver) {
|
for (ItemStack is : getCurrentStage(quest).itemsToDeliver) {
|
||||||
int delivered = 0;
|
int delivered = getQuestData(quest).itemsDelivered.get(index).getAmount();
|
||||||
if (getQuestData(quest).itemsDelivered.containsKey(is)) {
|
int toDeliver = is.getAmount();
|
||||||
delivered = getQuestData(quest).itemsDelivered.get(is);
|
|
||||||
}
|
|
||||||
int amt = is.getAmount();
|
|
||||||
Integer npc = getCurrentStage(quest).itemDeliveryTargets.get(index);
|
Integer npc = getCurrentStage(quest).itemDeliveryTargets.get(index);
|
||||||
index++;
|
index++;
|
||||||
if (delivered < amt) {
|
if (delivered < toDeliver) {
|
||||||
String obj = Lang.get(getPlayer(), "deliver");
|
String obj = Lang.get(getPlayer(), "deliver");
|
||||||
obj = obj.replace("<item>", ItemUtil.getName(is) + ChatColor.GREEN);
|
obj = obj.replace("<item>", ItemUtil.getName(is) + ChatColor.GREEN);
|
||||||
obj = obj.replace("<npc>", plugin.getNPCName(npc));
|
obj = obj.replace("<npc>", plugin.getNPCName(npc));
|
||||||
unfinishedObjectives.add(ChatColor.GREEN + obj + ": " + delivered + "/" + amt);
|
unfinishedObjectives.add(ChatColor.GREEN + obj + ": " + delivered + "/" + toDeliver);
|
||||||
} else {
|
} else {
|
||||||
String obj = Lang.get(getPlayer(), "deliver");
|
String obj = Lang.get(getPlayer(), "deliver");
|
||||||
obj = obj.replace("<item>", ItemUtil.getName(is) + ChatColor.GRAY);
|
obj = obj.replace("<item>", ItemUtil.getName(is) + ChatColor.GRAY);
|
||||||
obj = obj.replace("<npc>", plugin.getNPCName(npc));
|
obj = obj.replace("<npc>", plugin.getNPCName(npc));
|
||||||
finishedObjectives.add(ChatColor.GRAY + obj + ": " + delivered + "/" + amt);
|
finishedObjectives.add(ChatColor.GRAY + obj + ": " + delivered + "/" + toDeliver);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (Integer n : getCurrentStage(quest).citizensToInteract) {
|
for (Integer n : getCurrentStage(quest).citizensToInteract) {
|
||||||
@ -1700,9 +1701,12 @@ public class Quester {
|
|||||||
*/
|
*/
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
public void deliverToNPC(Quest quest, NPC n, ItemStack i) {
|
public void deliverToNPC(Quest quest, NPC n, ItemStack i) {
|
||||||
|
if (n == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
int currentIndex = -1;
|
int currentIndex = -1;
|
||||||
LinkedList<Integer> matches = new LinkedList<Integer>();
|
LinkedList<Integer> matches = new LinkedList<Integer>();
|
||||||
for (ItemStack is : getQuestData(quest).itemsDelivered.keySet()) {
|
for (ItemStack is : getQuestData(quest).itemsDelivered) {
|
||||||
currentIndex++;
|
currentIndex++;
|
||||||
if (ItemUtil.compareItems(i, is, true) == 0) {
|
if (ItemUtil.compareItems(i, is, true) == 0) {
|
||||||
matches.add(currentIndex);
|
matches.add(currentIndex);
|
||||||
@ -1712,27 +1716,28 @@ public class Quester {
|
|||||||
if (!matches.isEmpty()) {
|
if (!matches.isEmpty()) {
|
||||||
Player player = getPlayer();
|
Player player = getPlayer();
|
||||||
for (Integer match : matches) {
|
for (Integer match : matches) {
|
||||||
LinkedList<ItemStack> items = new LinkedList<ItemStack>(getQuestData(quest).itemsDelivered.keySet());
|
LinkedList<ItemStack> items = new LinkedList<ItemStack>(getQuestData(quest).itemsDelivered);
|
||||||
LinkedList<Integer> amounts = new LinkedList<Integer>(getQuestData(quest).itemsDelivered.values());
|
|
||||||
if (!getCurrentStage(quest).getItemDeliveryTargets().get(match).equals(n.getId())) {
|
if (!getCurrentStage(quest).getItemDeliveryTargets().get(match).equals(n.getId())) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
ItemStack found = items.get(match);
|
ItemStack found = items.get(match);
|
||||||
int amount = amounts.get(match);
|
int amount = found.getAmount();
|
||||||
int req = getCurrentStage(quest).itemsToDeliver.get(match).getAmount();
|
int toDeliver = getCurrentStage(quest).itemsToDeliver.get(match).getAmount();
|
||||||
|
|
||||||
Material m = i.getType();
|
Material m = i.getType();
|
||||||
if (amount < req) {
|
if (amount < toDeliver) {
|
||||||
int index = player.getInventory().first(i);
|
int index = player.getInventory().first(i);
|
||||||
if (index == -1) {
|
if (index == -1) {
|
||||||
Bukkit.getLogger().warning("Uh oh! " + i.getType().name()
|
// Already delivered in previous loop
|
||||||
+ " suddenly disappeared from the inventory of " + player.getName()
|
|
||||||
+ " when delivering for quest " + quest.getName());
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ((i.getAmount() + amount) >= req) {
|
if ((i.getAmount() + amount) >= toDeliver) {
|
||||||
getQuestData(quest).itemsDelivered.put(found, req);
|
ItemStack newStack = found;
|
||||||
if ((i.getAmount() + amount) >= req) {
|
found.setAmount(toDeliver);
|
||||||
i.setAmount(i.getAmount() - (req - amount)); // Take away remaining amount to be delivered
|
getQuestData(quest).itemsDelivered.set(items.indexOf(found), newStack);
|
||||||
|
if ((i.getAmount() + amount) >= toDeliver) {
|
||||||
|
// Take away remaining amount to be delivered
|
||||||
|
i.setAmount(i.getAmount() - (toDeliver - amount));
|
||||||
player.getInventory().setItem(index, i);
|
player.getInventory().setItem(index, i);
|
||||||
} else {
|
} else {
|
||||||
player.getInventory().setItem(index, null);
|
player.getInventory().setItem(index, null);
|
||||||
@ -1743,20 +1748,21 @@ public class Quester {
|
|||||||
|
|
||||||
// Multiplayer
|
// Multiplayer
|
||||||
dispatchMultiplayerObjectives(quest, getCurrentStage(quest), (Quester q) -> {
|
dispatchMultiplayerObjectives(quest, getCurrentStage(quest), (Quester q) -> {
|
||||||
q.getQuestData(quest).itemsDelivered.put(found, req);
|
q.getQuestData(quest).itemsDelivered.set(items.indexOf(found), newStack);
|
||||||
q.finishObjective(quest, "deliverItem", new ItemStack(m, 1), found, null, null, null, null,
|
q.finishObjective(quest, "deliverItem", new ItemStack(m, 1), found, null, null, null, null,
|
||||||
null, null, null, null);
|
null, null, null, null);
|
||||||
return null;
|
return null;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
getQuestData(quest).itemsDelivered.put(found, (amount + i.getAmount()));
|
ItemStack newStack = found;
|
||||||
|
found.setAmount(amount + i.getAmount());
|
||||||
|
getQuestData(quest).itemsDelivered.set(items.indexOf(found), newStack);
|
||||||
player.getInventory().setItem(index, null);
|
player.getInventory().setItem(index, null);
|
||||||
player.updateInventory();
|
player.updateInventory();
|
||||||
String[] message = Quests.parseStringWithPossibleLineBreaks(getCurrentStage(quest)
|
String[] message = ConfigUtil.parseStringWithPossibleLineBreaks(getCurrentStage(quest)
|
||||||
.deliverMessages.get(new Random().nextInt(getCurrentStage(quest).deliverMessages
|
.deliverMessages.get(new Random().nextInt(getCurrentStage(quest).deliverMessages
|
||||||
.size())), plugin.getDependencies().getCitizens().getNPCRegistry()
|
.size())), plugin.getDependencies().getCitizens().getNPCRegistry()
|
||||||
.getById(getCurrentStage(quest).itemDeliveryTargets.get(getCurrentStage(quest)
|
.getById(getCurrentStage(quest).itemDeliveryTargets.get(items.indexOf(found))));
|
||||||
.itemsToDeliver.indexOf(found))));
|
|
||||||
player.sendMessage(message);
|
player.sendMessage(message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1764,71 +1770,6 @@ public class Quester {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Mark item as delivered to a NPC if Quester has such an objective
|
|
||||||
*
|
|
||||||
* @param quest The quest for which the item is being delivered
|
|
||||||
* @param i The item being delivered
|
|
||||||
* @deprecated Use deliverToNPC()
|
|
||||||
*/
|
|
||||||
public void deliverItem(Quest quest, ItemStack i) {
|
|
||||||
Player player = getPlayer();
|
|
||||||
ItemStack found = null;
|
|
||||||
for (ItemStack is : getQuestData(quest).itemsDelivered.keySet()) {
|
|
||||||
if (ItemUtil.compareItems(i, is, true) == 0) {
|
|
||||||
found = is;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (found != null) {
|
|
||||||
int amount = getQuestData(quest).itemsDelivered.get(found);
|
|
||||||
if (getCurrentStage(quest).itemsToDeliver.indexOf(found) < 0) {
|
|
||||||
plugin.getLogger().severe("Index out of bounds while delivering " + found.getType() + " x "
|
|
||||||
+ found.getAmount() + " for quest " + quest.getName() + " with " + i.getType() + " x "
|
|
||||||
+ i.getAmount() + " already delivered. List amount reports value of " + amount
|
|
||||||
+ ". Please report this error on Github!");
|
|
||||||
player.sendMessage("Quests had a problem delivering your item, please contact an administrator!");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
int req = getCurrentStage(quest).itemsToDeliver.get(getCurrentStage(quest).itemsToDeliver.indexOf(found))
|
|
||||||
.getAmount();
|
|
||||||
Material m = i.getType();
|
|
||||||
if (amount < req) {
|
|
||||||
if ((i.getAmount() + amount) > req) {
|
|
||||||
getQuestData(quest).itemsDelivered.put(found, req);
|
|
||||||
if ((i.getAmount() + amount) > req) {
|
|
||||||
int index = player.getInventory().first(i);
|
|
||||||
i.setAmount(i.getAmount() - (req - amount)); // Take away remaining amount to be delivered
|
|
||||||
player.getInventory().setItem(index, i);
|
|
||||||
} else {
|
|
||||||
player.getInventory().setItem(player.getInventory().first(i), null);
|
|
||||||
}
|
|
||||||
player.updateInventory();
|
|
||||||
finishObjective(quest, "deliverItem", new ItemStack(m, 1), found, null, null, null, null, null,
|
|
||||||
null, null, null);
|
|
||||||
|
|
||||||
// Multiplayer
|
|
||||||
final ItemStack finalFound = found;
|
|
||||||
dispatchMultiplayerObjectives(quest, getCurrentStage(quest), (Quester q) -> {
|
|
||||||
q.getQuestData(quest).itemsDelivered.put(finalFound, req);
|
|
||||||
q.finishObjective(quest, "deliverItem", new ItemStack(m, 1), finalFound, null, null, null,
|
|
||||||
null, null, null, null, null);
|
|
||||||
return null;
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
getQuestData(quest).itemsDelivered.put(found, (amount + i.getAmount()));
|
|
||||||
player.getInventory().setItem(player.getInventory().first(i), null);
|
|
||||||
player.updateInventory();
|
|
||||||
String[] message = Quests.parseStringWithPossibleLineBreaks(getCurrentStage(quest).deliverMessages
|
|
||||||
.get(new Random().nextInt(getCurrentStage(quest).deliverMessages.size())), plugin
|
|
||||||
.getDependencies().getCitizens().getNPCRegistry().getById(getCurrentStage(quest)
|
|
||||||
.itemDeliveryTargets.get(getCurrentStage(quest).itemsToDeliver.indexOf(found))));
|
|
||||||
player.sendMessage(message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mark NPC as interacted with if Quester has such an objective
|
* Mark NPC as interacted with if Quester has such an objective
|
||||||
*
|
*
|
||||||
@ -1912,24 +1853,30 @@ public class Quester {
|
|||||||
// TODO - Find proper cause of Github issues #646 and #825
|
// TODO - Find proper cause of Github issues #646 and #825
|
||||||
if (index >= getQuestData(quest).hasReached.size()) {
|
if (index >= getQuestData(quest).hasReached.size()) {
|
||||||
getQuestData(quest).hasReached.add(true);
|
getQuestData(quest).hasReached.add(true);
|
||||||
} else {
|
|
||||||
getQuestData(quest).hasReached.set(index, true);
|
|
||||||
}
|
|
||||||
finishObjective(quest, "reachLocation", new ItemStack(Material.AIR, 1),
|
finishObjective(quest, "reachLocation", new ItemStack(Material.AIR, 1),
|
||||||
new ItemStack(Material.AIR, 1), null, null, null, null, location, null, null,
|
new ItemStack(Material.AIR, 1), null, null, null, null, location, null,
|
||||||
null);
|
null, null);
|
||||||
|
} else if (getQuestData(quest).hasReached.get(index) == false) {
|
||||||
|
getQuestData(quest).hasReached.set(index, true);
|
||||||
|
finishObjective(quest, "reachLocation", new ItemStack(Material.AIR, 1),
|
||||||
|
new ItemStack(Material.AIR, 1), null, null, null, null, location, null,
|
||||||
|
null, null);
|
||||||
|
}
|
||||||
|
|
||||||
// Multiplayer
|
// Multiplayer
|
||||||
final int finalIndex = index;
|
final int finalIndex = index;
|
||||||
dispatchMultiplayerObjectives(quest, getCurrentStage(quest), (Quester q) -> {
|
dispatchMultiplayerObjectives(quest, getCurrentStage(quest), (Quester q) -> {
|
||||||
if (finalIndex >= getQuestData(quest).hasReached.size()) {
|
if (finalIndex >= getQuestData(quest).hasReached.size()) {
|
||||||
q.getQuestData(quest).hasReached.add(true);
|
q.getQuestData(quest).hasReached.add(true);
|
||||||
} else {
|
|
||||||
q.getQuestData(quest).hasReached.set(finalIndex, true);
|
|
||||||
}
|
|
||||||
q.finishObjective(quest, "reachLocation", new ItemStack(Material.AIR, 1),
|
q.finishObjective(quest, "reachLocation", new ItemStack(Material.AIR, 1),
|
||||||
new ItemStack(Material.AIR, 1), null, null, null, null, location, null,
|
new ItemStack(Material.AIR, 1), null, null, null, null, location, null,
|
||||||
null, null);
|
null, null);
|
||||||
|
} else {
|
||||||
|
q.getQuestData(quest).hasReached.set(finalIndex, true);
|
||||||
|
q.finishObjective(quest, "reachLocation", new ItemStack(Material.AIR, 1),
|
||||||
|
new ItemStack(Material.AIR, 1), null, null, null, null, location, null,
|
||||||
|
null, null);
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -2073,6 +2020,9 @@ public class Quester {
|
|||||||
if (getCurrentStage(quest).objectiveOverride != null) {
|
if (getCurrentStage(quest).objectiveOverride != null) {
|
||||||
String message = ChatColor.GREEN + "(" + Lang.get(p, "completed") + ") " + getCurrentStage(quest)
|
String message = ChatColor.GREEN + "(" + Lang.get(p, "completed") + ") " + getCurrentStage(quest)
|
||||||
.objectiveOverride;
|
.objectiveOverride;
|
||||||
|
if (plugin.getDependencies().getPlaceholderApi() != null) {
|
||||||
|
message = PlaceholderAPI.setPlaceholders(p, message);
|
||||||
|
}
|
||||||
p.sendMessage(message);
|
p.sendMessage(message);
|
||||||
} else if (objective.equalsIgnoreCase("password")) {
|
} else if (objective.equalsIgnoreCase("password")) {
|
||||||
String message = ChatColor.GREEN + "(" + Lang.get(p, "completed") + ") " + pass;
|
String message = ChatColor.GREEN + "(" + Lang.get(p, "completed") + ") " + pass;
|
||||||
@ -2287,55 +2237,50 @@ public class Quester {
|
|||||||
data.setDoJournalUpdate(false);
|
data.setDoJournalUpdate(false);
|
||||||
if (quest.getStage(stage).blocksToBreak.isEmpty() == false) {
|
if (quest.getStage(stage).blocksToBreak.isEmpty() == false) {
|
||||||
for (ItemStack i : quest.getStage(stage).blocksToBreak) {
|
for (ItemStack i : quest.getStage(stage).blocksToBreak) {
|
||||||
if (data.blocksBroken.indexOf(i) != -1) {
|
|
||||||
ItemStack temp = new ItemStack(i.getType(), 0, i.getDurability());
|
ItemStack temp = new ItemStack(i.getType(), 0, i.getDurability());
|
||||||
|
if (data.blocksBroken.indexOf(i) != -1) {
|
||||||
data.blocksBroken.set(data.blocksBroken.indexOf(temp), temp);
|
data.blocksBroken.set(data.blocksBroken.indexOf(temp), temp);
|
||||||
} else {
|
} else {
|
||||||
ItemStack temp = new ItemStack(i.getType(), 0, i.getDurability());
|
|
||||||
data.blocksBroken.add(temp);
|
data.blocksBroken.add(temp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (quest.getStage(stage).blocksToDamage.isEmpty() == false) {
|
if (quest.getStage(stage).blocksToDamage.isEmpty() == false) {
|
||||||
for (ItemStack i : quest.getStage(stage).blocksToDamage) {
|
for (ItemStack i : quest.getStage(stage).blocksToDamage) {
|
||||||
if (data.blocksDamaged.indexOf(i) != -1) {
|
|
||||||
ItemStack temp = new ItemStack(i.getType(), 0, i.getDurability());
|
ItemStack temp = new ItemStack(i.getType(), 0, i.getDurability());
|
||||||
|
if (data.blocksDamaged.indexOf(i) != -1) {
|
||||||
data.blocksDamaged.set(data.blocksDamaged.indexOf(temp), temp);
|
data.blocksDamaged.set(data.blocksDamaged.indexOf(temp), temp);
|
||||||
} else {
|
} else {
|
||||||
ItemStack temp = new ItemStack(i.getType(), 0, i.getDurability());
|
|
||||||
data.blocksDamaged.add(temp);
|
data.blocksDamaged.add(temp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (quest.getStage(stage).blocksToPlace.isEmpty() == false) {
|
if (quest.getStage(stage).blocksToPlace.isEmpty() == false) {
|
||||||
for (ItemStack i : quest.getStage(stage).blocksToPlace) {
|
for (ItemStack i : quest.getStage(stage).blocksToPlace) {
|
||||||
if (data.blocksPlaced.indexOf(i) != -1) {
|
|
||||||
ItemStack temp = new ItemStack(i.getType(), 0, i.getDurability());
|
ItemStack temp = new ItemStack(i.getType(), 0, i.getDurability());
|
||||||
|
if (data.blocksPlaced.indexOf(i) != -1) {
|
||||||
data.blocksPlaced.set(data.blocksPlaced.indexOf(temp), temp);
|
data.blocksPlaced.set(data.blocksPlaced.indexOf(temp), temp);
|
||||||
} else {
|
} else {
|
||||||
ItemStack temp = new ItemStack(i.getType(), 0, i.getDurability());
|
|
||||||
data.blocksPlaced.add(temp);
|
data.blocksPlaced.add(temp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (quest.getStage(stage).blocksToUse.isEmpty() == false) {
|
if (quest.getStage(stage).blocksToUse.isEmpty() == false) {
|
||||||
for (ItemStack i : quest.getStage(stage).blocksToUse) {
|
for (ItemStack i : quest.getStage(stage).blocksToUse) {
|
||||||
if (data.blocksUsed.indexOf(i) != -1) {
|
|
||||||
ItemStack temp = new ItemStack(i.getType(), 0, i.getDurability());
|
ItemStack temp = new ItemStack(i.getType(), 0, i.getDurability());
|
||||||
|
if (data.blocksUsed.indexOf(i) != -1) {
|
||||||
data.blocksUsed.set(data.blocksUsed.indexOf(temp), temp);
|
data.blocksUsed.set(data.blocksUsed.indexOf(temp), temp);
|
||||||
} else {
|
} else {
|
||||||
ItemStack temp = new ItemStack(i.getType(), 0, i.getDurability());
|
|
||||||
data.blocksUsed.add(temp);
|
data.blocksUsed.add(temp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (quest.getStage(stage).blocksToCut.isEmpty() == false) {
|
if (quest.getStage(stage).blocksToCut.isEmpty() == false) {
|
||||||
for (ItemStack i : quest.getStage(stage).blocksToCut) {
|
for (ItemStack i : quest.getStage(stage).blocksToCut) {
|
||||||
if (data.blocksCut.indexOf(i) != -1) {
|
|
||||||
ItemStack temp = new ItemStack(i.getType(), 0, i.getDurability());
|
ItemStack temp = new ItemStack(i.getType(), 0, i.getDurability());
|
||||||
|
if (data.blocksCut.indexOf(i) != -1) {
|
||||||
data.blocksCut.set(data.blocksCut.indexOf(temp), temp);
|
data.blocksCut.set(data.blocksCut.indexOf(temp), temp);
|
||||||
} else {
|
} else {
|
||||||
ItemStack temp = new ItemStack(i.getType(), 0, i.getDurability());
|
|
||||||
data.blocksCut.add(temp);
|
data.blocksCut.add(temp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2377,8 +2322,11 @@ public class Quester {
|
|||||||
data.setFishCaught(0);
|
data.setFishCaught(0);
|
||||||
data.setPlayersKilled(0);
|
data.setPlayersKilled(0);
|
||||||
if (quest.getStage(stage).itemsToDeliver.isEmpty() == false) {
|
if (quest.getStage(stage).itemsToDeliver.isEmpty() == false) {
|
||||||
for (ItemStack is : quest.getStage(stage).itemsToDeliver) {
|
for (ItemStack i : quest.getStage(stage).itemsToDeliver) {
|
||||||
data.itemsDelivered.put(is, 0);
|
ItemStack temp = new ItemStack(i.getType(), 0, i.getDurability());
|
||||||
|
temp.addEnchantments(i.getEnchantments());
|
||||||
|
temp.setItemMeta(i.getItemMeta());
|
||||||
|
data.itemsDelivered.add(temp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (quest.getStage(stage).citizensToInteract.isEmpty() == false) {
|
if (quest.getStage(stage).citizensToInteract.isEmpty() == false) {
|
||||||
@ -2613,8 +2561,8 @@ public class Quester {
|
|||||||
}
|
}
|
||||||
if (questData.itemsDelivered.isEmpty() == false) {
|
if (questData.itemsDelivered.isEmpty() == false) {
|
||||||
LinkedList<Integer> deliveryAmounts = new LinkedList<Integer>();
|
LinkedList<Integer> deliveryAmounts = new LinkedList<Integer>();
|
||||||
for (Entry<ItemStack, Integer> e : questData.itemsDelivered.entrySet()) {
|
for (ItemStack m : questData.itemsDelivered) {
|
||||||
deliveryAmounts.add(e.getValue());
|
deliveryAmounts.add(m.getAmount());
|
||||||
}
|
}
|
||||||
questSec.set("item-delivery-amounts", deliveryAmounts);
|
questSec.set("item-delivery-amounts", deliveryAmounts);
|
||||||
}
|
}
|
||||||
@ -3004,7 +2952,7 @@ public class Quester {
|
|||||||
LinkedList<EntityType> mobs = new LinkedList<EntityType>();
|
LinkedList<EntityType> mobs = new LinkedList<EntityType>();
|
||||||
List<Integer> amounts = questSec.getIntegerList("mobs-killed-amounts");
|
List<Integer> amounts = questSec.getIntegerList("mobs-killed-amounts");
|
||||||
for (String s : questSec.getStringList("mobs-killed")) {
|
for (String s : questSec.getStringList("mobs-killed")) {
|
||||||
EntityType mob = Quests.getMobType(s);
|
EntityType mob = MiscUtil.getProperMobType(s);
|
||||||
if (mob != null) {
|
if (mob != null) {
|
||||||
mobs.add(mob);
|
mobs.add(mob);
|
||||||
}
|
}
|
||||||
@ -3032,11 +2980,14 @@ public class Quester {
|
|||||||
}
|
}
|
||||||
if (questSec.contains("item-delivery-amounts")) {
|
if (questSec.contains("item-delivery-amounts")) {
|
||||||
List<Integer> deliveryAmounts = questSec.getIntegerList("item-delivery-amounts");
|
List<Integer> deliveryAmounts = questSec.getIntegerList("item-delivery-amounts");
|
||||||
for (int i = 0; i < deliveryAmounts.size(); i++) {
|
int index = 0;
|
||||||
if (i < getCurrentStage(quest).itemsToDeliver.size()) {
|
for (int amt : deliveryAmounts) {
|
||||||
getQuestData(quest).itemsDelivered.put(getCurrentStage(quest).itemsToDeliver
|
ItemStack is = getCurrentStage(quest).itemsToDeliver.get(index);
|
||||||
.get(i), deliveryAmounts.get(i));
|
is.setAmount(amt);
|
||||||
|
if (getQuestData(quest).itemsDelivered.size() > 0) {
|
||||||
|
getQuestData(quest).itemsDelivered.set(index, is);
|
||||||
}
|
}
|
||||||
|
index++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (questSec.contains("citizen-ids-to-talk-to")) {
|
if (questSec.contains("citizen-ids-to-talk-to")) {
|
||||||
@ -3153,7 +3104,7 @@ public class Quester {
|
|||||||
(long) (getCurrentStage(quest).delay * 0.02));
|
(long) (getCurrentStage(quest).delay * 0.02));
|
||||||
if (getCurrentStage(quest).delayMessage != null) {
|
if (getCurrentStage(quest).delayMessage != null) {
|
||||||
Player p = plugin.getServer().getPlayer(id);
|
Player p = plugin.getServer().getPlayer(id);
|
||||||
p.sendMessage(plugin.parseStringWithPossibleLineBreaks((getCurrentStage(quest)
|
p.sendMessage(ConfigUtil.parseStringWithPossibleLineBreaks((getCurrentStage(quest)
|
||||||
.delayMessage), quest, p));
|
.delayMessage), quest, p));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3241,10 +3192,10 @@ public class Quester {
|
|||||||
ItemStack display = quests.get(i).guiDisplay;
|
ItemStack display = quests.get(i).guiDisplay;
|
||||||
ItemMeta meta = display.getItemMeta();
|
ItemMeta meta = display.getItemMeta();
|
||||||
if (completedQuests.contains(quests.get(i).getName())) {
|
if (completedQuests.contains(quests.get(i).getName())) {
|
||||||
meta.setDisplayName(ChatColor.DARK_PURPLE + Quests.parseString(quests.get(i).getName()
|
meta.setDisplayName(ChatColor.DARK_PURPLE + ConfigUtil.parseString(quests.get(i).getName()
|
||||||
+ " " + ChatColor.GREEN + Lang.get(player, "redoCompleted"), npc));
|
+ " " + ChatColor.GREEN + Lang.get(player, "redoCompleted"), npc));
|
||||||
} else {
|
} else {
|
||||||
meta.setDisplayName(ChatColor.DARK_PURPLE + Quests.parseString(quests.get(i).getName(), npc));
|
meta.setDisplayName(ChatColor.DARK_PURPLE + ConfigUtil.parseString(quests.get(i).getName(), npc));
|
||||||
}
|
}
|
||||||
if (!meta.hasLore()) {
|
if (!meta.hasLore()) {
|
||||||
LinkedList<String> lines = new LinkedList<String>();
|
LinkedList<String> lines = new LinkedList<String>();
|
||||||
@ -3499,7 +3450,7 @@ public class Quester {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (canAcceptOffer(quest, giveReason)) {
|
if (canAcceptOffer(quest, giveReason)) {
|
||||||
if (quest.getRegion() != null) {
|
if (quest.getRegionStart() != null) {
|
||||||
if (!quest.isInRegion(this)) {
|
if (!quest.isInRegion(this)) {
|
||||||
if (giveReason) {
|
if (giveReason) {
|
||||||
String msg = Lang.get(getPlayer(), "questInvalidLocation");
|
String msg = Lang.get(getPlayer(), "questInvalidLocation");
|
||||||
@ -3582,7 +3533,7 @@ public class Quester {
|
|||||||
if (giveReason) {
|
if (giveReason) {
|
||||||
String msg = Lang.get(getPlayer(), "questTooEarly");
|
String msg = Lang.get(getPlayer(), "questTooEarly");
|
||||||
msg = msg.replace("<quest>", ChatColor.AQUA + quest.getName() + ChatColor.YELLOW);
|
msg = msg.replace("<quest>", ChatColor.AQUA + quest.getName() + ChatColor.YELLOW);
|
||||||
msg = msg.replace("<time>", ChatColor.DARK_PURPLE + Quests.getTime(getCooldownDifference(quest))
|
msg = msg.replace("<time>", ChatColor.DARK_PURPLE + MiscUtil.getTime(getCooldownDifference(quest))
|
||||||
+ ChatColor.YELLOW);
|
+ ChatColor.YELLOW);
|
||||||
getPlayer().sendMessage(ChatColor.YELLOW + msg);
|
getPlayer().sendMessage(ChatColor.YELLOW + msg);
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -33,6 +33,7 @@ public class Settings {
|
|||||||
private String redoEffect = "angry_villager";
|
private String redoEffect = "angry_villager";
|
||||||
private boolean showQuestReqs = true;
|
private boolean showQuestReqs = true;
|
||||||
private boolean showQuestTitles = true;
|
private boolean showQuestTitles = true;
|
||||||
|
private int strictPlayerMovement = 0;
|
||||||
private boolean translateNames = false;
|
private boolean translateNames = false;
|
||||||
private boolean translateSubCommands = false;
|
private boolean translateSubCommands = false;
|
||||||
private boolean useCompass = true;
|
private boolean useCompass = true;
|
||||||
@ -120,6 +121,12 @@ public class Settings {
|
|||||||
public void setShowQuestTitles(boolean showQuestTitles) {
|
public void setShowQuestTitles(boolean showQuestTitles) {
|
||||||
this.showQuestTitles = showQuestTitles;
|
this.showQuestTitles = showQuestTitles;
|
||||||
}
|
}
|
||||||
|
public int getStrictPlayerMovement() {
|
||||||
|
return strictPlayerMovement;
|
||||||
|
}
|
||||||
|
public void setStrictPlayerMovement(int strictPlayerMovement) {
|
||||||
|
this.strictPlayerMovement = strictPlayerMovement;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* @deprecated As of release 2.6.4, use {@link #canTranslateNames()}
|
* @deprecated As of release 2.6.4, use {@link #canTranslateNames()}
|
||||||
*/
|
*/
|
||||||
@ -178,6 +185,7 @@ public class Settings {
|
|||||||
redoEffect = config.getString("npc-effects.redo-quest", "angry_villager");
|
redoEffect = config.getString("npc-effects.redo-quest", "angry_villager");
|
||||||
showQuestReqs = config.getBoolean("show-requirements", true);
|
showQuestReqs = config.getBoolean("show-requirements", true);
|
||||||
showQuestTitles = config.getBoolean("show-titles", true);
|
showQuestTitles = config.getBoolean("show-titles", true);
|
||||||
|
strictPlayerMovement = config.getInt("strict-player-movement", 0);
|
||||||
translateNames = config.getBoolean("translate-names", true);
|
translateNames = config.getBoolean("translate-names", true);
|
||||||
translateSubCommands = config.getBoolean("translate-subcommands", false);
|
translateSubCommands = config.getBoolean("translate-subcommands", false);
|
||||||
useCompass = config.getBoolean("use-compass", true);
|
useCompass = config.getBoolean("use-compass", true);
|
||||||
|
@ -37,9 +37,12 @@ import me.blackvein.quests.Quest;
|
|||||||
import me.blackvein.quests.QuestMob;
|
import me.blackvein.quests.QuestMob;
|
||||||
import me.blackvein.quests.Quester;
|
import me.blackvein.quests.Quester;
|
||||||
import me.blackvein.quests.Quests;
|
import me.blackvein.quests.Quests;
|
||||||
import me.blackvein.quests.timers.ActionTimer;
|
import me.blackvein.quests.tasks.ActionTimer;
|
||||||
|
import me.blackvein.quests.util.ConfigUtil;
|
||||||
|
import me.blackvein.quests.util.InventoryUtil;
|
||||||
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 me.blackvein.quests.util.MiscUtil;
|
||||||
|
|
||||||
public class Action {
|
public class Action {
|
||||||
|
|
||||||
@ -270,7 +273,7 @@ public class Action {
|
|||||||
public void fire(Quester quester, Quest quest) {
|
public void fire(Quester quester, Quest quest) {
|
||||||
Player player = quester.getPlayer();
|
Player player = quester.getPlayer();
|
||||||
if (message != null) {
|
if (message != null) {
|
||||||
player.sendMessage(plugin.parseStringWithPossibleLineBreaks(message, quest, player));
|
player.sendMessage(ConfigUtil.parseStringWithPossibleLineBreaks(message, quest, player));
|
||||||
}
|
}
|
||||||
if (clearInv == true) {
|
if (clearInv == true) {
|
||||||
player.getInventory().clear();
|
player.getInventory().clear();
|
||||||
@ -288,7 +291,7 @@ public class Action {
|
|||||||
if (items.isEmpty() == false) {
|
if (items.isEmpty() == false) {
|
||||||
for (ItemStack is : items) {
|
for (ItemStack is : items) {
|
||||||
try {
|
try {
|
||||||
Quests.addItem(player, is);
|
InventoryUtil.addItem(player, is);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
plugin.getLogger().severe("Unable to add null item to inventory of "
|
plugin.getLogger().severe("Unable to add null item to inventory of "
|
||||||
+ player.getName() + " during quest " + quest.getName() + " event " + name);
|
+ player.getName() + " during quest " + quest.getName() + " event " + name);
|
||||||
@ -317,7 +320,8 @@ public class Action {
|
|||||||
}
|
}
|
||||||
if (commands.isEmpty() == false) {
|
if (commands.isEmpty() == false) {
|
||||||
for (String s : commands) {
|
for (String s : commands) {
|
||||||
plugin.getServer().dispatchCommand(plugin.getServer().getConsoleSender(), s.replaceAll("<player>", quester.getPlayer().getName()));
|
plugin.getServer().dispatchCommand(plugin.getServer().getConsoleSender(),
|
||||||
|
s.replaceAll("<player>", quester.getPlayer().getName()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (potionEffects.isEmpty() == false) {
|
if (potionEffects.isEmpty() == false) {
|
||||||
@ -341,7 +345,8 @@ public class Action {
|
|||||||
if (!book.isEmpty()) {
|
if (!book.isEmpty()) {
|
||||||
if (plugin.getDependencies().getCitizensBooksApi() != null) {
|
if (plugin.getDependencies().getCitizensBooksApi() != null) {
|
||||||
if (plugin.getDependencies().getCitizensBooksApi().hasFilter(book)) {
|
if (plugin.getDependencies().getCitizensBooksApi().hasFilter(book)) {
|
||||||
plugin.getDependencies().getCitizensBooksApi().openBook(player, plugin.getDependencies().getCitizensBooksApi().getFilter(book));
|
plugin.getDependencies().getCitizensBooksApi().openBook(player, plugin.getDependencies()
|
||||||
|
.getCitizensBooksApi().getFilter(book));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -422,7 +427,7 @@ public class Action {
|
|||||||
Action action = new Action(plugin);
|
Action action = new Action(plugin);
|
||||||
action.name = name;
|
action.name = name;
|
||||||
if (data.contains(actionKey + "message")) {
|
if (data.contains(actionKey + "message")) {
|
||||||
action.message = Quests.parseString(data.getString(actionKey + "message"));
|
action.message = ConfigUtil.parseString(data.getString(actionKey + "message"));
|
||||||
}
|
}
|
||||||
if (data.contains(actionKey + "open-book")) {
|
if (data.contains(actionKey + "open-book")) {
|
||||||
action.book = data.getString(actionKey + "open-book");
|
action.book = data.getString(actionKey + "open-book");
|
||||||
@ -431,7 +436,9 @@ public class Action {
|
|||||||
if (data.isBoolean(actionKey + "clear-inventory")) {
|
if (data.isBoolean(actionKey + "clear-inventory")) {
|
||||||
action.clearInv = data.getBoolean(actionKey + "clear-inventory");
|
action.clearInv = data.getBoolean(actionKey + "clear-inventory");
|
||||||
} else {
|
} else {
|
||||||
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "clear-inventory: " + ChatColor.GOLD + "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a true/false value!");
|
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "clear-inventory: "
|
||||||
|
+ ChatColor.GOLD + "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD
|
||||||
|
+ " is not a true/false value!");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -439,56 +446,76 @@ public class Action {
|
|||||||
if (data.isBoolean(actionKey + "fail-quest")) {
|
if (data.isBoolean(actionKey + "fail-quest")) {
|
||||||
action.failQuest = data.getBoolean(actionKey + "fail-quest");
|
action.failQuest = data.getBoolean(actionKey + "fail-quest");
|
||||||
} else {
|
} else {
|
||||||
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "fail-quest: " + ChatColor.GOLD + "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a true/false value!");
|
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "fail-quest: "
|
||||||
|
+ ChatColor.GOLD + "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD
|
||||||
|
+ " is not a true/false value!");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (data.contains(actionKey + "explosions")) {
|
if (data.contains(actionKey + "explosions")) {
|
||||||
if (Quests.checkList(data.getList(actionKey + "explosions"), String.class)) {
|
if (ConfigUtil.checkList(data.getList(actionKey + "explosions"), String.class)) {
|
||||||
for (String s : data.getStringList(actionKey + "explosions")) {
|
for (String s : data.getStringList(actionKey + "explosions")) {
|
||||||
Location loc = Quests.getLocation(s);
|
Location loc = ConfigUtil.getLocation(s);
|
||||||
if (loc == null) {
|
if (loc == null) {
|
||||||
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + loc + ChatColor.GOLD + " inside " + ChatColor.GREEN + "explosions: " + ChatColor.GOLD + "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not in proper location format!");
|
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + loc + ChatColor.GOLD
|
||||||
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] Proper location format is: \"WorldName x y z\"");
|
+ " inside " + ChatColor.GREEN + "explosions: " + ChatColor.GOLD + "inside Action "
|
||||||
|
+ ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not in proper location format!");
|
||||||
|
plugin.getLogger().severe(ChatColor.GOLD
|
||||||
|
+ "[Quests] Proper location format is: \"WorldName x y z\"");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
action.explosions.add(loc);
|
action.explosions.add(loc);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "explosions: " + ChatColor.GOLD + "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a list of locations!");
|
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "explosions: "
|
||||||
|
+ ChatColor.GOLD + "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD
|
||||||
|
+ " is not a list of locations!");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (data.contains(actionKey + "effects")) {
|
if (data.contains(actionKey + "effects")) {
|
||||||
if (Quests.checkList(data.getList(actionKey + "effects"), String.class)) {
|
if (ConfigUtil.checkList(data.getList(actionKey + "effects"), String.class)) {
|
||||||
if (data.contains(actionKey + "effect-locations")) {
|
if (data.contains(actionKey + "effect-locations")) {
|
||||||
if (Quests.checkList(data.getList(actionKey + "effect-locations"), String.class)) {
|
if (ConfigUtil.checkList(data.getList(actionKey + "effect-locations"), String.class)) {
|
||||||
List<String> effectList = data.getStringList(actionKey + "effects");
|
List<String> effectList = data.getStringList(actionKey + "effects");
|
||||||
List<String> effectLocs = data.getStringList(actionKey + "effect-locations");
|
List<String> effectLocs = data.getStringList(actionKey + "effect-locations");
|
||||||
for (String s : effectList) {
|
for (String s : effectList) {
|
||||||
Effect effect = Effect.valueOf(s.toUpperCase());
|
Effect effect = Effect.valueOf(s.toUpperCase());
|
||||||
Location l = Quests.getLocation(effectLocs.get(effectList.indexOf(s)));
|
Location l = ConfigUtil.getLocation(effectLocs.get(effectList.indexOf(s)));
|
||||||
if (effect == null) {
|
if (effect == null) {
|
||||||
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + s + ChatColor.GOLD + " inside " + ChatColor.GREEN + "effects: " + ChatColor.GOLD + "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a valid effect name!");
|
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + s
|
||||||
|
+ ChatColor.GOLD + " inside " + ChatColor.GREEN + "effects: " + ChatColor.GOLD
|
||||||
|
+ "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD
|
||||||
|
+ " is not a valid effect name!");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (l == null) {
|
if (l == null) {
|
||||||
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + effectLocs.get(effectList.indexOf(s)) + ChatColor.GOLD + " inside " + ChatColor.GREEN + "effect-locations: " + ChatColor.GOLD + "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not in proper location format!");
|
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED
|
||||||
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] Proper location format is: \"WorldName x y z\"");
|
+ effectLocs.get(effectList.indexOf(s)) + ChatColor.GOLD + " inside "
|
||||||
|
+ ChatColor.GREEN + "effect-locations: " + ChatColor.GOLD + "inside Action "
|
||||||
|
+ ChatColor.DARK_PURPLE + name + ChatColor.GOLD
|
||||||
|
+ " is not in proper location format!");
|
||||||
|
plugin.getLogger().severe(ChatColor.GOLD
|
||||||
|
+ "[Quests] Proper location format is: \"WorldName x y z\"");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
action.effects.put(l, effect);
|
action.effects.put(l, effect);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "effect-locations: " + ChatColor.GOLD + "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a list of locations!");
|
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "effect-locations: "
|
||||||
|
+ ChatColor.GOLD + "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD
|
||||||
|
+ " is not a list of locations!");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is missing " + ChatColor.RED + "effect-locations:");
|
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] Action " + ChatColor.DARK_PURPLE + name
|
||||||
|
+ ChatColor.GOLD + " is missing " + ChatColor.RED + "effect-locations:");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "effects: " + ChatColor.GOLD + "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a list of effects!");
|
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "effects: " + ChatColor.GOLD
|
||||||
|
+ "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD
|
||||||
|
+ " is not a list of effects!");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -496,7 +523,7 @@ public class Action {
|
|||||||
LinkedList<ItemStack> temp = new LinkedList<ItemStack>(); // TODO - should maybe be = action.getItems() ?
|
LinkedList<ItemStack> temp = new LinkedList<ItemStack>(); // TODO - should maybe be = action.getItems() ?
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
List<ItemStack> stackList = (List<ItemStack>) data.get(actionKey + "items");
|
List<ItemStack> stackList = (List<ItemStack>) data.get(actionKey + "items");
|
||||||
if (Quests.checkList(stackList, ItemStack.class)) {
|
if (ConfigUtil.checkList(stackList, ItemStack.class)) {
|
||||||
for (ItemStack stack : stackList) {
|
for (ItemStack stack : stackList) {
|
||||||
if (stack != null) {
|
if (stack != null) {
|
||||||
temp.add(stack);
|
temp.add(stack);
|
||||||
@ -504,7 +531,7 @@ public class Action {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Legacy
|
// Legacy
|
||||||
if (Quests.checkList(stackList, String.class)) {
|
if (ConfigUtil.checkList(stackList, String.class)) {
|
||||||
List<String> items = data.getStringList(actionKey + "items");
|
List<String> items = data.getStringList(actionKey + "items");
|
||||||
for (String item : items) {
|
for (String item : items) {
|
||||||
try {
|
try {
|
||||||
@ -513,12 +540,17 @@ public class Action {
|
|||||||
temp.add(stack);
|
temp.add(stack);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] \"" + ChatColor.RED + item + ChatColor.GOLD + "\" inside " + ChatColor.GREEN + " items: " + ChatColor.GOLD + "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not formatted properly!");
|
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] \"" + ChatColor.RED + item
|
||||||
|
+ ChatColor.GOLD + "\" inside " + ChatColor.GREEN + " items: " + ChatColor.GOLD
|
||||||
|
+ "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD
|
||||||
|
+ " is not formatted properly!");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "items: " + ChatColor.GOLD + "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a list of items!");
|
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "items: " + ChatColor.GOLD
|
||||||
|
+ "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD
|
||||||
|
+ " is not a list of items!");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -527,38 +559,48 @@ public class Action {
|
|||||||
if (data.contains(actionKey + "storm-world")) {
|
if (data.contains(actionKey + "storm-world")) {
|
||||||
World w = plugin.getServer().getWorld(data.getString(actionKey + "storm-world"));
|
World w = plugin.getServer().getWorld(data.getString(actionKey + "storm-world"));
|
||||||
if (w == null) {
|
if (w == null) {
|
||||||
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "storm-world: " + ChatColor.GOLD + "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a valid World name!");
|
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "storm-world: "
|
||||||
|
+ ChatColor.GOLD + "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD
|
||||||
|
+ " is not a valid World name!");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (data.contains(actionKey + "storm-duration")) {
|
if (data.contains(actionKey + "storm-duration")) {
|
||||||
if (data.getInt(actionKey + "storm-duration", -999) != -999) {
|
if (data.getInt(actionKey + "storm-duration", -999) != -999) {
|
||||||
action.stormDuration = data.getInt(actionKey + "storm-duration") * 1000;
|
action.stormDuration = data.getInt(actionKey + "storm-duration") * 1000;
|
||||||
} else {
|
} else {
|
||||||
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "storm-duration: " + ChatColor.GOLD + "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a number!");
|
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "storm-duration: "
|
||||||
|
+ ChatColor.GOLD + "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD
|
||||||
|
+ " is not a number!");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
action.stormWorld = w;
|
action.stormWorld = w;
|
||||||
} else {
|
} else {
|
||||||
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is missing " + ChatColor.RED + "storm-duration:");
|
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] Action " + ChatColor.DARK_PURPLE + name
|
||||||
|
+ ChatColor.GOLD + " is missing " + ChatColor.RED + "storm-duration:");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (data.contains(actionKey + "thunder-world")) {
|
if (data.contains(actionKey + "thunder-world")) {
|
||||||
World w = plugin.getServer().getWorld(data.getString(actionKey + "thunder-world"));
|
World w = plugin.getServer().getWorld(data.getString(actionKey + "thunder-world"));
|
||||||
if (w == null) {
|
if (w == null) {
|
||||||
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "thunder-world: " + ChatColor.GOLD + "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a valid World name!");
|
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "thunder-world: "
|
||||||
|
+ ChatColor.GOLD + "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD
|
||||||
|
+ " is not a valid World name!");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (data.contains(actionKey + "thunder-duration")) {
|
if (data.contains(actionKey + "thunder-duration")) {
|
||||||
if (data.getInt(actionKey + "thunder-duration", -999) != -999) {
|
if (data.getInt(actionKey + "thunder-duration", -999) != -999) {
|
||||||
action.thunderDuration = data.getInt(actionKey + "thunder-duration");
|
action.thunderDuration = data.getInt(actionKey + "thunder-duration");
|
||||||
} else {
|
} else {
|
||||||
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "thunder-duration: " + ChatColor.GOLD + "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a number!");
|
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "thunder-duration: "
|
||||||
|
+ ChatColor.GOLD + "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD
|
||||||
|
+ " is not a number!");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
action.thunderWorld = w;
|
action.thunderWorld = w;
|
||||||
} else {
|
} else {
|
||||||
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is missing " + ChatColor.RED + "thunder-duration:");
|
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] Action " + ChatColor.DARK_PURPLE + name
|
||||||
|
+ ChatColor.GOLD + " is missing " + ChatColor.RED + "thunder-duration:");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -567,16 +609,23 @@ public class Action {
|
|||||||
// is a mob, the keys are just a number or something.
|
// is a mob, the keys are just a number or something.
|
||||||
for (String s : section.getKeys(false)) {
|
for (String s : section.getKeys(false)) {
|
||||||
String mobName = section.getString(s + ".name");
|
String mobName = section.getString(s + ".name");
|
||||||
Location spawnLocation = Quests.getLocation(section.getString(s + ".spawn-location"));
|
Location spawnLocation = ConfigUtil.getLocation(section.getString(s + ".spawn-location"));
|
||||||
EntityType type = Quests.getMobType(section.getString(s + ".mob-type"));
|
EntityType type = MiscUtil.getProperMobType(section.getString(s + ".mob-type"));
|
||||||
Integer mobAmount = section.getInt(s + ".spawn-amounts");
|
Integer mobAmount = section.getInt(s + ".spawn-amounts");
|
||||||
if (spawnLocation == null) {
|
if (spawnLocation == null) {
|
||||||
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + s + ChatColor.GOLD + " inside " + ChatColor.GREEN + " mob-spawn-locations: " + ChatColor.GOLD + "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not in proper location format!");
|
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + s + ChatColor.GOLD
|
||||||
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] Proper location format is: \"WorldName x y z\"");
|
+ " inside " + ChatColor.GREEN + " mob-spawn-locations: " + ChatColor.GOLD
|
||||||
|
+ "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD
|
||||||
|
+ " is not in proper location format!");
|
||||||
|
plugin.getLogger().severe(ChatColor.GOLD
|
||||||
|
+ "[Quests] Proper location format is: \"WorldName x y z\"");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (type == null) {
|
if (type == null) {
|
||||||
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + section.getString(s + ".mob-type") + ChatColor.GOLD + " inside " + ChatColor.GREEN + " mob-spawn-types: " + ChatColor.GOLD + "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a valid mob name!");
|
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED
|
||||||
|
+ section.getString(s + ".mob-type") + ChatColor.GOLD + " inside " + ChatColor.GREEN
|
||||||
|
+ " mob-spawn-types: " + ChatColor.GOLD + "inside Action " + ChatColor.DARK_PURPLE + name
|
||||||
|
+ ChatColor.GOLD + " is not a valid mob name!");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
ItemStack[] inventory = new ItemStack[5];
|
ItemStack[] inventory = new ItemStack[5];
|
||||||
@ -599,23 +648,29 @@ public class Action {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (data.contains(actionKey + "lightning-strikes")) {
|
if (data.contains(actionKey + "lightning-strikes")) {
|
||||||
if (Quests.checkList(data.getList(actionKey + "lightning-strikes"), String.class)) {
|
if (ConfigUtil.checkList(data.getList(actionKey + "lightning-strikes"), String.class)) {
|
||||||
for (String s : data.getStringList(actionKey + "lightning-strikes")) {
|
for (String s : data.getStringList(actionKey + "lightning-strikes")) {
|
||||||
Location loc = Quests.getLocation(s);
|
Location loc = ConfigUtil.getLocation(s);
|
||||||
if (loc == null) {
|
if (loc == null) {
|
||||||
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + s + ChatColor.GOLD + " inside " + ChatColor.GREEN + " lightning-strikes: " + ChatColor.GOLD + "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not in proper location format!");
|
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + s + ChatColor.GOLD
|
||||||
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] Proper location format is: \"WorldName x y z\"");
|
+ " inside " + ChatColor.GREEN + " lightning-strikes: " + ChatColor.GOLD
|
||||||
|
+ "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD
|
||||||
|
+ " is not in proper location format!");
|
||||||
|
plugin.getLogger().severe(ChatColor.GOLD
|
||||||
|
+ "[Quests] Proper location format is: \"WorldName x y z\"");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
action.lightningStrikes.add(loc);
|
action.lightningStrikes.add(loc);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "lightning-strikes: " + ChatColor.GOLD + "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a list of locations!");
|
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "lightning-strikes: "
|
||||||
|
+ ChatColor.GOLD + "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD
|
||||||
|
+ " is not a list of locations!");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (data.contains(actionKey + "commands")) {
|
if (data.contains(actionKey + "commands")) {
|
||||||
if (Quests.checkList(data.getList(actionKey + "commands"), String.class)) {
|
if (ConfigUtil.checkList(data.getList(actionKey + "commands"), String.class)) {
|
||||||
for (String s : data.getStringList(actionKey + "commands")) {
|
for (String s : data.getStringList(actionKey + "commands")) {
|
||||||
if (s.startsWith("/")) {
|
if (s.startsWith("/")) {
|
||||||
s = s.replaceFirst("/", "");
|
s = s.replaceFirst("/", "");
|
||||||
@ -623,46 +678,60 @@ public class Action {
|
|||||||
action.commands.add(s);
|
action.commands.add(s);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "commands: " + ChatColor.GOLD + "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a list of commands!");
|
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "commands: " + ChatColor.GOLD
|
||||||
|
+ "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD
|
||||||
|
+ " is not a list of commands!");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (data.contains(actionKey + "potion-effect-types")) {
|
if (data.contains(actionKey + "potion-effect-types")) {
|
||||||
if (Quests.checkList(data.getList(actionKey + "potion-effect-types"), String.class)) {
|
if (ConfigUtil.checkList(data.getList(actionKey + "potion-effect-types"), String.class)) {
|
||||||
if (data.contains(actionKey + "potion-effect-durations")) {
|
if (data.contains(actionKey + "potion-effect-durations")) {
|
||||||
if (Quests.checkList(data.getList(actionKey + "potion-effect-durations"), Integer.class)) {
|
if (ConfigUtil.checkList(data.getList(actionKey + "potion-effect-durations"), Integer.class)) {
|
||||||
if (data.contains(actionKey + "potion-effect-amplifiers")) {
|
if (data.contains(actionKey + "potion-effect-amplifiers")) {
|
||||||
if (Quests.checkList(data.getList(actionKey + "potion-effect-amplifiers"), Integer.class)) {
|
if (ConfigUtil.checkList(data.getList(actionKey + "potion-effect-amplifiers"), Integer.class)) {
|
||||||
List<String> types = data.getStringList(actionKey + "potion-effect-types");
|
List<String> types = data.getStringList(actionKey + "potion-effect-types");
|
||||||
List<Integer> durations = data.getIntegerList(actionKey + "potion-effect-durations");
|
List<Integer> durations = data.getIntegerList(actionKey + "potion-effect-durations");
|
||||||
List<Integer> amplifiers = data.getIntegerList(actionKey + "potion-effect-amplifiers");
|
List<Integer> amplifiers = data.getIntegerList(actionKey + "potion-effect-amplifiers");
|
||||||
for (String s : types) {
|
for (String s : types) {
|
||||||
PotionEffectType type = PotionEffectType.getByName(s);
|
PotionEffectType type = PotionEffectType.getByName(s);
|
||||||
if (type == null) {
|
if (type == null) {
|
||||||
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + s + ChatColor.GOLD + " inside " + ChatColor.GREEN + " lightning-strikes: " + ChatColor.GOLD + "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a valid potion effect name!");
|
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + s
|
||||||
|
+ ChatColor.GOLD + " inside " + ChatColor.GREEN + " lightning-strikes: "
|
||||||
|
+ ChatColor.GOLD + "inside Action " + ChatColor.DARK_PURPLE + name
|
||||||
|
+ ChatColor.GOLD + " is not a valid potion effect name!");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
PotionEffect effect = new PotionEffect(type, durations.get(types.indexOf(s)), amplifiers.get(types.indexOf(s)));
|
PotionEffect effect = new PotionEffect(type, durations
|
||||||
|
.get(types.indexOf(s)), amplifiers.get(types.indexOf(s)));
|
||||||
action.potionEffects.add(effect);
|
action.potionEffects.add(effect);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "potion-effect-amplifiers: " + ChatColor.GOLD + "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a list of numbers!");
|
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED
|
||||||
|
+ "potion-effect-amplifiers: " + ChatColor.GOLD + "inside Action "
|
||||||
|
+ ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a list of numbers!");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is missing " + ChatColor.RED + "potion-effect-amplifiers:");
|
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] Action " + ChatColor.DARK_PURPLE + name
|
||||||
|
+ ChatColor.GOLD + " is missing " + ChatColor.RED + "potion-effect-amplifiers:");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "potion-effect-durations: " + ChatColor.GOLD + "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a list of numbers!");
|
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED
|
||||||
|
+ "potion-effect-durations: " + ChatColor.GOLD + "inside Action "
|
||||||
|
+ ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a list of numbers!");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is missing " + ChatColor.RED + "potion-effect-durations:");
|
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] Action " + ChatColor.DARK_PURPLE + name
|
||||||
|
+ ChatColor.GOLD + " is missing " + ChatColor.RED + "potion-effect-durations:");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "potion-effect-types: " + ChatColor.GOLD + "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a list of potion effects!");
|
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "potion-effect-types: "
|
||||||
|
+ ChatColor.GOLD + "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD
|
||||||
|
+ " is not a list of potion effects!");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -670,7 +739,8 @@ public class Action {
|
|||||||
if (data.getInt(actionKey + "hunger", -999) != -999) {
|
if (data.getInt(actionKey + "hunger", -999) != -999) {
|
||||||
action.hunger = data.getInt(actionKey + "hunger");
|
action.hunger = data.getInt(actionKey + "hunger");
|
||||||
} else {
|
} else {
|
||||||
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "hunger: " + ChatColor.GOLD + "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a number!");
|
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "hunger: " + ChatColor.GOLD
|
||||||
|
+ "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a number!");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -678,7 +748,9 @@ public class Action {
|
|||||||
if (data.getInt(actionKey + "saturation", -999) != -999) {
|
if (data.getInt(actionKey + "saturation", -999) != -999) {
|
||||||
action.saturation = data.getInt(actionKey + "saturation");
|
action.saturation = data.getInt(actionKey + "saturation");
|
||||||
} else {
|
} else {
|
||||||
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "saturation: " + ChatColor.GOLD + "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a number!");
|
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "saturation: "
|
||||||
|
+ ChatColor.GOLD + "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD
|
||||||
|
+ " is not a number!");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -686,21 +758,28 @@ public class Action {
|
|||||||
if (data.getInt(actionKey + "health", -999) != -999) {
|
if (data.getInt(actionKey + "health", -999) != -999) {
|
||||||
action.health = data.getInt(actionKey + "health");
|
action.health = data.getInt(actionKey + "health");
|
||||||
} else {
|
} else {
|
||||||
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "health: " + ChatColor.GOLD + "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a number!");
|
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "health: " + ChatColor.GOLD
|
||||||
|
+ "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a number!");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (data.contains(actionKey + "teleport-location")) {
|
if (data.contains(actionKey + "teleport-location")) {
|
||||||
if (data.isString(actionKey + "teleport-location")) {
|
if (data.isString(actionKey + "teleport-location")) {
|
||||||
Location l = Quests.getLocation(data.getString(actionKey + "teleport-location"));
|
Location l = ConfigUtil.getLocation(data.getString(actionKey + "teleport-location"));
|
||||||
if (l == null) {
|
if (l == null) {
|
||||||
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + data.getString(actionKey + "teleport-location") + ChatColor.GOLD + "for " + ChatColor.GREEN + " teleport-location: " + ChatColor.GOLD + "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not in proper location format!");
|
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + data.getString(actionKey
|
||||||
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] Proper location format is: \"WorldName x y z\"");
|
+ "teleport-location") + ChatColor.GOLD + "for " + ChatColor.GREEN + " teleport-location: "
|
||||||
|
+ ChatColor.GOLD + "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD
|
||||||
|
+ " is not in proper location format!");
|
||||||
|
plugin.getLogger().severe(ChatColor.GOLD
|
||||||
|
+ "[Quests] Proper location format is: \"WorldName x y z\"");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
action.teleport = l;
|
action.teleport = l;
|
||||||
} else {
|
} else {
|
||||||
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "teleport-location: " + ChatColor.GOLD + "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a location!");
|
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "teleport-location: "
|
||||||
|
+ ChatColor.GOLD + "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD
|
||||||
|
+ " is not a location!");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -708,7 +787,8 @@ public class Action {
|
|||||||
if (data.isInt(actionKey + "timer")) {
|
if (data.isInt(actionKey + "timer")) {
|
||||||
action.timer = data.getInt(actionKey + "timer");
|
action.timer = data.getInt(actionKey + "timer");
|
||||||
} else {
|
} else {
|
||||||
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "timer: " + ChatColor.GOLD + "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a number!");
|
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "timer: " + ChatColor.GOLD
|
||||||
|
+ "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a number!");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -716,7 +796,9 @@ public class Action {
|
|||||||
if (data.isBoolean(actionKey + "cancel-timer")) {
|
if (data.isBoolean(actionKey + "cancel-timer")) {
|
||||||
action.cancelTimer = data.getBoolean(actionKey + "cancel-timer");
|
action.cancelTimer = data.getBoolean(actionKey + "cancel-timer");
|
||||||
} else {
|
} else {
|
||||||
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "cancel-timer: " + ChatColor.GOLD + "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a boolean!");
|
plugin.getLogger().severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "cancel-timer: "
|
||||||
|
+ ChatColor.GOLD + "inside Action " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD
|
||||||
|
+ " is not a boolean!");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,43 @@
|
|||||||
|
package me.blackvein.quests.events.command;
|
||||||
|
|
||||||
|
import org.bukkit.event.Cancellable;
|
||||||
|
import org.bukkit.event.HandlerList;
|
||||||
|
|
||||||
|
import me.blackvein.quests.Quester;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the /quests list command is run by a player
|
||||||
|
*/
|
||||||
|
public class QuestsCommandPreQuestsListEvent extends QuestsCommandEvent implements Cancellable {
|
||||||
|
private static final HandlerList handlers = new HandlerList();
|
||||||
|
private final int page;
|
||||||
|
private boolean cancel = false;
|
||||||
|
|
||||||
|
public QuestsCommandPreQuestsListEvent(Quester quester, int page) {
|
||||||
|
super(quester);
|
||||||
|
this.page = page;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isCancelled() {
|
||||||
|
return cancel;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setCancelled(boolean cancel) {
|
||||||
|
this.cancel = cancel;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HandlerList getHandlers() {
|
||||||
|
return handlers;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static HandlerList getHandlerList() {
|
||||||
|
return handlers;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getPage() {
|
||||||
|
return page;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,30 @@
|
|||||||
|
package me.blackvein.quests.events.editor.actions;
|
||||||
|
|
||||||
|
import org.bukkit.conversations.ConversationContext;
|
||||||
|
|
||||||
|
import me.blackvein.quests.events.QuestsEvent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents an Actions Editor-related event
|
||||||
|
*/
|
||||||
|
public abstract class ActionsEditorEvent extends QuestsEvent {
|
||||||
|
protected ConversationContext context;
|
||||||
|
|
||||||
|
public ActionsEditorEvent(final ConversationContext context) {
|
||||||
|
this.context = context;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ActionsEditorEvent(final ConversationContext context, boolean async) {
|
||||||
|
super(async);
|
||||||
|
this.context = context;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the context involved in this event
|
||||||
|
*
|
||||||
|
* @return ConversationContext which is involved in this event
|
||||||
|
*/
|
||||||
|
public final ConversationContext getConversationContext() {
|
||||||
|
return context;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
package me.blackvein.quests.events.editor.actions;
|
||||||
|
|
||||||
|
import org.bukkit.conversations.ConversationContext;
|
||||||
|
import org.bukkit.event.HandlerList;
|
||||||
|
|
||||||
|
public class ActionsEditorPostOpenCreatePromptEvent extends ActionsEditorEvent {
|
||||||
|
private static final HandlerList handlers = new HandlerList();
|
||||||
|
|
||||||
|
public ActionsEditorPostOpenCreatePromptEvent(ConversationContext context) {
|
||||||
|
super(context);
|
||||||
|
this.context = context;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HandlerList getHandlers() {
|
||||||
|
return handlers;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static HandlerList getHandlerList() {
|
||||||
|
return handlers;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
package me.blackvein.quests.events.editor.actions;
|
||||||
|
|
||||||
|
import org.bukkit.conversations.ConversationContext;
|
||||||
|
import org.bukkit.event.HandlerList;
|
||||||
|
|
||||||
|
public class ActionsEditorPostOpenMenuPromptEvent extends ActionsEditorEvent {
|
||||||
|
private static final HandlerList handlers = new HandlerList();
|
||||||
|
|
||||||
|
public ActionsEditorPostOpenMenuPromptEvent(ConversationContext context) {
|
||||||
|
super(context);
|
||||||
|
this.context = context;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HandlerList getHandlers() {
|
||||||
|
return handlers;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static HandlerList getHandlerList() {
|
||||||
|
return handlers;
|
||||||
|
}
|
||||||
|
}
|
@ -32,6 +32,7 @@ import me.blackvein.quests.Requirements;
|
|||||||
import me.blackvein.quests.Stage;
|
import me.blackvein.quests.Stage;
|
||||||
import me.blackvein.quests.events.command.QuestsCommandPreQuestsEditorEvent;
|
import me.blackvein.quests.events.command.QuestsCommandPreQuestsEditorEvent;
|
||||||
import me.blackvein.quests.events.command.QuestsCommandPreQuestsJournalEvent;
|
import me.blackvein.quests.events.command.QuestsCommandPreQuestsJournalEvent;
|
||||||
|
import me.blackvein.quests.events.command.QuestsCommandPreQuestsListEvent;
|
||||||
import me.blackvein.quests.events.quest.QuestQuitEvent;
|
import me.blackvein.quests.events.quest.QuestQuitEvent;
|
||||||
import me.blackvein.quests.exceptions.InvalidStageException;
|
import me.blackvein.quests.exceptions.InvalidStageException;
|
||||||
import me.blackvein.quests.util.ItemUtil;
|
import me.blackvein.quests.util.ItemUtil;
|
||||||
@ -185,9 +186,10 @@ public class CmdExecutor implements CommandExecutor {
|
|||||||
plugin.showObjectives(q, quester, false);
|
plugin.showObjectives(q, quester, false);
|
||||||
} else {
|
} else {
|
||||||
long time = plugin.getQuester(player.getUniqueId()).getStageTime(q);
|
long time = plugin.getQuester(player.getUniqueId()).getStageTime(q);
|
||||||
String msg = ChatColor.YELLOW + "(" + Lang.get(player, "delay") + ") " + ChatColor.RED + Lang.get(player, "plnTooEarly");
|
String msg = ChatColor.YELLOW + "(" + Lang.get(player, "delay") + ") " + ChatColor.RED
|
||||||
|
+ Lang.get(player, "plnTooEarly");
|
||||||
msg = msg.replace("<quest>", q.getName());
|
msg = msg.replace("<quest>", q.getName());
|
||||||
msg = msg.replace("<time>", Quests.getTime(time));
|
msg = msg.replace("<time>", MiscUtil.getTime(time));
|
||||||
player.sendMessage(msg);
|
player.sendMessage(msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -209,28 +211,51 @@ public class CmdExecutor implements CommandExecutor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean questsCommandHandler(final CommandSender cs, String[] args) {
|
private boolean questsCommandHandler(final CommandSender cs, String[] args) {
|
||||||
if (cs instanceof Player) {
|
|
||||||
if (args.length == 0) {
|
if (args.length == 0) {
|
||||||
questsHelp(cs);
|
questsHelp(cs);
|
||||||
return true;
|
return true;
|
||||||
} else {
|
}
|
||||||
boolean translateSubCommands = plugin.getSettings().canTranslateSubCommands();
|
boolean translateSubCommands = plugin.getSettings().canTranslateSubCommands();
|
||||||
if (args[0].equalsIgnoreCase(translateSubCommands ? Lang.get("COMMAND_LIST") : "list")) {
|
if (args[0].equalsIgnoreCase(translateSubCommands ? Lang.get("COMMAND_LIST") : "list")) {
|
||||||
questsList(cs, args);
|
questsList(cs, args);
|
||||||
} else if (args[0].equalsIgnoreCase(translateSubCommands ? Lang.get("COMMAND_TAKE") : "take")) {
|
} else if (args[0].equalsIgnoreCase(translateSubCommands ? Lang.get("COMMAND_TAKE") : "take")) {
|
||||||
|
if (!(cs instanceof Player)) {
|
||||||
|
cs.sendMessage(ChatColor.YELLOW + Lang.get("consoleError"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
questsTake((Player) cs, args);
|
questsTake((Player) cs, args);
|
||||||
} else if (args[0].equalsIgnoreCase(translateSubCommands ? Lang.get("COMMAND_QUIT") : "quit")) {
|
} else if (args[0].equalsIgnoreCase(translateSubCommands ? Lang.get("COMMAND_QUIT") : "quit")) {
|
||||||
|
if (!(cs instanceof Player)) {
|
||||||
|
cs.sendMessage(ChatColor.YELLOW + Lang.get("consoleError"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
questsQuit((Player) cs, args);
|
questsQuit((Player) cs, args);
|
||||||
} else if (args[0].equalsIgnoreCase(translateSubCommands ? Lang.get("COMMAND_STATS") : "stats")) {
|
} else if (args[0].equalsIgnoreCase(translateSubCommands ? Lang.get("COMMAND_STATS") : "stats")) {
|
||||||
|
if (!(cs instanceof Player)) {
|
||||||
|
cs.sendMessage(ChatColor.YELLOW + Lang.get("consoleError"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
questsStats(cs, null);
|
questsStats(cs, null);
|
||||||
} else if (args[0].equalsIgnoreCase(translateSubCommands ? Lang.get("COMMAND_JOURNAL") : "journal")) {
|
} else if (args[0].equalsIgnoreCase(translateSubCommands ? Lang.get("COMMAND_JOURNAL") : "journal")) {
|
||||||
|
if (!(cs instanceof Player)) {
|
||||||
|
cs.sendMessage(ChatColor.YELLOW + Lang.get("consoleError"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
questsJournal((Player) cs);
|
questsJournal((Player) cs);
|
||||||
} else if (args[0].equalsIgnoreCase(translateSubCommands ? Lang.get("COMMAND_TOP") : "top")) {
|
} else if (args[0].equalsIgnoreCase(translateSubCommands ? Lang.get("COMMAND_TOP") : "top")) {
|
||||||
questsTop(cs, args);
|
questsTop(cs, args);
|
||||||
} else if (args[0].equalsIgnoreCase(translateSubCommands ? Lang.get("COMMAND_EDITOR") : "editor")) {
|
} else if (args[0].equalsIgnoreCase(translateSubCommands ? Lang.get("COMMAND_EDITOR") : "editor")) {
|
||||||
|
if (!(cs instanceof Player)) {
|
||||||
|
cs.sendMessage(ChatColor.YELLOW + Lang.get("consoleError"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
questsEditor(cs);
|
questsEditor(cs);
|
||||||
} else if (args[0].equalsIgnoreCase(translateSubCommands ? Lang.get("COMMAND_EVENTS_EDITOR") : "actions")
|
} else if (args[0].equalsIgnoreCase(translateSubCommands ? Lang.get("COMMAND_EVENTS_EDITOR")
|
||||||
|| args[0].equalsIgnoreCase("action") || args[0].equalsIgnoreCase("events")) {
|
: "actions") || args[0].equalsIgnoreCase("action") || args[0].equalsIgnoreCase("events")) {
|
||||||
|
if (!(cs instanceof Player)) {
|
||||||
|
cs.sendMessage(ChatColor.YELLOW + Lang.get("consoleError"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
questsActions(cs);
|
questsActions(cs);
|
||||||
} else if (args[0].equalsIgnoreCase(translateSubCommands ? Lang.get("COMMAND_INFO") : "info")) {
|
} else if (args[0].equalsIgnoreCase(translateSubCommands ? Lang.get("COMMAND_INFO") : "info")) {
|
||||||
questsInfo(cs);
|
questsInfo(cs);
|
||||||
@ -238,11 +263,6 @@ public class CmdExecutor implements CommandExecutor {
|
|||||||
cs.sendMessage(ChatColor.YELLOW + Lang.get("questsUnknownCommand"));
|
cs.sendMessage(ChatColor.YELLOW + Lang.get("questsUnknownCommand"));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} else {
|
|
||||||
cs.sendMessage(ChatColor.YELLOW + Lang.get("consoleError"));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -260,17 +280,22 @@ public class CmdExecutor implements CommandExecutor {
|
|||||||
adminQuit(cs, args);
|
adminQuit(cs, args);
|
||||||
} else if (args[0].equalsIgnoreCase(translateSubCommands ? Lang.get("COMMAND_QUESTADMIN_POINTS") : "points")) {
|
} else if (args[0].equalsIgnoreCase(translateSubCommands ? Lang.get("COMMAND_QUESTADMIN_POINTS") : "points")) {
|
||||||
adminPoints(cs, args);
|
adminPoints(cs, args);
|
||||||
} else if (args[0].equalsIgnoreCase(translateSubCommands ? Lang.get("COMMAND_QUESTADMIN_TAKEPOINTS") : "takepoints")) {
|
} else if (args[0].equalsIgnoreCase(translateSubCommands ? Lang.get("COMMAND_QUESTADMIN_TAKEPOINTS")
|
||||||
|
: "takepoints")) {
|
||||||
adminTakePoints(cs, args);
|
adminTakePoints(cs, args);
|
||||||
} else if (args[0].equalsIgnoreCase(translateSubCommands ? Lang.get("COMMAND_QUESTADMIN_GIVEPOINTS") : "givepoints")) {
|
} else if (args[0].equalsIgnoreCase(translateSubCommands ? Lang.get("COMMAND_QUESTADMIN_GIVEPOINTS")
|
||||||
|
: "givepoints")) {
|
||||||
adminGivePoints(cs, args);
|
adminGivePoints(cs, args);
|
||||||
} else if (args[0].equalsIgnoreCase(translateSubCommands ? Lang.get("COMMAND_QUESTADMIN_POINTSALL") : "pointsall")) {
|
} else if (args[0].equalsIgnoreCase(translateSubCommands ? Lang.get("COMMAND_QUESTADMIN_POINTSALL")
|
||||||
|
: "pointsall")) {
|
||||||
adminPointsAll(cs, args);
|
adminPointsAll(cs, args);
|
||||||
} else if (args[0].equalsIgnoreCase(translateSubCommands ? Lang.get("COMMAND_QUESTADMIN_FINISH") : "finish")) {
|
} else if (args[0].equalsIgnoreCase(translateSubCommands ? Lang.get("COMMAND_QUESTADMIN_FINISH") : "finish")) {
|
||||||
adminFinish(cs, args);
|
adminFinish(cs, args);
|
||||||
} else if (args[0].equalsIgnoreCase(translateSubCommands ? Lang.get("COMMAND_QUESTADMIN_NEXTSTAGE") : "nextstage")) {
|
} else if (args[0].equalsIgnoreCase(translateSubCommands ? Lang.get("COMMAND_QUESTADMIN_NEXTSTAGE")
|
||||||
|
: "nextstage")) {
|
||||||
adminNextStage(cs, args);
|
adminNextStage(cs, args);
|
||||||
} else if (args[0].equalsIgnoreCase(translateSubCommands ? Lang.get("COMMAND_QUESTADMIN_SETSTAGE") : "setstage")) {
|
} else if (args[0].equalsIgnoreCase(translateSubCommands ? Lang.get("COMMAND_QUESTADMIN_SETSTAGE")
|
||||||
|
: "setstage")) {
|
||||||
adminSetStage(cs, args);
|
adminSetStage(cs, args);
|
||||||
} else if (args[0].equalsIgnoreCase(translateSubCommands ? Lang.get("COMMAND_QUESTADMIN_RESET") : "reset")) {
|
} else if (args[0].equalsIgnoreCase(translateSubCommands ? Lang.get("COMMAND_QUESTADMIN_RESET") : "reset")) {
|
||||||
adminReset(cs, args);
|
adminReset(cs, args);
|
||||||
@ -336,22 +361,29 @@ public class CmdExecutor implements CommandExecutor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (reqs.getHeroesPrimaryClass() != null) {
|
if (reqs.getHeroesPrimaryClass() != null) {
|
||||||
if (plugin.testPrimaryHeroesClass(reqs.getHeroesPrimaryClass(), player.getUniqueId())) {
|
if (plugin.getDependencies()
|
||||||
cs.sendMessage(ChatColor.BOLD + "" + ChatColor.GREEN + reqs.getHeroesPrimaryClass() + ChatColor.RESET + "" + ChatColor.DARK_GREEN + " " + Lang.get("heroesClass"));
|
.testPrimaryHeroesClass(reqs.getHeroesPrimaryClass(), player.getUniqueId())) {
|
||||||
|
cs.sendMessage(ChatColor.BOLD + "" + ChatColor.GREEN + reqs.getHeroesPrimaryClass()
|
||||||
|
+ ChatColor.RESET + "" + ChatColor.DARK_GREEN + " " + Lang.get("heroesClass"));
|
||||||
} else {
|
} else {
|
||||||
cs.sendMessage(ChatColor.BOLD + "" + ChatColor.DARK_RED + reqs.getHeroesPrimaryClass() + ChatColor.RESET + "" + ChatColor.RED + " " + Lang.get("heroesClass"));
|
cs.sendMessage(ChatColor.BOLD + "" + ChatColor.DARK_RED + reqs.getHeroesPrimaryClass()
|
||||||
|
+ ChatColor.RESET + "" + ChatColor.RED + " " + Lang.get("heroesClass"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (reqs.getHeroesSecondaryClass() != null) {
|
if (reqs.getHeroesSecondaryClass() != null) {
|
||||||
if (plugin.testSecondaryHeroesClass(reqs.getHeroesSecondaryClass(), player.getUniqueId())) {
|
if (plugin.getDependencies()
|
||||||
cs.sendMessage(ChatColor.BOLD + "" + ChatColor.DARK_RED + reqs.getHeroesSecondaryClass() + ChatColor.RESET + "" + ChatColor.RED + " " + Lang.get("heroesClass"));
|
.testSecondaryHeroesClass(reqs.getHeroesSecondaryClass(), player.getUniqueId())) {
|
||||||
|
cs.sendMessage(ChatColor.BOLD + "" + ChatColor.DARK_RED + reqs.getHeroesSecondaryClass()
|
||||||
|
+ ChatColor.RESET + "" + ChatColor.RED + " " + Lang.get("heroesClass"));
|
||||||
} else {
|
} else {
|
||||||
cs.sendMessage(ChatColor.BOLD + "" + ChatColor.GREEN + reqs.getHeroesSecondaryClass() + ChatColor.RESET + "" + ChatColor.DARK_GREEN + " " + Lang.get("heroesClass"));
|
cs.sendMessage(ChatColor.BOLD + "" + ChatColor.GREEN + reqs.getHeroesSecondaryClass()
|
||||||
|
+ ChatColor.RESET + "" + ChatColor.DARK_GREEN + " " + Lang.get("heroesClass"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (reqs.getMcmmoSkills().isEmpty() == false) {
|
if (reqs.getMcmmoSkills().isEmpty() == false) {
|
||||||
for (String skill : reqs.getMcmmoSkills()) {
|
for (String skill : reqs.getMcmmoSkills()) {
|
||||||
int level = Quests.getMCMMOSkillLevel(Quests.getMcMMOSkill(skill), player.getName());
|
int level = plugin.getDependencies().getMcmmoSkillLevel(Quests
|
||||||
|
.getMcMMOSkill(skill), player.getName());
|
||||||
int req = reqs.getMcmmoAmounts().get(reqs.getMcmmoSkills().indexOf(skill));
|
int req = reqs.getMcmmoAmounts().get(reqs.getMcmmoSkills().indexOf(skill));
|
||||||
String skillName = MiscUtil.getCapitalized(skill);
|
String skillName = MiscUtil.getCapitalized(skill);
|
||||||
if (level >= req) {
|
if (level >= req) {
|
||||||
@ -363,23 +395,30 @@ public class CmdExecutor implements CommandExecutor {
|
|||||||
}
|
}
|
||||||
if (reqs.getQuestPoints() != 0) {
|
if (reqs.getQuestPoints() != 0) {
|
||||||
if (quester.getQuestPoints() >= reqs.getQuestPoints()) {
|
if (quester.getQuestPoints() >= reqs.getQuestPoints()) {
|
||||||
cs.sendMessage(ChatColor.GRAY + "- " + ChatColor.GREEN + reqs.getQuestPoints() + " " + Lang.get("questPoints"));
|
cs.sendMessage(ChatColor.GRAY + "- " + ChatColor.GREEN + reqs.getQuestPoints() + " "
|
||||||
|
+ Lang.get("questPoints"));
|
||||||
} else {
|
} else {
|
||||||
cs.sendMessage(ChatColor.GRAY + "- " + ChatColor.RED + reqs.getQuestPoints() + " " + Lang.get("questPoints"));
|
cs.sendMessage(ChatColor.GRAY + "- " + ChatColor.RED + reqs.getQuestPoints() + " "
|
||||||
|
+ Lang.get("questPoints"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (reqs.getMoney() != 0) {
|
if (reqs.getMoney() != 0) {
|
||||||
if (plugin.getDependencies().getVaultEconomy() != null && plugin.getDependencies().getVaultEconomy().getBalance(quester.getOfflinePlayer()) >= reqs.getMoney()) {
|
if (plugin.getDependencies().getVaultEconomy() != null && plugin.getDependencies()
|
||||||
|
.getVaultEconomy().getBalance(quester.getOfflinePlayer()) >= reqs.getMoney()) {
|
||||||
if (reqs.getMoney() == 1) {
|
if (reqs.getMoney() == 1) {
|
||||||
cs.sendMessage(ChatColor.GRAY + "- " + ChatColor.GREEN + reqs.getMoney() + " " + plugin.getCurrency(false));
|
cs.sendMessage(ChatColor.GRAY + "- " + ChatColor.GREEN + reqs.getMoney() + " "
|
||||||
|
+ plugin.getDependencies().getCurrency(false));
|
||||||
} else {
|
} else {
|
||||||
cs.sendMessage(ChatColor.GRAY + "- " + ChatColor.GREEN + reqs.getMoney() + " " + plugin.getCurrency(true));
|
cs.sendMessage(ChatColor.GRAY + "- " + ChatColor.GREEN + reqs.getMoney() + " "
|
||||||
|
+ plugin.getDependencies().getCurrency(true));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (reqs.getMoney() == 1) {
|
if (reqs.getMoney() == 1) {
|
||||||
cs.sendMessage(ChatColor.GRAY + "- " + ChatColor.RED + reqs.getMoney() + " " + plugin.getCurrency(false));
|
cs.sendMessage(ChatColor.GRAY + "- " + ChatColor.RED + reqs.getMoney() + " "
|
||||||
|
+ plugin.getDependencies().getCurrency(false));
|
||||||
} else {
|
} else {
|
||||||
cs.sendMessage(ChatColor.GRAY + "- " + ChatColor.RED + reqs.getMoney() + " " + plugin.getCurrency(true));
|
cs.sendMessage(ChatColor.GRAY + "- " + ChatColor.RED + reqs.getMoney() + " "
|
||||||
|
+ plugin.getDependencies().getCurrency(true));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -395,9 +434,11 @@ public class CmdExecutor implements CommandExecutor {
|
|||||||
if (reqs.getNeededQuests().isEmpty() == false) {
|
if (reqs.getNeededQuests().isEmpty() == false) {
|
||||||
for (String s : reqs.getNeededQuests()) {
|
for (String s : reqs.getNeededQuests()) {
|
||||||
if (quester.getCompletedQuests().contains(s)) {
|
if (quester.getCompletedQuests().contains(s)) {
|
||||||
cs.sendMessage(ChatColor.GRAY + "- " + ChatColor.GREEN + Lang.get("complete") + " " + ChatColor.ITALIC + s);
|
cs.sendMessage(ChatColor.GRAY + "- " + ChatColor.GREEN + Lang.get("complete") + " "
|
||||||
|
+ ChatColor.ITALIC + s);
|
||||||
} else {
|
} else {
|
||||||
cs.sendMessage(ChatColor.GRAY + "- " + ChatColor.RED + Lang.get("complete") + " " + ChatColor.ITALIC + s);
|
cs.sendMessage(ChatColor.GRAY + "- " + ChatColor.RED + Lang.get("complete") + " "
|
||||||
|
+ ChatColor.ITALIC + s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -405,11 +446,13 @@ public class CmdExecutor implements CommandExecutor {
|
|||||||
for (String s : reqs.getBlockQuests()) {
|
for (String s : reqs.getBlockQuests()) {
|
||||||
if (quester.getCompletedQuests().contains(s)) {
|
if (quester.getCompletedQuests().contains(s)) {
|
||||||
String msg = Lang.get("haveCompleted");
|
String msg = Lang.get("haveCompleted");
|
||||||
msg = msg.replace("<quest>", ChatColor.ITALIC + "" + ChatColor.DARK_PURPLE + s + ChatColor.RED);
|
msg = msg.replace("<quest>", ChatColor.ITALIC + "" + ChatColor.DARK_PURPLE + s
|
||||||
|
+ ChatColor.RED);
|
||||||
cs.sendMessage(ChatColor.GRAY + "- " + ChatColor.RED + msg);
|
cs.sendMessage(ChatColor.GRAY + "- " + ChatColor.RED + msg);
|
||||||
} else {
|
} else {
|
||||||
String msg = Lang.get("cannotComplete");
|
String msg = Lang.get("cannotComplete");
|
||||||
msg = msg.replace("<quest>", ChatColor.ITALIC + "" + ChatColor.DARK_PURPLE + s + ChatColor.GREEN);
|
msg = msg.replace("<quest>", ChatColor.ITALIC + "" + ChatColor.DARK_PURPLE + s
|
||||||
|
+ ChatColor.GREEN);
|
||||||
cs.sendMessage(ChatColor.GRAY + "- " + ChatColor.GREEN + msg);
|
cs.sendMessage(ChatColor.GRAY + "- " + ChatColor.GREEN + msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -425,10 +468,12 @@ public class CmdExecutor implements CommandExecutor {
|
|||||||
|
|
||||||
private boolean questsInfo(final CommandSender cs) {
|
private boolean questsInfo(final CommandSender cs) {
|
||||||
if (cs.hasPermission("quests.info")) {
|
if (cs.hasPermission("quests.info")) {
|
||||||
cs.sendMessage(ChatColor.YELLOW + Lang.get("quests") + " " + ChatColor.GOLD + plugin.getDescription().getVersion());
|
cs.sendMessage(ChatColor.YELLOW + Lang.get("quests") + " " + ChatColor.GOLD
|
||||||
|
+ plugin.getDescription().getVersion());
|
||||||
cs.sendMessage(ChatColor.GOLD + Lang.get("createdBy") + " " + ChatColor.RED + "Blackvein"
|
cs.sendMessage(ChatColor.GOLD + Lang.get("createdBy") + " " + ChatColor.RED + "Blackvein"
|
||||||
+ ChatColor.GOLD + " " + Lang.get("continuedBy") + " " + ChatColor.RED + "PikaMug");
|
+ ChatColor.GOLD + " " + Lang.get("continuedBy") + " " + ChatColor.RED + "PikaMug");
|
||||||
cs.sendMessage(ChatColor.DARK_AQUA + "" + ChatColor.UNDERLINE + "https://www.spigotmc.org/resources/quests.3711/");
|
cs.sendMessage(ChatColor.DARK_AQUA + "" + ChatColor.UNDERLINE
|
||||||
|
+ "https://www.spigotmc.org/resources/quests.3711/");
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -455,7 +500,8 @@ public class CmdExecutor implements CommandExecutor {
|
|||||||
Conversation cn = plugin.getQuestFactory().getConversationFactory().buildConversation(c);
|
Conversation cn = plugin.getQuestFactory().getConversationFactory().buildConversation(c);
|
||||||
if (cs instanceof Player) {
|
if (cs instanceof Player) {
|
||||||
Quester quester = plugin.getQuester(((Player)cs).getUniqueId());
|
Quester quester = plugin.getQuester(((Player)cs).getUniqueId());
|
||||||
QuestsCommandPreQuestsEditorEvent event = new QuestsCommandPreQuestsEditorEvent(quester, cn.getContext());
|
QuestsCommandPreQuestsEditorEvent event
|
||||||
|
= new QuestsCommandPreQuestsEditorEvent(quester, cn.getContext());
|
||||||
plugin.getServer().getPluginManager().callEvent(event);
|
plugin.getServer().getPluginManager().callEvent(event);
|
||||||
if (event.isCancelled()) {
|
if (event.isCancelled()) {
|
||||||
return false;
|
return false;
|
||||||
@ -525,7 +571,8 @@ public class CmdExecutor implements CommandExecutor {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
numPrinted++;
|
numPrinted++;
|
||||||
cs.sendMessage(ChatColor.YELLOW + String.valueOf(numPrinted) + ". " + s + " - " + ChatColor.DARK_PURPLE + i + ChatColor.YELLOW + " " + Lang.get("questPoints"));
|
cs.sendMessage(ChatColor.YELLOW + String.valueOf(numPrinted) + ". " + s + " - " + ChatColor.DARK_PURPLE
|
||||||
|
+ i + ChatColor.YELLOW + " " + Lang.get("questPoints"));
|
||||||
if (numPrinted == topNumber) {
|
if (numPrinted == topNumber) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -550,9 +597,10 @@ public class CmdExecutor implements CommandExecutor {
|
|||||||
quester = plugin.getQuester(((Player) cs).getUniqueId());
|
quester = plugin.getQuester(((Player) cs).getUniqueId());
|
||||||
cs.sendMessage(ChatColor.GOLD + "- " + ((Player) cs).getName() + " -");
|
cs.sendMessage(ChatColor.GOLD + "- " + ((Player) cs).getName() + " -");
|
||||||
}
|
}
|
||||||
cs.sendMessage(ChatColor.YELLOW + Lang.get("questPointsDisplay") + " " + ChatColor.DARK_PURPLE + quester.getQuestPoints());
|
cs.sendMessage(ChatColor.YELLOW + Lang.get("questPointsDisplay") + " " + ChatColor.DARK_PURPLE
|
||||||
|
+ quester.getQuestPoints());
|
||||||
if (quester.getCurrentQuests().isEmpty()) {
|
if (quester.getCurrentQuests().isEmpty()) {
|
||||||
cs.sendMessage(ChatColor.YELLOW + Lang.get("currentQuest") + " " + ChatColor.DARK_PURPLE + Lang.get("none"));
|
cs.sendMessage(ChatColor.YELLOW + Lang.get("currentQuest") + " " + ChatColor.DARK_PURPLE+ Lang.get("none"));
|
||||||
} else {
|
} else {
|
||||||
cs.sendMessage(ChatColor.YELLOW + Lang.get("currentQuest"));
|
cs.sendMessage(ChatColor.YELLOW + Lang.get("currentQuest"));
|
||||||
for (Entry<Quest, Integer> set : quester.getCurrentQuests().entrySet()) {
|
for (Entry<Quest, Integer> set : quester.getCurrentQuests().entrySet()) {
|
||||||
@ -698,22 +746,46 @@ public class CmdExecutor implements CommandExecutor {
|
|||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
private void questsList(final CommandSender cs, String[] args) {
|
private void questsList(final CommandSender cs, String[] args) {
|
||||||
if (((Player) cs).hasPermission("quests.list")) {
|
if (cs.hasPermission("quests.list")) {
|
||||||
|
if (!(cs instanceof Player)) {
|
||||||
|
int num = 1;
|
||||||
|
cs.sendMessage(ChatColor.GOLD + Lang.get("questListTitle"));
|
||||||
|
for (Quest q : plugin.getQuests()) {
|
||||||
|
cs.sendMessage(ChatColor.YELLOW + "" + num + ". " + q.getName());
|
||||||
|
num++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Player player = (Player)cs;
|
||||||
if (args.length == 1) {
|
if (args.length == 1) {
|
||||||
plugin.listQuests((Player) cs, 1);
|
Quester quester = plugin.getQuester(player.getUniqueId());
|
||||||
|
QuestsCommandPreQuestsListEvent preEvent = new QuestsCommandPreQuestsListEvent(quester, 1);
|
||||||
|
plugin.getServer().getPluginManager().callEvent(preEvent);
|
||||||
|
if (preEvent.isCancelled()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
plugin.listQuests(player, 1);
|
||||||
} else if (args.length == 2) {
|
} else if (args.length == 2) {
|
||||||
int page;
|
int page = 1;
|
||||||
try {
|
try {
|
||||||
page = Integer.parseInt(args[1]);
|
page = Integer.parseInt(args[1]);
|
||||||
if (page < 1) {
|
if (page < 1) {
|
||||||
cs.sendMessage(ChatColor.YELLOW + Lang.get("pageSelectionPosNum"));
|
cs.sendMessage(ChatColor.YELLOW + Lang.get("pageSelectionPosNum"));
|
||||||
return;
|
return;
|
||||||
|
} else {
|
||||||
|
Quester quester = plugin.getQuester(player.getUniqueId());
|
||||||
|
QuestsCommandPreQuestsListEvent preEvent = new QuestsCommandPreQuestsListEvent(quester, page);
|
||||||
|
plugin.getServer().getPluginManager().callEvent(preEvent);
|
||||||
|
if (preEvent.isCancelled()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
plugin.listQuests(player, page);
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
cs.sendMessage(ChatColor.YELLOW + Lang.get("pageSelectionNum"));
|
cs.sendMessage(ChatColor.YELLOW + Lang.get("pageSelectionNum"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
plugin.listQuests((Player) cs, page);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
cs.sendMessage(ChatColor.RED + Lang.get("noPermission"));
|
cs.sendMessage(ChatColor.RED + Lang.get("noPermission"));
|
||||||
@ -721,66 +793,86 @@ public class CmdExecutor implements CommandExecutor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void questsHelp(final CommandSender cs) {
|
private void questsHelp(final CommandSender cs) {
|
||||||
if (((Player) cs).hasPermission("quests.quests")) {
|
if (cs.hasPermission("quests.quests")) {
|
||||||
Player p = (Player) cs;
|
printHelp(cs);
|
||||||
printHelp(p);
|
|
||||||
} else {
|
} else {
|
||||||
cs.sendMessage(ChatColor.RED + Lang.get("noPermission"));
|
cs.sendMessage(ChatColor.RED + Lang.get("noPermission"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void printHelp(Player player) {
|
public void printHelp(CommandSender cs) {
|
||||||
boolean translateSubCommands = plugin.getSettings().canTranslateSubCommands();
|
boolean translateSubCommands = plugin.getSettings().canTranslateSubCommands();
|
||||||
player.sendMessage(ChatColor.GOLD + Lang.get(player, "questHelpTitle"));
|
cs.sendMessage(ChatColor.GOLD + Lang.get("questHelpTitle"));
|
||||||
player.sendMessage(ChatColor.YELLOW + "/quests " + Lang.get(player, "questDisplayHelp"));
|
cs.sendMessage(ChatColor.YELLOW + "/quests " + Lang.get("questDisplayHelp"));
|
||||||
if (player.hasPermission("quests.list") || player.hasPermission("quests.list")) {
|
if (cs.hasPermission("quests.list") || cs.hasPermission("quests.list")) {
|
||||||
player.sendMessage(ChatColor.YELLOW + "/quests "+ Lang.get(player, "COMMAND_LIST_HELP")
|
cs.sendMessage(ChatColor.YELLOW + "/quests "+ Lang.get("COMMAND_LIST_HELP")
|
||||||
.replace("<command>", ChatColor.GOLD + (translateSubCommands ? Lang.get(player, "COMMAND_LIST") : "list") + ChatColor.YELLOW));
|
.replace("<command>", ChatColor.GOLD + (translateSubCommands ? Lang.get("COMMAND_LIST")
|
||||||
|
: "list") + ChatColor.YELLOW));
|
||||||
}
|
}
|
||||||
if (player.hasPermission("quests.take")) {
|
if (cs instanceof Player && cs.hasPermission("quests.take")) {
|
||||||
player.sendMessage(ChatColor.YELLOW + "/quests " + Lang.get(player, "COMMAND_TAKE_HELP")
|
cs.sendMessage(ChatColor.YELLOW + "/quests " + Lang.get("COMMAND_TAKE_HELP")
|
||||||
.replace("<command>", ChatColor.GOLD + (translateSubCommands ? Lang.get(player, "COMMAND_TAKE") : "take") + ChatColor.YELLOW));
|
.replace("<command>", ChatColor.GOLD + (translateSubCommands ? Lang.get("COMMAND_TAKE")
|
||||||
|
: "take") + ChatColor.YELLOW));
|
||||||
}
|
}
|
||||||
if (player.hasPermission("quests.quit")) {
|
if (cs instanceof Player && cs.hasPermission("quests.quit")) {
|
||||||
player.sendMessage(ChatColor.YELLOW + "/quests " + Lang.get(player, "COMMAND_QUIT_HELP")
|
cs.sendMessage(ChatColor.YELLOW + "/quests " + Lang.get("COMMAND_QUIT_HELP")
|
||||||
.replace("<command>", ChatColor.GOLD + (translateSubCommands ? Lang.get(player, "COMMAND_QUIT") : "quit") + ChatColor.YELLOW));
|
.replace("<command>", ChatColor.GOLD + (translateSubCommands ? Lang.get("COMMAND_QUIT")
|
||||||
|
: "quit") + ChatColor.YELLOW));
|
||||||
}
|
}
|
||||||
if (player.hasPermission("quests.journal")) {
|
if (cs instanceof Player && cs.hasPermission("quests.journal")) {
|
||||||
player.sendMessage(ChatColor.YELLOW + "/quests " + Lang.get(player, "COMMAND_JOURNAL_HELP")
|
cs.sendMessage(ChatColor.YELLOW + "/quests " + Lang.get("COMMAND_JOURNAL_HELP")
|
||||||
.replace("<command>", ChatColor.GOLD + (translateSubCommands ? Lang.get(player, "COMMAND_JOURNAL") : "journal") + ChatColor.YELLOW));
|
.replace("<command>", ChatColor.GOLD + (translateSubCommands ? Lang.get("COMMAND_JOURNAL")
|
||||||
|
: "journal") + ChatColor.YELLOW));
|
||||||
}
|
}
|
||||||
if (player.hasPermission("quests.editor.*") || player.hasPermission("quests.editor.editor")) {
|
if (cs instanceof Player && (cs.hasPermission("quests.editor.*") || cs.hasPermission("quests.editor.editor"))) {
|
||||||
player.sendMessage(ChatColor.YELLOW + "/quests " + Lang.get(player, "COMMAND_EDITOR_HELP")
|
cs.sendMessage(ChatColor.YELLOW + "/quests " + Lang.get("COMMAND_EDITOR_HELP")
|
||||||
.replace("<command>", ChatColor.GOLD + (translateSubCommands ? Lang.get(player, "COMMAND_EDITOR") : "editor") + ChatColor.YELLOW));
|
.replace("<command>", ChatColor.GOLD + (translateSubCommands ? Lang.get("COMMAND_EDITOR")
|
||||||
|
: "editor") + ChatColor.YELLOW));
|
||||||
}
|
}
|
||||||
if (player.hasPermission("quests.events.*") || player.hasPermission("quests.actions.*")
|
if (cs instanceof Player && (cs.hasPermission("quests.events.*") || cs.hasPermission("quests.actions.*")
|
||||||
|| player.hasPermission("quests.events.editor") || player.hasPermission("quests.actions.editor")) {
|
|| cs.hasPermission("quests.events.editor") || cs.hasPermission("quests.actions.editor"))) {
|
||||||
player.sendMessage(ChatColor.YELLOW + "/quests " + Lang.get(player, "COMMAND_EVENTS_EDITOR_HELP")
|
cs.sendMessage(ChatColor.YELLOW + "/quests " + Lang.get("COMMAND_EVENTS_EDITOR_HELP")
|
||||||
.replace("<command>", ChatColor.GOLD + (translateSubCommands ? Lang.get(player, "COMMAND_EVENTS_EDITOR") : "actions") + ChatColor.YELLOW));
|
.replace("<command>", ChatColor.GOLD + (translateSubCommands
|
||||||
|
? Lang.get("COMMAND_EVENTS_EDITOR") : "actions") + ChatColor.YELLOW));
|
||||||
}
|
}
|
||||||
if (player.hasPermission("quests.stats")) {
|
if (cs.hasPermission("quests.stats")) {
|
||||||
player.sendMessage(ChatColor.YELLOW + "/quests " + Lang.get(player, "COMMAND_STATS_HELP")
|
cs.sendMessage(ChatColor.YELLOW + "/quests " + Lang.get("COMMAND_STATS_HELP")
|
||||||
.replace("<command>", ChatColor.GOLD + (translateSubCommands ? Lang.get(player, "COMMAND_STATS") : "stats") + ChatColor.YELLOW));
|
.replace("<command>", ChatColor.GOLD + (translateSubCommands ? Lang.get("COMMAND_STATS")
|
||||||
|
: "stats") + ChatColor.YELLOW));
|
||||||
}
|
}
|
||||||
if (player.hasPermission("quests.top")) {
|
if (cs.hasPermission("quests.top")) {
|
||||||
player.sendMessage(ChatColor.YELLOW + "/quests " + Lang.get(player, "COMMAND_TOP_HELP")
|
cs.sendMessage(ChatColor.YELLOW + "/quests " + Lang.get("COMMAND_TOP_HELP")
|
||||||
.replace("<command>", ChatColor.GOLD + (translateSubCommands ? Lang.get(player, "COMMAND_TOP") : "top") + ChatColor.YELLOW));
|
.replace("<command>", ChatColor.GOLD + (translateSubCommands ? Lang.get("COMMAND_TOP")
|
||||||
|
: "top") + ChatColor.YELLOW));
|
||||||
}
|
}
|
||||||
if (player.hasPermission("quests.info")) {
|
if (cs.hasPermission("quests.info")) {
|
||||||
player.sendMessage(ChatColor.YELLOW + "/quests " + Lang.get(player, "COMMAND_INFO_HELP")
|
cs.sendMessage(ChatColor.YELLOW + "/quests " + Lang.get("COMMAND_INFO_HELP")
|
||||||
.replace("<command>", ChatColor.GOLD + (translateSubCommands ? Lang.get(player, "COMMAND_INFO") : "info") + ChatColor.YELLOW));
|
.replace("<command>", ChatColor.GOLD + (translateSubCommands ? Lang.get("COMMAND_INFO")
|
||||||
|
: "info") + ChatColor.YELLOW));
|
||||||
}
|
}
|
||||||
player.sendMessage(ChatColor.DARK_AQUA + "/quest " + ChatColor.YELLOW + Lang.get(player, "COMMAND_QUEST_HELP"));
|
if (cs instanceof Player) {
|
||||||
if (player.hasPermission("quests.questinfo")) {
|
cs.sendMessage(ChatColor.DARK_AQUA + "/quest " + ChatColor.YELLOW + Lang.get("COMMAND_QUEST_HELP"));
|
||||||
player.sendMessage(ChatColor.DARK_AQUA + "/quest " + ChatColor.YELLOW + Lang.get(player, "COMMAND_QUESTINFO_HELP"));
|
|
||||||
}
|
}
|
||||||
if (player.hasPermission("quests.admin.*") || player.hasPermission("quests.admin")) {
|
if (cs instanceof Player && cs.hasPermission("quests.questinfo")) {
|
||||||
player.sendMessage(ChatColor.YELLOW + "/questadmin " + ChatColor.RED + Lang.get(player, "COMMAND_QUESTADMIN_HELP"));
|
cs.sendMessage(ChatColor.DARK_AQUA + "/quest " + ChatColor.YELLOW
|
||||||
|
+ Lang.get("COMMAND_QUESTINFO_HELP"));
|
||||||
|
}
|
||||||
|
if (cs.hasPermission("quests.admin.*") || cs.hasPermission("quests.admin")) {
|
||||||
|
cs.sendMessage(ChatColor.YELLOW + "/questadmin " + ChatColor.RED
|
||||||
|
+ Lang.get("COMMAND_QUESTADMIN_HELP"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Use {@link #printHelp(CommandSender)}
|
||||||
|
*/
|
||||||
|
public void printHelp(Player player) {
|
||||||
|
printHelp((CommandSender)player);
|
||||||
|
}
|
||||||
|
|
||||||
public String getQuestsCommandUsage(String cmd) {
|
public String getQuestsCommandUsage(String cmd) {
|
||||||
return ChatColor.RED + Lang.get("usage") + ": " + ChatColor.YELLOW + "/quests " + Lang.get(Lang.getCommandKey(cmd) + "_HELP");
|
return ChatColor.RED + Lang.get("usage") + ": " + ChatColor.YELLOW + "/quests "
|
||||||
|
+ Lang.get(Lang.getCommandKey(cmd) + "_HELP");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void adminHelp(final CommandSender cs) {
|
private void adminHelp(final CommandSender cs) {
|
||||||
@ -796,7 +888,8 @@ public class CmdExecutor implements CommandExecutor {
|
|||||||
plugin.reloadQuests();
|
plugin.reloadQuests();
|
||||||
cs.sendMessage(ChatColor.GOLD + Lang.get("questsReloaded"));
|
cs.sendMessage(ChatColor.GOLD + Lang.get("questsReloaded"));
|
||||||
String msg = Lang.get("numQuestsLoaded");
|
String msg = Lang.get("numQuestsLoaded");
|
||||||
msg = msg.replace("<number>", ChatColor.DARK_PURPLE + String.valueOf(plugin.getQuests().size()) + ChatColor.GOLD);
|
msg = msg.replace("<number>", ChatColor.DARK_PURPLE + String.valueOf(plugin.getQuests().size())
|
||||||
|
+ ChatColor.GOLD);
|
||||||
cs.sendMessage(ChatColor.GOLD + msg);
|
cs.sendMessage(ChatColor.GOLD + msg);
|
||||||
} else {
|
} else {
|
||||||
cs.sendMessage(ChatColor.RED + Lang.get("noPermission"));
|
cs.sendMessage(ChatColor.RED + Lang.get("noPermission"));
|
||||||
@ -920,8 +1013,10 @@ public class CmdExecutor implements CommandExecutor {
|
|||||||
for (Quest q : quester.getCurrentQuests().keySet()) {
|
for (Quest q : quester.getCurrentQuests().keySet()) {
|
||||||
if (q.getName().equalsIgnoreCase(questToGive.getName())) {
|
if (q.getName().equalsIgnoreCase(questToGive.getName())) {
|
||||||
String msg = Lang.get("questsPlayerHasQuestAlready");
|
String msg = Lang.get("questsPlayerHasQuestAlready");
|
||||||
msg = msg.replace("<player>", ChatColor.ITALIC + "" + ChatColor.GREEN + target.getName() + ChatColor.RESET + ChatColor.YELLOW);
|
msg = msg.replace("<player>", ChatColor.ITALIC + "" + ChatColor.GREEN + target.getName()
|
||||||
msg = msg.replace("<quest>", ChatColor.ITALIC + "" + ChatColor.DARK_PURPLE + questToGive.getName() + ChatColor.RESET + ChatColor.YELLOW);
|
+ ChatColor.RESET + ChatColor.YELLOW);
|
||||||
|
msg = msg.replace("<quest>", ChatColor.ITALIC + "" + ChatColor.DARK_PURPLE
|
||||||
|
+ questToGive.getName() + ChatColor.RESET + ChatColor.YELLOW);
|
||||||
cs.sendMessage(ChatColor.YELLOW + msg);
|
cs.sendMessage(ChatColor.YELLOW + msg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1200,7 +1295,8 @@ public class CmdExecutor implements CommandExecutor {
|
|||||||
quest.delete();
|
quest.delete();
|
||||||
String msg = Lang.get("questReset");
|
String msg = Lang.get("questReset");
|
||||||
if (Bukkit.getOfflinePlayer(id).getName() != null) {
|
if (Bukkit.getOfflinePlayer(id).getName() != null) {
|
||||||
msg = msg.replace("<player>", ChatColor.GREEN + Bukkit.getOfflinePlayer(id).getName() + ChatColor.GOLD);
|
msg = msg.replace("<player>", ChatColor.GREEN + Bukkit.getOfflinePlayer(id).getName()
|
||||||
|
+ ChatColor.GOLD);
|
||||||
} else {
|
} else {
|
||||||
msg = msg.replace("<player>", ChatColor.GREEN + args[1] + ChatColor.GOLD);
|
msg = msg.replace("<player>", ChatColor.GREEN + args[1] + ChatColor.GOLD);
|
||||||
}
|
}
|
||||||
@ -1242,7 +1338,8 @@ public class CmdExecutor implements CommandExecutor {
|
|||||||
}
|
}
|
||||||
String msg = Lang.get("questRemoved");
|
String msg = Lang.get("questRemoved");
|
||||||
if (Bukkit.getOfflinePlayer(quester.getUUID()).getName() != null) {
|
if (Bukkit.getOfflinePlayer(quester.getUUID()).getName() != null) {
|
||||||
msg = msg.replace("<player>", ChatColor.GREEN + Bukkit.getOfflinePlayer(quester.getUUID()).getName() + ChatColor.GOLD);
|
msg = msg.replace("<player>", ChatColor.GREEN + Bukkit.getOfflinePlayer(quester.getUUID()).getName()
|
||||||
|
+ ChatColor.GOLD);
|
||||||
} else {
|
} else {
|
||||||
msg = msg.replace("<player>", ChatColor.GREEN + args[1] + ChatColor.GOLD);
|
msg = msg.replace("<player>", ChatColor.GREEN + args[1] + ChatColor.GOLD);
|
||||||
}
|
}
|
||||||
@ -1263,60 +1360,76 @@ public class CmdExecutor implements CommandExecutor {
|
|||||||
boolean translateSubCommands = plugin.getSettings().canTranslateSubCommands();
|
boolean translateSubCommands = plugin.getSettings().canTranslateSubCommands();
|
||||||
if (cs.hasPermission("quests.admin.*") || cs.hasPermission("quests.admin.stats")) {
|
if (cs.hasPermission("quests.admin.*") || cs.hasPermission("quests.admin.stats")) {
|
||||||
cs.sendMessage(ChatColor.YELLOW + "/questadmin " + ChatColor.RED + Lang.get("COMMAND_QUESTADMIN_STATS_HELP")
|
cs.sendMessage(ChatColor.YELLOW + "/questadmin " + ChatColor.RED + Lang.get("COMMAND_QUESTADMIN_STATS_HELP")
|
||||||
.replace("<command>", ChatColor.GOLD + (translateSubCommands ? Lang.get("COMMAND_QUESTADMIN_STATS") : "stats") + ChatColor.RED));
|
.replace("<command>", ChatColor.GOLD + (translateSubCommands ? Lang.get("COMMAND_QUESTADMIN_STATS")
|
||||||
|
: "stats") + ChatColor.RED));
|
||||||
}
|
}
|
||||||
if (cs.hasPermission("quests.admin.*") || cs.hasPermission("quests.admin.give")) {
|
if (cs.hasPermission("quests.admin.*") || cs.hasPermission("quests.admin.give")) {
|
||||||
cs.sendMessage(ChatColor.YELLOW + "/questadmin " + ChatColor.RED + Lang.get("COMMAND_QUESTADMIN_GIVE_HELP")
|
cs.sendMessage(ChatColor.YELLOW + "/questadmin " + ChatColor.RED + Lang.get("COMMAND_QUESTADMIN_GIVE_HELP")
|
||||||
.replace("<command>", ChatColor.GOLD + (translateSubCommands ? Lang.get("COMMAND_QUESTADMIN_GIVE") : "give") + ChatColor.RED));
|
.replace("<command>", ChatColor.GOLD + (translateSubCommands ? Lang.get("COMMAND_QUESTADMIN_GIVE")
|
||||||
|
: "give") + ChatColor.RED));
|
||||||
}
|
}
|
||||||
if (cs.hasPermission("quests.admin.*") || cs.hasPermission("quests.admin.quit")) {
|
if (cs.hasPermission("quests.admin.*") || cs.hasPermission("quests.admin.quit")) {
|
||||||
cs.sendMessage(ChatColor.YELLOW + "/questadmin " + ChatColor.RED + Lang.get("COMMAND_QUESTADMIN_QUIT_HELP")
|
cs.sendMessage(ChatColor.YELLOW + "/questadmin " + ChatColor.RED + Lang.get("COMMAND_QUESTADMIN_QUIT_HELP")
|
||||||
.replace("<command>", ChatColor.GOLD + (translateSubCommands ? Lang.get("COMMAND_QUESTADMIN_QUIT") : "quit") + ChatColor.RED));
|
.replace("<command>", ChatColor.GOLD + (translateSubCommands ? Lang.get("COMMAND_QUESTADMIN_QUIT")
|
||||||
|
: "quit") + ChatColor.RED));
|
||||||
}
|
}
|
||||||
if (cs.hasPermission("quests.admin.*") || cs.hasPermission("quests.admin.points")) {
|
if (cs.hasPermission("quests.admin.*") || cs.hasPermission("quests.admin.points")) {
|
||||||
cs.sendMessage(ChatColor.YELLOW + "/questadmin " + ChatColor.RED + Lang.get("COMMAND_QUESTADMIN_POINTS_HELP")
|
cs.sendMessage(ChatColor.YELLOW + "/questadmin " + ChatColor.RED
|
||||||
.replace("<command>", ChatColor.GOLD + (translateSubCommands ? Lang.get("COMMAND_QUESTADMIN_POINTS") : "points") + ChatColor.RED));
|
+ Lang.get("COMMAND_QUESTADMIN_POINTS_HELP") .replace("<command>", ChatColor.GOLD
|
||||||
|
+ (translateSubCommands ? Lang.get("COMMAND_QUESTADMIN_POINTS") : "points") + ChatColor.RED));
|
||||||
}
|
}
|
||||||
if (cs.hasPermission("quests.admin.*") || cs.hasPermission("quests.admin.takepoints")) {
|
if (cs.hasPermission("quests.admin.*") || cs.hasPermission("quests.admin.takepoints")) {
|
||||||
cs.sendMessage(ChatColor.YELLOW + "/questadmin " + ChatColor.RED + Lang.get("COMMAND_QUESTADMIN_TAKEPOINTS_HELP")
|
cs.sendMessage(ChatColor.YELLOW + "/questadmin " + ChatColor.RED
|
||||||
.replace("<command>", ChatColor.GOLD + (translateSubCommands ? Lang.get("COMMAND_QUESTADMIN_TAKEPOINTS") : "takepoints") + ChatColor.RED));
|
+ Lang.get("COMMAND_QUESTADMIN_TAKEPOINTS_HELP") .replace("<command>", ChatColor.GOLD
|
||||||
|
+ (translateSubCommands ? Lang.get("COMMAND_QUESTADMIN_TAKEPOINTS") : "takepoints")
|
||||||
|
+ ChatColor.RED));
|
||||||
}
|
}
|
||||||
if (cs.hasPermission("quests.admin.*") || cs.hasPermission("quests.admin.givepoints")) {
|
if (cs.hasPermission("quests.admin.*") || cs.hasPermission("quests.admin.givepoints")) {
|
||||||
cs.sendMessage(ChatColor.YELLOW + "/questadmin " + ChatColor.RED + Lang.get("COMMAND_QUESTADMIN_GIVEPOINTS_HELP")
|
cs.sendMessage(ChatColor.YELLOW + "/questadmin " + ChatColor.RED
|
||||||
.replace("<command>", ChatColor.GOLD + (translateSubCommands ? Lang.get("COMMAND_QUESTADMIN_GIVEPOINTS") : "givepoints") + ChatColor.RED));
|
+ Lang.get("COMMAND_QUESTADMIN_GIVEPOINTS_HELP").replace("<command>", ChatColor.GOLD
|
||||||
|
+ (translateSubCommands ? Lang.get("COMMAND_QUESTADMIN_GIVEPOINTS") : "givepoints")
|
||||||
|
+ ChatColor.RED));
|
||||||
}
|
}
|
||||||
if (cs.hasPermission("quests.admin.*") || cs.hasPermission("quests.admin.pointsall")) {
|
if (cs.hasPermission("quests.admin.*") || cs.hasPermission("quests.admin.pointsall")) {
|
||||||
cs.sendMessage(ChatColor.YELLOW + "/questadmin " + ChatColor.RED + Lang.get("COMMAND_QUESTADMIN_POINTSALL_HELP")
|
cs.sendMessage(ChatColor.YELLOW + "/questadmin " + ChatColor.RED
|
||||||
.replace("<command>", ChatColor.GOLD + (translateSubCommands ? Lang.get("COMMAND_QUESTADMIN_POINTSALL") : "pointsall") + ChatColor.RED));
|
+ Lang.get("COMMAND_QUESTADMIN_POINTSALL_HELP").replace("<command>", ChatColor.GOLD
|
||||||
|
+ (translateSubCommands ? Lang.get("COMMAND_QUESTADMIN_POINTSALL") : "pointsall") + ChatColor.RED));
|
||||||
}
|
}
|
||||||
if (cs.hasPermission("quests.admin.*") || cs.hasPermission("quests.admin.finish")) {
|
if (cs.hasPermission("quests.admin.*") || cs.hasPermission("quests.admin.finish")) {
|
||||||
cs.sendMessage(ChatColor.YELLOW + "/questadmin " + ChatColor.RED + Lang.get("COMMAND_QUESTADMIN_FINISH_HELP")
|
cs.sendMessage(ChatColor.YELLOW + "/questadmin " + ChatColor.RED
|
||||||
.replace("<command>", ChatColor.GOLD + (translateSubCommands ? Lang.get("COMMAND_QUESTADMIN_FINISH") : "finish") + ChatColor.RED));
|
+ Lang.get("COMMAND_QUESTADMIN_FINISH_HELP").replace("<command>", ChatColor.GOLD
|
||||||
|
+ (translateSubCommands ? Lang.get("COMMAND_QUESTADMIN_FINISH") : "finish") + ChatColor.RED));
|
||||||
}
|
}
|
||||||
if (cs.hasPermission("quests.admin.*") || cs.hasPermission("quests.admin.nextstage")) {
|
if (cs.hasPermission("quests.admin.*") || cs.hasPermission("quests.admin.nextstage")) {
|
||||||
cs.sendMessage(ChatColor.YELLOW + "/questadmin " + ChatColor.RED + Lang.get("COMMAND_QUESTADMIN_NEXTSTAGE_HELP")
|
cs.sendMessage(ChatColor.YELLOW + "/questadmin " + ChatColor.RED
|
||||||
.replace("<command>", ChatColor.GOLD + (translateSubCommands ? Lang.get("COMMAND_QUESTADMIN_NEXTSTAGE") : "nextstage") + ChatColor.RED));
|
+ Lang.get("COMMAND_QUESTADMIN_NEXTSTAGE_HELP").replace("<command>", ChatColor.GOLD
|
||||||
|
+ (translateSubCommands ? Lang.get("COMMAND_QUESTADMIN_NEXTSTAGE") : "nextstage") + ChatColor.RED));
|
||||||
}
|
}
|
||||||
if (cs.hasPermission("quests.admin.*") || cs.hasPermission("quests.admin.setstage")) {
|
if (cs.hasPermission("quests.admin.*") || cs.hasPermission("quests.admin.setstage")) {
|
||||||
cs.sendMessage(ChatColor.YELLOW + "/questadmin " + ChatColor.RED + Lang.get("COMMAND_QUESTADMIN_SETSTAGE_HELP")
|
cs.sendMessage(ChatColor.YELLOW + "/questadmin " + ChatColor.RED
|
||||||
.replace("<command>", ChatColor.GOLD + (translateSubCommands ? Lang.get("COMMAND_QUESTADMIN_SETSTAGE") : "setstage") + ChatColor.RED));
|
+ Lang.get("COMMAND_QUESTADMIN_SETSTAGE_HELP").replace("<command>", ChatColor.GOLD
|
||||||
|
+ (translateSubCommands ? Lang.get("COMMAND_QUESTADMIN_SETSTAGE") : "setstage") + ChatColor.RED));
|
||||||
}
|
}
|
||||||
if (cs.hasPermission("quests.admin.*") || cs.hasPermission("quests.admin.reset")) {
|
if (cs.hasPermission("quests.admin.*") || cs.hasPermission("quests.admin.reset")) {
|
||||||
cs.sendMessage(ChatColor.YELLOW + "/questadmin " + ChatColor.RED + Lang.get("COMMAND_QUESTADMIN_RESET_HELP")
|
cs.sendMessage(ChatColor.YELLOW + "/questadmin " + ChatColor.RED+ Lang.get("COMMAND_QUESTADMIN_RESET_HELP")
|
||||||
.replace("<command>", ChatColor.GOLD + (translateSubCommands ? Lang.get("COMMAND_QUESTADMIN_RESET") : "reset") + ChatColor.RED));
|
.replace("<command>", ChatColor.GOLD + (translateSubCommands ? Lang.get("COMMAND_QUESTADMIN_RESET")
|
||||||
|
: "reset") + ChatColor.RED));
|
||||||
}
|
}
|
||||||
if (cs.hasPermission("quests.admin.*") || cs.hasPermission("quests.admin.remove")) {
|
if (cs.hasPermission("quests.admin.*") || cs.hasPermission("quests.admin.remove")) {
|
||||||
cs.sendMessage(ChatColor.YELLOW + "/questadmin " + ChatColor.RED + Lang.get("COMMAND_QUESTADMIN_REMOVE_HELP")
|
cs.sendMessage(ChatColor.YELLOW + "/questadmin " + ChatColor.RED
|
||||||
.replace("<command>", ChatColor.GOLD + (translateSubCommands ? Lang.get("COMMAND_QUESTADMIN_REMOVE") : "remove") + ChatColor.RED));
|
+ Lang.get("COMMAND_QUESTADMIN_REMOVE_HELP").replace("<command>", ChatColor.GOLD
|
||||||
|
+ (translateSubCommands ? Lang.get("COMMAND_QUESTADMIN_REMOVE") : "remove") + ChatColor.RED));
|
||||||
}
|
}
|
||||||
if (cs.hasPermission("quests.admin.*") || cs.hasPermission("quests.admin.reload")) {
|
if (cs.hasPermission("quests.admin.*") || cs.hasPermission("quests.admin.reload")) {
|
||||||
cs.sendMessage(ChatColor.YELLOW + "/questadmin " + ChatColor.RED + Lang.get("COMMAND_QUESTADMIN_RELOAD_HELP")
|
cs.sendMessage(ChatColor.YELLOW + "/questadmin " + ChatColor.RED
|
||||||
.replace("<command>", ChatColor.GOLD + (translateSubCommands ? Lang.get("COMMAND_QUESTADMIN_RELOAD") : "reload") + ChatColor.RED));
|
+ Lang.get("COMMAND_QUESTADMIN_RELOAD_HELP").replace("<command>", ChatColor.GOLD
|
||||||
|
+ (translateSubCommands ? Lang.get("COMMAND_QUESTADMIN_RELOAD") : "reload") + ChatColor.RED));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getQuestadminCommandUsage(String cmd) {
|
public String getQuestadminCommandUsage(String cmd) {
|
||||||
return ChatColor.RED + Lang.get("usage") + ": " + ChatColor.YELLOW + "/questadmin " + Lang.get(Lang.getCommandKey(cmd) + "_HELP");
|
return ChatColor.RED + Lang.get("usage") + ": " + ChatColor.YELLOW + "/questadmin "
|
||||||
|
+ Lang.get(Lang.getCommandKey(cmd) + "_HELP");
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Map<String, Integer> sort(Map<String, Integer> unsortedMap) {
|
private static Map<String, Integer> sort(Map<String, Integer> unsortedMap) {
|
||||||
|
@ -27,13 +27,17 @@ import me.blackvein.quests.util.Lang;
|
|||||||
public class DungeonsListener implements Listener {
|
public class DungeonsListener implements Listener {
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onGroupCreate(DGroupCreateEvent event) {
|
public void onGroupCreate(DGroupCreateEvent event) {
|
||||||
|
if (Lang.get("questDungeonsCreate").length() > 0) {
|
||||||
event.getCreator().sendMessage(ChatColor.YELLOW + Lang.get("questDungeonsCreate"));
|
event.getCreator().sendMessage(ChatColor.YELLOW + Lang.get("questDungeonsCreate"));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onGroupDisbandEvent(DGroupDisbandEvent event) {
|
public void onGroupDisbandEvent(DGroupDisbandEvent event) {
|
||||||
|
if (Lang.get("questDungeonsDisband").length() > 0) {
|
||||||
event.getDisbander().sendMessage(ChatColor.RED + Lang.get("questDungeonsDisband"));
|
event.getDisbander().sendMessage(ChatColor.RED + Lang.get("questDungeonsDisband"));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPlayerJoinEvent(DPlayerJoinDGroupEvent event) {
|
public void onPlayerJoinEvent(DPlayerJoinDGroupEvent event) {
|
||||||
@ -41,11 +45,16 @@ public class DungeonsListener implements Listener {
|
|||||||
Player i = event.getDGroup().getCaptain();
|
Player i = event.getDGroup().getCaptain();
|
||||||
Player p = event.getDPlayer().getPlayer();
|
Player p = event.getDPlayer().getPlayer();
|
||||||
if (i != null && p != null) {
|
if (i != null && p != null) {
|
||||||
i.sendMessage(ChatColor.GREEN + Lang.get(i, "questDungeonsInvite").replace("<player>", p.getName()));
|
if (Lang.get("questDungeonsInvite").length() > 0) {
|
||||||
|
i.sendMessage(ChatColor.GREEN + Lang.get(i, "questDungeonsInvite")
|
||||||
|
.replace("<player>", p.getName()));
|
||||||
|
}
|
||||||
|
if (Lang.get("questDungeonsJoin").length() > 0) {
|
||||||
p.sendMessage(ChatColor.GREEN + Lang.get(p, "questDungeonsJoin").replace("<player>", i.getName()));
|
p.sendMessage(ChatColor.GREEN + Lang.get(p, "questDungeonsJoin").replace("<player>", i.getName()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPlayerLeaveEvent(DPlayerLeaveDGroupEvent event) {
|
public void onPlayerLeaveEvent(DPlayerLeaveDGroupEvent event) {
|
||||||
@ -53,9 +62,13 @@ public class DungeonsListener implements Listener {
|
|||||||
Player k = event.getDGroup().getCaptain();
|
Player k = event.getDGroup().getCaptain();
|
||||||
Player p = event.getDPlayer().getPlayer();
|
Player p = event.getDPlayer().getPlayer();
|
||||||
if (k != null && p != null) {
|
if (k != null && p != null) {
|
||||||
|
if (Lang.get("questDungeonsKicked").length() > 0) {
|
||||||
k.sendMessage(ChatColor.RED + Lang.get(k, "questDungeonsKicked").replace("<player>", k.getName()));
|
k.sendMessage(ChatColor.RED + Lang.get(k, "questDungeonsKicked").replace("<player>", k.getName()));
|
||||||
|
}
|
||||||
|
if (Lang.get("questDungeonsLeave").length() > 0) {
|
||||||
p.sendMessage(ChatColor.RED + Lang.get(p, "questDungeonsLeave").replace("<player>", p.getName()));
|
p.sendMessage(ChatColor.RED + Lang.get(p, "questDungeonsLeave").replace("<player>", p.getName()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,8 @@ public class NpcListener implements Listener {
|
|||||||
@EventHandler(priority = EventPriority.LOWEST)
|
@EventHandler(priority = EventPriority.LOWEST)
|
||||||
public void onNPCRightClick(NPCRightClickEvent evt) {
|
public void onNPCRightClick(NPCRightClickEvent evt) {
|
||||||
if (plugin.getQuestFactory().getSelectingNpcs().contains(evt.getClicker())) {
|
if (plugin.getQuestFactory().getSelectingNpcs().contains(evt.getClicker())) {
|
||||||
evt.getClicker().sendMessage(ChatColor.GREEN + evt.getNPC().getName() + ": " + ChatColor.DARK_GREEN + "ID " + evt.getNPC().getId());
|
evt.getClicker().sendMessage(ChatColor.GREEN + evt.getNPC().getName() + ": " + ChatColor.DARK_GREEN + "ID "
|
||||||
|
+ evt.getNPC().getId());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (evt.getClicker().isConversing() == false) {
|
if (evt.getClicker().isConversing() == false) {
|
||||||
@ -82,6 +83,7 @@ public class NpcListener implements Listener {
|
|||||||
if (id.equals(clicked.getId())) {
|
if (id.equals(clicked.getId())) {
|
||||||
quester.deliverToNPC(quest, clicked, hand);
|
quester.deliverToNPC(quest, clicked, hand);
|
||||||
delivery = true;
|
delivery = true;
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (!hand.getType().equals(Material.AIR)) {
|
} else if (!hand.getType().equals(Material.AIR)) {
|
||||||
@ -90,64 +92,85 @@ public class NpcListener implements Listener {
|
|||||||
String text = "";
|
String text = "";
|
||||||
boolean hasMeta = hand.hasItemMeta();
|
boolean hasMeta = hand.hasItemMeta();
|
||||||
if (hasMeta) {
|
if (hasMeta) {
|
||||||
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.ITALIC + (hand.getItemMeta().hasDisplayName() ? hand.getItemMeta().getDisplayName() + ChatColor.GRAY + " (" : "");
|
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.ITALIC
|
||||||
|
+ (hand.getItemMeta().hasDisplayName() ? hand.getItemMeta().getDisplayName()
|
||||||
|
+ ChatColor.GRAY + " (" : "");
|
||||||
}
|
}
|
||||||
text += ChatColor.AQUA + "<item>" + (hand.getDurability() != 0 ? (":" + ChatColor.BLUE + hand.getDurability()) : "") + ChatColor.GRAY;
|
text += ChatColor.AQUA + "<item>" + (hand.getDurability() != 0 ? (":" + ChatColor.BLUE
|
||||||
|
+ hand.getDurability()) : "") + ChatColor.GRAY;
|
||||||
if (hasMeta) {
|
if (hasMeta) {
|
||||||
text += (hand.getItemMeta().hasDisplayName() ? ")" : "");
|
text += (hand.getItemMeta().hasDisplayName() ? ")" : "");
|
||||||
}
|
}
|
||||||
text += " x " + ChatColor.DARK_AQUA + hand.getAmount() + ChatColor.GRAY;
|
text += " x " + ChatColor.DARK_AQUA + hand.getAmount() + ChatColor.GRAY;
|
||||||
if (plugin.getSettings().canTranslateItems() && !hasMeta && !hand.getItemMeta().hasDisplayName()) {
|
if (plugin.getSettings().canTranslateItems() && !hasMeta
|
||||||
plugin.getLocaleQuery().sendMessage(player, Lang.get(player, "questInvalidDeliveryItem").replace("<item>", text), hand.getType(), hand.getDurability(), null);
|
&& !hand.getItemMeta().hasDisplayName()) {
|
||||||
|
plugin.getLocaleQuery().sendMessage(player, Lang
|
||||||
|
.get(player, "questInvalidDeliveryItem").replace("<item>", text), hand
|
||||||
|
.getType(), hand.getDurability(), null);
|
||||||
} else {
|
} else {
|
||||||
player.sendMessage(Lang.get(player, "questInvalidDeliveryItem").replace("<item>", text).replace("<item>", ItemUtil.getName(hand)));
|
player.sendMessage(Lang.get(player, "questInvalidDeliveryItem")
|
||||||
|
.replace("<item>", text).replace("<item>", ItemUtil.getName(hand)));
|
||||||
}
|
}
|
||||||
switch (reasonCode) {
|
switch (reasonCode) {
|
||||||
case 1:
|
case 1:
|
||||||
player.sendMessage(ChatColor.GRAY + Lang.get(player, "difference").replace("<data>", "one item is null"));
|
player.sendMessage(ChatColor.GRAY + Lang.get(player, "difference")
|
||||||
|
.replace("<data>", "one item is null"));
|
||||||
break;
|
break;
|
||||||
case 0:
|
case 0:
|
||||||
// Should never happen
|
// Should never happen
|
||||||
player.sendMessage(ChatColor.GRAY + Lang.get(player, "difference").replace("<data>", "ERROR"));
|
player.sendMessage(ChatColor.GRAY + Lang.get(player, "difference")
|
||||||
|
.replace("<data>", "ERROR"));
|
||||||
break;
|
break;
|
||||||
case -1:
|
case -1:
|
||||||
player.sendMessage(ChatColor.GRAY + Lang.get(player, "difference").replace("<data>", "name"));
|
player.sendMessage(ChatColor.GRAY + Lang.get(player, "difference")
|
||||||
|
.replace("<data>", "name"));
|
||||||
break;
|
break;
|
||||||
case -2:
|
case -2:
|
||||||
player.sendMessage(ChatColor.GRAY + Lang.get(player, "difference").replace("<data>", "amount"));
|
player.sendMessage(ChatColor.GRAY + Lang.get(player, "difference")
|
||||||
|
.replace("<data>", "amount"));
|
||||||
break;
|
break;
|
||||||
case -3:
|
case -3:
|
||||||
player.sendMessage(ChatColor.GRAY + Lang.get(player, "difference").replace("<data>", "durability"));
|
player.sendMessage(ChatColor.GRAY + Lang.get(player, "difference")
|
||||||
|
.replace("<data>", "durability"));
|
||||||
break;
|
break;
|
||||||
case -4:
|
case -4:
|
||||||
player.sendMessage(ChatColor.GRAY + Lang.get(player, "difference").replace("<data>", "display name or lore"));
|
player.sendMessage(ChatColor.GRAY + Lang.get(player, "difference")
|
||||||
|
.replace("<data>", "display name or lore"));
|
||||||
break;
|
break;
|
||||||
case -5:
|
case -5:
|
||||||
player.sendMessage(ChatColor.GRAY + Lang.get(player, "difference").replace("<data>", "enchantments"));
|
player.sendMessage(ChatColor.GRAY + Lang.get(player, "difference")
|
||||||
|
.replace("<data>", "enchantments"));
|
||||||
break;
|
break;
|
||||||
case -6:
|
case -6:
|
||||||
player.sendMessage(ChatColor.GRAY + Lang.get(player, "difference").replace("<data>", "stored enchants"));
|
player.sendMessage(ChatColor.GRAY + Lang.get(player, "difference")
|
||||||
|
.replace("<data>", "stored enchants"));
|
||||||
break;
|
break;
|
||||||
case -7:
|
case -7:
|
||||||
player.sendMessage(ChatColor.GRAY + Lang.get(player, "difference").replace("<data>", "item flags"));
|
player.sendMessage(ChatColor.GRAY + Lang.get(player, "difference")
|
||||||
|
.replace("<data>", "item flags"));
|
||||||
break;
|
break;
|
||||||
case -8:
|
case -8:
|
||||||
player.sendMessage(ChatColor.GRAY + Lang.get(player, "difference").replace("<data>", "book data"));
|
player.sendMessage(ChatColor.GRAY + Lang.get(player, "difference")
|
||||||
|
.replace("<data>", "book data"));
|
||||||
break;
|
break;
|
||||||
case -9:
|
case -9:
|
||||||
player.sendMessage(ChatColor.GRAY + Lang.get(player, "difference").replace("<data>", "potion type"));
|
player.sendMessage(ChatColor.GRAY + Lang.get(player, "difference")
|
||||||
|
.replace("<data>", "potion type"));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
player.sendMessage(ChatColor.GRAY + Lang.get(player, "difference").replace("<data>", "unknown"));
|
player.sendMessage(ChatColor.GRAY + Lang.get(player, "difference")
|
||||||
|
.replace("<data>", "unknown"));
|
||||||
}
|
}
|
||||||
if (hasMeta) {
|
if (hasMeta) {
|
||||||
if (hand.getType().equals(Material.ENCHANTED_BOOK)) {
|
if (hand.getType().equals(Material.ENCHANTED_BOOK)) {
|
||||||
EnchantmentStorageMeta esmeta = (EnchantmentStorageMeta) hand.getItemMeta();
|
EnchantmentStorageMeta esmeta = (EnchantmentStorageMeta) hand.getItemMeta();
|
||||||
if (esmeta.hasStoredEnchants()) {
|
if (esmeta.hasStoredEnchants()) {
|
||||||
// TODO translate enchantment names
|
// TODO translate enchantment names
|
||||||
for (Entry<Enchantment, Integer> e : esmeta.getStoredEnchants().entrySet()) {
|
for (Entry<Enchantment, Integer> e : esmeta.getStoredEnchants()
|
||||||
|
.entrySet()) {
|
||||||
player.sendMessage(ChatColor.GRAY + "\u2515 " + ChatColor.DARK_GREEN
|
player.sendMessage(ChatColor.GRAY + "\u2515 " + ChatColor.DARK_GREEN
|
||||||
+ ItemUtil.getPrettyEnchantmentName(e.getKey()) + " " + RomanNumeral.getNumeral(e.getValue()) + "\n");
|
+ ItemUtil.getPrettyEnchantmentName(e.getKey()) + " "
|
||||||
|
+ RomanNumeral.getNumeral(e.getValue()) + "\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -162,7 +185,9 @@ public class NpcListener implements Listener {
|
|||||||
boolean hasObjective = false;
|
boolean hasObjective = false;
|
||||||
for (Quest quest : quester.getCurrentQuests().keySet()) {
|
for (Quest quest : quester.getCurrentQuests().keySet()) {
|
||||||
if (quester.containsObjective(quest, "talkToNPC")) {
|
if (quester.containsObjective(quest, "talkToNPC")) {
|
||||||
if (quester.getQuestData(quest) != null && quester.getQuestData(quest).citizensInteracted.containsKey(evt.getNPC().getId()) && quester.getQuestData(quest).citizensInteracted.get(evt.getNPC().getId()) == false) {
|
if (quester.getQuestData(quest) != null
|
||||||
|
&& quester.getQuestData(quest).citizensInteracted.containsKey(evt.getNPC().getId())
|
||||||
|
&& quester.getQuestData(quest).citizensInteracted.get(evt.getNPC().getId()) == false) {
|
||||||
hasObjective = true;
|
hasObjective = true;
|
||||||
}
|
}
|
||||||
quester.interactWithNPC(quest, evt.getNPC());
|
quester.interactWithNPC(quest, evt.getNPC());
|
||||||
@ -175,14 +200,17 @@ public class NpcListener implements Listener {
|
|||||||
if (quester.getCurrentQuests().containsKey(q))
|
if (quester.getCurrentQuests().containsKey(q))
|
||||||
continue;
|
continue;
|
||||||
if (q.getNpcStart() != null && q.getNpcStart().getId() == evt.getNPC().getId()) {
|
if (q.getNpcStart() != null && q.getNpcStart().getId() == evt.getNPC().getId()) {
|
||||||
if (plugin.getSettings().canIgnoreLockedQuests() && (quester.getCompletedQuests().contains(q.getName()) == false || q.getPlanner().getCooldown() > -1)) {
|
if (plugin.getSettings().canIgnoreLockedQuests()
|
||||||
|
&& (quester.getCompletedQuests().contains(q.getName()) == false
|
||||||
|
|| q.getPlanner().getCooldown() > -1)) {
|
||||||
if (q.testRequirements(quester)) {
|
if (q.testRequirements(quester)) {
|
||||||
npcQuests.add(q);
|
npcQuests.add(q);
|
||||||
if (q.getGUIDisplay() != null) {
|
if (q.getGUIDisplay() != null) {
|
||||||
hasAtLeastOneGUI = true;
|
hasAtLeastOneGUI = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (quester.getCompletedQuests().contains(q.getName()) == false || q.getPlanner().getCooldown() > -1) {
|
} else if (quester.getCompletedQuests().contains(q.getName()) == false
|
||||||
|
|| q.getPlanner().getCooldown() > -1) {
|
||||||
npcQuests.add(q);
|
npcQuests.add(q);
|
||||||
if (q.getGUIDisplay() != null) {
|
if (q.getGUIDisplay() != null) {
|
||||||
hasAtLeastOneGUI = true;
|
hasAtLeastOneGUI = true;
|
||||||
@ -193,18 +221,18 @@ public class NpcListener implements Listener {
|
|||||||
if (npcQuests.isEmpty() == false && npcQuests.size() == 1) {
|
if (npcQuests.isEmpty() == false && npcQuests.size() == 1) {
|
||||||
Quest q = npcQuests.get(0);
|
Quest q = npcQuests.get(0);
|
||||||
if (!quester.getCompletedQuests().contains(q.getName())) {
|
if (!quester.getCompletedQuests().contains(q.getName())) {
|
||||||
if (quester.getCurrentQuests().size() < plugin.getSettings().getMaxQuests() || plugin.getSettings().getMaxQuests() < 1) {
|
if (quester.getCurrentQuests().size() < plugin.getSettings().getMaxQuests()
|
||||||
|
|| plugin.getSettings().getMaxQuests() < 1) {
|
||||||
quester.setQuestToTake(q.getName());
|
quester.setQuestToTake(q.getName());
|
||||||
String s = extracted(quester);
|
|
||||||
for (String msg : s.split("<br>")) {
|
|
||||||
player.sendMessage(msg);
|
|
||||||
}
|
|
||||||
if (!plugin.getSettings().canAskConfirmation()) {
|
if (!plugin.getSettings().canAskConfirmation()) {
|
||||||
quester.takeQuest(q, false);
|
quester.takeQuest(q, false);
|
||||||
} else {
|
} else {
|
||||||
if (q.getGUIDisplay() != null) {
|
if (q.getGUIDisplay() != null) {
|
||||||
quester.showGUIDisplay(evt.getNPC(), npcQuests);
|
quester.showGUIDisplay(evt.getNPC(), npcQuests);
|
||||||
} else {
|
} else {
|
||||||
|
for (String msg : extracted(quester).split("<br>")) {
|
||||||
|
player.sendMessage(msg);
|
||||||
|
}
|
||||||
plugin.getConversationFactory().buildConversation((Conversable) player).begin();
|
plugin.getConversationFactory().buildConversation((Conversable) player).begin();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -213,28 +241,34 @@ public class NpcListener implements Listener {
|
|||||||
msg = msg.replace("<number>", String.valueOf(plugin.getSettings().getMaxQuests()));
|
msg = msg.replace("<number>", String.valueOf(plugin.getSettings().getMaxQuests()));
|
||||||
player.sendMessage(ChatColor.YELLOW + msg);
|
player.sendMessage(ChatColor.YELLOW + msg);
|
||||||
}
|
}
|
||||||
} else if (quester.getCurrentQuests().size() < plugin.getSettings().getMaxQuests() || plugin.getSettings().getMaxQuests() < 1) {
|
} else if (quester.getCurrentQuests().size() < plugin.getSettings().getMaxQuests()
|
||||||
|
|| plugin.getSettings().getMaxQuests() < 1) {
|
||||||
if (quester.getCooldownDifference(q) > 0) {
|
if (quester.getCooldownDifference(q) > 0) {
|
||||||
String early = Lang.get(player, "questTooEarly");
|
String early = Lang.get(player, "questTooEarly");
|
||||||
early = early.replace("<quest>", ChatColor.AQUA + q.getName() + ChatColor.YELLOW);
|
early = early.replace("<quest>", ChatColor.AQUA + q.getName() + ChatColor.YELLOW);
|
||||||
early = early.replace("<time>", ChatColor.DARK_PURPLE + Quests.getTime(quester.getCooldownDifference(q)) + ChatColor.YELLOW);
|
early = early.replace("<time>", ChatColor.DARK_PURPLE
|
||||||
|
+ Quests.getTime(quester.getCooldownDifference(q)) + ChatColor.YELLOW);
|
||||||
player.sendMessage(ChatColor.YELLOW + early);
|
player.sendMessage(ChatColor.YELLOW + early);
|
||||||
} else if (q.getPlanner().getCooldown() < 0) {
|
} else if (q.getPlanner().getCooldown() < 0) {
|
||||||
String completed = Lang.get(player, "questAlreadyCompleted");
|
String completed = Lang.get(player, "questAlreadyCompleted");
|
||||||
completed = completed.replace("<quest>", ChatColor.AQUA + q.getName() + ChatColor.YELLOW);
|
completed = completed.replace("<quest>", ChatColor.AQUA + q.getName()
|
||||||
|
+ ChatColor.YELLOW);
|
||||||
player.sendMessage(ChatColor.YELLOW + completed);
|
player.sendMessage(ChatColor.YELLOW + completed);
|
||||||
} else {
|
} else {
|
||||||
quester.setQuestToTake(q.getName());
|
quester.setQuestToTake(q.getName());
|
||||||
String s = extracted(quester);
|
|
||||||
for (String msg : s.split("<br>")) {
|
|
||||||
player.sendMessage(msg);
|
|
||||||
}
|
|
||||||
if (!plugin.getSettings().canAskConfirmation()) {
|
if (!plugin.getSettings().canAskConfirmation()) {
|
||||||
quester.takeQuest(q, false);
|
quester.takeQuest(q, false);
|
||||||
} else {
|
} else {
|
||||||
|
if (q.getGUIDisplay() != null) {
|
||||||
|
quester.showGUIDisplay(evt.getNPC(), npcQuests);
|
||||||
|
} else {
|
||||||
|
for (String msg : extracted(quester).split("<br>")) {
|
||||||
|
player.sendMessage(msg);
|
||||||
|
}
|
||||||
plugin.getConversationFactory().buildConversation((Conversable) player).begin();
|
plugin.getConversationFactory().buildConversation((Conversable) player).begin();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else if (quester.getCurrentQuests().containsKey(q) == false) {
|
} else if (quester.getCurrentQuests().containsKey(q) == false) {
|
||||||
String msg = Lang.get(player, "questMaxAllowed");
|
String msg = Lang.get(player, "questMaxAllowed");
|
||||||
msg = msg.replace("<number>", String.valueOf(plugin.getSettings().getMaxQuests()));
|
msg = msg.replace("<number>", String.valueOf(plugin.getSettings().getMaxQuests()));
|
||||||
@ -261,14 +295,16 @@ public class NpcListener implements Listener {
|
|||||||
@EventHandler
|
@EventHandler
|
||||||
public void onNPCLeftClick(NPCLeftClickEvent evt) {
|
public void onNPCLeftClick(NPCLeftClickEvent evt) {
|
||||||
if (plugin.getQuestFactory().getSelectingNpcs().contains(evt.getClicker())) {
|
if (plugin.getQuestFactory().getSelectingNpcs().contains(evt.getClicker())) {
|
||||||
evt.getClicker().sendMessage(ChatColor.GREEN + evt.getNPC().getName() + ": " + ChatColor.DARK_GREEN + Lang.get("id") + " " + evt.getNPC().getId());
|
evt.getClicker().sendMessage(ChatColor.GREEN + evt.getNPC().getName() + ": " + ChatColor.DARK_GREEN
|
||||||
|
+ Lang.get("id") + " " + evt.getNPC().getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onNPCDeath(NPCDeathEvent evt) {
|
public void onNPCDeath(NPCDeathEvent evt) {
|
||||||
if (evt.getNPC().getEntity().getLastDamageCause() instanceof EntityDamageByEntityEvent) {
|
if (evt.getNPC().getEntity().getLastDamageCause() instanceof EntityDamageByEntityEvent) {
|
||||||
EntityDamageByEntityEvent damageEvent = (EntityDamageByEntityEvent) evt.getNPC().getEntity().getLastDamageCause();
|
EntityDamageByEntityEvent damageEvent
|
||||||
|
= (EntityDamageByEntityEvent) evt.getNPC().getEntity().getLastDamageCause();
|
||||||
Entity damager = damageEvent.getDamager();
|
Entity damager = damageEvent.getDamager();
|
||||||
if (damager != null) {
|
if (damager != null) {
|
||||||
if (damager instanceof Projectile) {
|
if (damager instanceof Projectile) {
|
||||||
@ -311,6 +347,8 @@ public class NpcListener implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private String extracted(final Quester quester) {
|
private String extracted(final Quester quester) {
|
||||||
return MessageFormat.format("{0}- {1}{2}{3} -\n\n{4}{5}\n", ChatColor.GOLD, ChatColor.DARK_PURPLE, quester.getQuestToTake(), ChatColor.GOLD, ChatColor.RESET, plugin.getQuest(quester.getQuestToTake()).getDescription());
|
return MessageFormat.format("{0}- {1}{2}{3} -\n\n{4}{5}\n", ChatColor.GOLD, ChatColor.DARK_PURPLE,
|
||||||
|
quester.getQuestToTake(), ChatColor.GOLD, ChatColor.RESET, plugin.getQuest(quester.getQuestToTake())
|
||||||
|
.getDescription());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -32,46 +32,58 @@ public class PartiesListener implements Listener {
|
|||||||
if (event.getCreator() != null) {
|
if (event.getCreator() != null) {
|
||||||
Player p = Bukkit.getServer().getPlayer(event.getCreator().getPlayerUUID());
|
Player p = Bukkit.getServer().getPlayer(event.getCreator().getPlayerUUID());
|
||||||
if (p != null) {
|
if (p != null) {
|
||||||
|
if (Lang.get("questPartiesCreate").length() > 0) {
|
||||||
p.sendMessage(ChatColor.YELLOW + Lang.get("questPartiesCreate"));
|
p.sendMessage(ChatColor.YELLOW + Lang.get("questPartiesCreate"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPartyDeleteEvent(BukkitPartiesPartyPostDeleteEvent event) {
|
public void onPartyDeleteEvent(BukkitPartiesPartyPostDeleteEvent event) {
|
||||||
if (event.getCommandSender() != null) {
|
if (event.getCommandSender() != null) {
|
||||||
Player p = Bukkit.getServer().getPlayer(event.getCommandSender().getPlayerUUID());
|
Player p = Bukkit.getServer().getPlayer(event.getCommandSender().getPlayerUUID());
|
||||||
if (p != null) {
|
if (p != null) {
|
||||||
|
if (Lang.get("questPartiesDelete").length() > 0) {
|
||||||
p.sendMessage(ChatColor.RED + Lang.get("questPartiesDelete"));
|
p.sendMessage(ChatColor.RED + Lang.get("questPartiesDelete"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPlayerJoinEvent(BukkitPartiesPlayerPostJoinEvent event) {
|
public void onPlayerJoinEvent(BukkitPartiesPlayerPostJoinEvent event) {
|
||||||
if (event.isInvited() && event.getInviter() != null) {
|
if (event.isInvited() && event.getInviter() != null) {
|
||||||
Player i = Bukkit.getServer().getPlayer(event.getInviter());
|
Player i = Bukkit.getServer().getPlayer(event.getInviter());
|
||||||
if (i != null) {
|
if (i != null) {
|
||||||
|
if (Lang.get("questPartiesInvite").length() > 0) {
|
||||||
i.sendMessage(ChatColor.GREEN + Lang.get(i, "questPartiesInvite").replace("<player>", i.getName()));
|
i.sendMessage(ChatColor.GREEN + Lang.get(i, "questPartiesInvite").replace("<player>", i.getName()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
Player p = Bukkit.getServer().getPlayer(event.getPartyPlayer().getPlayerUUID());
|
Player p = Bukkit.getServer().getPlayer(event.getPartyPlayer().getPlayerUUID());
|
||||||
if (p != null) {
|
if (p != null) {
|
||||||
|
if (Lang.get("questPartiesJoin").length() > 0) {
|
||||||
p.sendMessage(ChatColor.GREEN + Lang.get(p, "questPartiesJoin").replace("<player>", p.getName()));
|
p.sendMessage(ChatColor.GREEN + Lang.get(p, "questPartiesJoin").replace("<player>", p.getName()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPlayerLeaveEvent(BukkitPartiesPlayerPostLeaveEvent event) {
|
public void onPlayerLeaveEvent(BukkitPartiesPlayerPostLeaveEvent event) {
|
||||||
if (event.isKicked() && event.getKicker() != null) {
|
if (event.isKicked() && event.getKicker() != null) {
|
||||||
Player k = Bukkit.getServer().getPlayer(event.getKicker().getPlayerUUID());
|
Player k = Bukkit.getServer().getPlayer(event.getKicker().getPlayerUUID());
|
||||||
if (k != null) {
|
if (k != null) {
|
||||||
|
if (Lang.get("questPartiesKicked").length() > 0) {
|
||||||
k.sendMessage(ChatColor.RED + Lang.get(k, "questPartiesKicked").replace("<player>", k.getName()));
|
k.sendMessage(ChatColor.RED + Lang.get(k, "questPartiesKicked").replace("<player>", k.getName()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
Player p = Bukkit.getServer().getPlayer(event.getPartyPlayer().getPlayerUUID());
|
Player p = Bukkit.getServer().getPlayer(event.getPartyPlayer().getPlayerUUID());
|
||||||
if (p != null) {
|
if (p != null) {
|
||||||
|
if (Lang.get("questPartiesLeave").length() > 0) {
|
||||||
p.sendMessage(ChatColor.RED + Lang.get(p, "questPartiesLeave").replace("<player>", p.getName()));
|
p.sendMessage(ChatColor.RED + Lang.get(p, "questPartiesLeave").replace("<player>", p.getName()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -74,6 +74,7 @@ import me.blackvein.quests.Quests;
|
|||||||
import me.blackvein.quests.Stage;
|
import me.blackvein.quests.Stage;
|
||||||
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 me.blackvein.quests.util.MiscUtil;
|
||||||
import net.citizensnpcs.api.CitizensAPI;
|
import net.citizensnpcs.api.CitizensAPI;
|
||||||
|
|
||||||
public class PlayerListener implements Listener {
|
public class PlayerListener implements Listener {
|
||||||
@ -88,17 +89,20 @@ public class PlayerListener implements Listener {
|
|||||||
public void onInventoryClickEvent(InventoryClickEvent evt) {
|
public void onInventoryClickEvent(InventoryClickEvent evt) {
|
||||||
InventoryAction ac = evt.getAction();
|
InventoryAction ac = evt.getAction();
|
||||||
if (ItemUtil.isItem(evt.getCurrentItem()) && ItemUtil.isJournal(evt.getCurrentItem())) {
|
if (ItemUtil.isItem(evt.getCurrentItem()) && ItemUtil.isJournal(evt.getCurrentItem())) {
|
||||||
if (ac.equals(InventoryAction.MOVE_TO_OTHER_INVENTORY) || ac.equals(InventoryAction.DROP_ALL_SLOT) || ac.equals(InventoryAction.DROP_ONE_SLOT)) {
|
if (ac.equals(InventoryAction.MOVE_TO_OTHER_INVENTORY) || ac.equals(InventoryAction.DROP_ALL_SLOT)
|
||||||
|
|| ac.equals(InventoryAction.DROP_ONE_SLOT)) {
|
||||||
evt.setCancelled(true);
|
evt.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else if (ItemUtil.isItem(evt.getCurrentItem()) && ItemUtil.isJournal(evt.getCursor())) {
|
} else if (ItemUtil.isItem(evt.getCurrentItem()) && ItemUtil.isJournal(evt.getCursor())) {
|
||||||
if (ac.equals(InventoryAction.MOVE_TO_OTHER_INVENTORY) || ac.equals(InventoryAction.DROP_ALL_CURSOR) || ac.equals(InventoryAction.DROP_ONE_CURSOR)) {
|
if (ac.equals(InventoryAction.MOVE_TO_OTHER_INVENTORY) || ac.equals(InventoryAction.DROP_ALL_CURSOR)
|
||||||
|
|| ac.equals(InventoryAction.DROP_ONE_CURSOR)) {
|
||||||
evt.setCancelled(true);
|
evt.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ItemUtil.isItem(evt.getCurrentItem()) && ItemUtil.isJournal(evt.getCurrentItem()) || ItemUtil.isItem(evt.getCursor()) && ItemUtil.isJournal(evt.getCursor())) {
|
if (ItemUtil.isItem(evt.getCurrentItem()) && ItemUtil.isJournal(evt.getCurrentItem())
|
||||||
|
|| ItemUtil.isItem(evt.getCursor()) && ItemUtil.isJournal(evt.getCursor())) {
|
||||||
int upper = evt.getView().getTopInventory().getSize();
|
int upper = evt.getView().getTopInventory().getSize();
|
||||||
if (evt.getView().getTopInventory().getType().equals(InventoryType.CRAFTING))
|
if (evt.getView().getTopInventory().getType().equals(InventoryType.CRAFTING))
|
||||||
upper += 4;
|
upper += 4;
|
||||||
@ -117,29 +121,36 @@ public class PlayerListener implements Listener {
|
|||||||
for (Quest quest : plugin.getQuests()) {
|
for (Quest quest : plugin.getQuests()) {
|
||||||
if (quest.getGUIDisplay() != null) {
|
if (quest.getGUIDisplay() != null) {
|
||||||
if (ItemUtil.compareItems(clicked, quest.getGUIDisplay(), false) == 0) {
|
if (ItemUtil.compareItems(clicked, quest.getGUIDisplay(), false) == 0) {
|
||||||
if (quester.getCurrentQuests().size() >= plugin.getSettings().getMaxQuests() && plugin.getSettings().getMaxQuests() > 0) {
|
if (quester.getCurrentQuests().size() >= plugin.getSettings().getMaxQuests()
|
||||||
|
&& plugin.getSettings().getMaxQuests() > 0) {
|
||||||
String msg = Lang.get(player, "questMaxAllowed");
|
String msg = Lang.get(player, "questMaxAllowed");
|
||||||
msg = msg.replace("<number>", String.valueOf(plugin.getSettings().getMaxQuests()));
|
msg = msg.replace("<number>", String.valueOf(plugin.getSettings().getMaxQuests()));
|
||||||
player.sendMessage(ChatColor.YELLOW + msg);
|
player.sendMessage(ChatColor.YELLOW + msg);
|
||||||
} else if (quester.getCompletedQuests().contains(quest.getName()) && quest.getPlanner().getCooldown() < 0) {
|
} else if (quester.getCompletedQuests().contains(quest.getName())
|
||||||
|
&& quest.getPlanner().getCooldown() < 0) {
|
||||||
String completed = Lang.get(player, "questAlreadyCompleted");
|
String completed = Lang.get(player, "questAlreadyCompleted");
|
||||||
completed = completed.replace("<quest>", ChatColor.AQUA + quest.getName() + ChatColor.YELLOW);
|
completed = completed.replace("<quest>", ChatColor.AQUA + quest.getName()
|
||||||
|
+ ChatColor.YELLOW);
|
||||||
player.sendMessage(ChatColor.YELLOW + completed);
|
player.sendMessage(ChatColor.YELLOW + completed);
|
||||||
} else {
|
} else {
|
||||||
boolean takeable = true;
|
boolean takeable = true;
|
||||||
if (quester.getCompletedQuests().contains(quest.getName())) {
|
if (quester.getCompletedQuests().contains(quest.getName())) {
|
||||||
if (quester.getCooldownDifference(quest) > 0) {
|
if (quester.getCooldownDifference(quest) > 0) {
|
||||||
String early = Lang.get(player, "questTooEarly");
|
String early = Lang.get(player, "questTooEarly");
|
||||||
early = early.replace("<quest>", ChatColor.AQUA + quest.getName() + ChatColor.YELLOW);
|
early = early.replace("<quest>", ChatColor.AQUA + quest.getName()
|
||||||
early = early.replace("<time>", ChatColor.DARK_PURPLE + Quests.getTime(quester.getCooldownDifference(quest)) + ChatColor.YELLOW);
|
+ ChatColor.YELLOW);
|
||||||
|
early = early.replace("<time>", ChatColor.DARK_PURPLE
|
||||||
|
+ MiscUtil.getTime(quester.getCooldownDifference(quest))
|
||||||
|
+ ChatColor.YELLOW);
|
||||||
player.sendMessage(ChatColor.YELLOW + early);
|
player.sendMessage(ChatColor.YELLOW + early);
|
||||||
takeable = false;
|
takeable = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (quest.getRegion() != null) {
|
if (quest.getRegionStart() != null) {
|
||||||
if (!quest.isInRegion(quester)) {
|
if (!quest.isInRegion(quester)) {
|
||||||
String invalidLoc = Lang.get(player, "questInvalidLocation");
|
String invalidLoc = Lang.get(player, "questInvalidLocation");
|
||||||
invalidLoc = invalidLoc.replace("<quest>", ChatColor.AQUA + quest.getName() + ChatColor.YELLOW);
|
invalidLoc = invalidLoc.replace("<quest>", ChatColor.AQUA + quest.getName()
|
||||||
|
+ ChatColor.YELLOW);
|
||||||
player.sendMessage(ChatColor.YELLOW + invalidLoc);
|
player.sendMessage(ChatColor.YELLOW + invalidLoc);
|
||||||
takeable = false;
|
takeable = false;
|
||||||
}
|
}
|
||||||
@ -164,7 +175,8 @@ public class PlayerListener implements Listener {
|
|||||||
|
|
||||||
@EventHandler(priority = EventPriority.HIGHEST)
|
@EventHandler(priority = EventPriority.HIGHEST)
|
||||||
public void onInventoryDragEvent(InventoryDragEvent evt) {
|
public void onInventoryDragEvent(InventoryDragEvent evt) {
|
||||||
if (ItemUtil.isItem(evt.getOldCursor()) && ItemUtil.isJournal(evt.getOldCursor()) || ItemUtil.isItem(evt.getCursor()) && ItemUtil.isJournal(evt.getCursor())) {
|
if (ItemUtil.isItem(evt.getOldCursor()) && ItemUtil.isJournal(evt.getOldCursor())
|
||||||
|
|| ItemUtil.isItem(evt.getCursor()) && ItemUtil.isJournal(evt.getCursor())) {
|
||||||
int upper = evt.getView().getTopInventory().getSize();
|
int upper = evt.getView().getTopInventory().getSize();
|
||||||
if (evt.getView().getTopInventory().getType().equals(InventoryType.CRAFTING))
|
if (evt.getView().getTopInventory().getType().equals(InventoryType.CRAFTING))
|
||||||
upper += 4;
|
upper += 4;
|
||||||
@ -204,9 +216,11 @@ public class PlayerListener implements Listener {
|
|||||||
final Player player = evt.getPlayer();
|
final Player player = evt.getPlayer();
|
||||||
boolean hasObjective = false;
|
boolean hasObjective = false;
|
||||||
if (evt.isCancelled() == false) {
|
if (evt.isCancelled() == false) {
|
||||||
final ItemStack blockItemStack = new ItemStack(evt.getClickedBlock().getType(), 1, evt.getClickedBlock().getState().getData().toItemStack().getDurability());
|
final ItemStack blockItemStack = new ItemStack(evt.getClickedBlock().getType(), 1, evt
|
||||||
|
.getClickedBlock().getState().getData().toItemStack().getDurability());
|
||||||
for (Quest quest : plugin.getQuests()) {
|
for (Quest quest : plugin.getQuests()) {
|
||||||
if (quester.getCurrentQuests().containsKey(quest) && quester.containsObjective(quest, "useBlock")) {
|
if (quester.getCurrentQuests().containsKey(quest)
|
||||||
|
&& quester.containsObjective(quest, "useBlock")) {
|
||||||
quester.useBlock(quest, blockItemStack);
|
quester.useBlock(quest, blockItemStack);
|
||||||
hasObjective = true;
|
hasObjective = true;
|
||||||
}
|
}
|
||||||
@ -218,95 +232,137 @@ public class PlayerListener implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!hasObjective) {
|
if (!hasObjective) {
|
||||||
if (plugin.getQuestFactory().getSelectedBlockStarts().containsKey(evt.getPlayer().getUniqueId())) {
|
if (plugin.getQuestFactory().getSelectedBlockStarts().containsKey(evt.getPlayer()
|
||||||
|
.getUniqueId())) {
|
||||||
Block block = evt.getClickedBlock();
|
Block block = evt.getClickedBlock();
|
||||||
Location loc = block.getLocation();
|
Location loc = block.getLocation();
|
||||||
Map<UUID, Block> temp = plugin.getQuestFactory().getSelectedBlockStarts();
|
Map<UUID, Block> temp = plugin.getQuestFactory().getSelectedBlockStarts();
|
||||||
temp.put(evt.getPlayer().getUniqueId(), block);
|
temp.put(evt.getPlayer().getUniqueId(), block);
|
||||||
plugin.getQuestFactory().setSelectedBlockStarts(temp);
|
plugin.getQuestFactory().setSelectedBlockStarts(temp);
|
||||||
evt.getPlayer().sendMessage(ChatColor.GOLD + Lang.get(player, "questSelectedLocation") + " " + ChatColor.AQUA + loc.getWorld().getName() + ": " + loc.getX() + ", " + loc.getY() + ", " + loc.getZ() + ChatColor.GOLD + " (" + ChatColor.GREEN + ItemUtil.getName(new ItemStack(block.getType())) + ChatColor.GOLD + ")");
|
evt.getPlayer().sendMessage(ChatColor.GOLD + Lang.get(player, "questSelectedLocation")
|
||||||
|
+ " " + ChatColor.AQUA + loc.getWorld().getName() + ": " + loc.getX() + ", "
|
||||||
|
+ loc.getY() + ", " + loc.getZ() + ChatColor.GOLD + " (" + ChatColor.GREEN
|
||||||
|
+ ItemUtil.getName(new ItemStack(block.getType())) + ChatColor.GOLD + ")");
|
||||||
evt.setCancelled(true);
|
evt.setCancelled(true);
|
||||||
} else if (plugin.getEventFactory().getSelectedExplosionLocations().containsKey(evt.getPlayer().getUniqueId())) {
|
} else if (plugin.getEventFactory().getSelectedExplosionLocations().containsKey(evt.getPlayer()
|
||||||
|
.getUniqueId())) {
|
||||||
Block block = evt.getClickedBlock();
|
Block block = evt.getClickedBlock();
|
||||||
Location loc = block.getLocation();
|
Location loc = block.getLocation();
|
||||||
Map<UUID, Block> temp = plugin.getEventFactory().getSelectedExplosionLocations();
|
Map<UUID, Block> temp = plugin.getEventFactory().getSelectedExplosionLocations();
|
||||||
temp.put(evt.getPlayer().getUniqueId(), block);
|
temp.put(evt.getPlayer().getUniqueId(), block);
|
||||||
plugin.getEventFactory().setSelectedExplosionLocations(temp);
|
plugin.getEventFactory().setSelectedExplosionLocations(temp);
|
||||||
evt.getPlayer().sendMessage(ChatColor.GOLD + Lang.get(player, "questSelectedLocation") + " " + ChatColor.AQUA + loc.getWorld().getName() + ": " + loc.getX() + ", " + loc.getY() + ", " + loc.getZ() + ChatColor.GOLD + " (" + ChatColor.GREEN + ItemUtil.getName(new ItemStack(block.getType())) + ChatColor.GOLD + ")");
|
evt.getPlayer().sendMessage(ChatColor.GOLD + Lang.get(player, "questSelectedLocation") + " "
|
||||||
|
+ ChatColor.AQUA + loc.getWorld().getName() + ": " + loc.getX() + ", " + loc.getY()
|
||||||
|
+ ", " + loc.getZ() + ChatColor.GOLD + " (" + ChatColor.GREEN
|
||||||
|
+ ItemUtil.getName(new ItemStack(block.getType())) + ChatColor.GOLD + ")");
|
||||||
evt.setCancelled(true);
|
evt.setCancelled(true);
|
||||||
} else if (plugin.getEventFactory().getSelectedEffectLocations().containsKey(evt.getPlayer().getUniqueId())) {
|
} else if (plugin.getEventFactory().getSelectedEffectLocations().containsKey(evt.getPlayer()
|
||||||
|
.getUniqueId())) {
|
||||||
Block block = evt.getClickedBlock();
|
Block block = evt.getClickedBlock();
|
||||||
Location loc = block.getLocation();
|
Location loc = block.getLocation();
|
||||||
Map<UUID, Block> temp = plugin.getEventFactory().getSelectedEffectLocations();
|
Map<UUID, Block> temp = plugin.getEventFactory().getSelectedEffectLocations();
|
||||||
temp.put(evt.getPlayer().getUniqueId(), block);
|
temp.put(evt.getPlayer().getUniqueId(), block);
|
||||||
plugin.getEventFactory().setSelectedEffectLocations(temp);
|
plugin.getEventFactory().setSelectedEffectLocations(temp);
|
||||||
evt.getPlayer().sendMessage(ChatColor.GOLD + Lang.get(player, "questSelectedLocation") + " " + ChatColor.AQUA + loc.getWorld().getName() + ": " + loc.getX() + ", " + loc.getY() + ", " + loc.getZ() + ChatColor.GOLD + " (" + ChatColor.GREEN + ItemUtil.getName(new ItemStack(block.getType())) + ChatColor.GOLD + ")");
|
evt.getPlayer().sendMessage(ChatColor.GOLD + Lang.get(player, "questSelectedLocation") + " "
|
||||||
|
+ ChatColor.AQUA + loc.getWorld().getName() + ": " + loc.getX() + ", " + loc.getY()
|
||||||
|
+ ", " + loc.getZ() + ChatColor.GOLD + " (" + ChatColor.GREEN
|
||||||
|
+ ItemUtil.getName(new ItemStack(block.getType())) + ChatColor.GOLD + ")");
|
||||||
evt.setCancelled(true);
|
evt.setCancelled(true);
|
||||||
} else if (plugin.getEventFactory().getSelectedMobLocations().containsKey(evt.getPlayer().getUniqueId())) {
|
} else if (plugin.getEventFactory().getSelectedMobLocations().containsKey(evt.getPlayer()
|
||||||
|
.getUniqueId())) {
|
||||||
Block block = evt.getClickedBlock();
|
Block block = evt.getClickedBlock();
|
||||||
Location loc = block.getLocation();
|
Location loc = block.getLocation();
|
||||||
Map<UUID, Block> temp = plugin.getEventFactory().getSelectedMobLocations();
|
Map<UUID, Block> temp = plugin.getEventFactory().getSelectedMobLocations();
|
||||||
temp.put(evt.getPlayer().getUniqueId(), block);
|
temp.put(evt.getPlayer().getUniqueId(), block);
|
||||||
plugin.getEventFactory().setSelectedMobLocations(temp);
|
plugin.getEventFactory().setSelectedMobLocations(temp);
|
||||||
evt.getPlayer().sendMessage(ChatColor.GOLD + Lang.get(player, "questSelectedLocation") + " " + ChatColor.AQUA + loc.getWorld().getName() + ": " + loc.getX() + ", " + loc.getY() + ", " + loc.getZ() + ChatColor.GOLD + " (" + ChatColor.GREEN + ItemUtil.getName(new ItemStack(block.getType())) + ChatColor.GOLD + ")");
|
evt.getPlayer().sendMessage(ChatColor.GOLD + Lang.get(player, "questSelectedLocation") + " "
|
||||||
|
+ ChatColor.AQUA + loc.getWorld().getName() + ": " + loc.getX() + ", " + loc.getY()
|
||||||
|
+ ", " + loc.getZ() + ChatColor.GOLD + " (" + ChatColor.GREEN
|
||||||
|
+ ItemUtil.getName(new ItemStack(block.getType())) + ChatColor.GOLD + ")");
|
||||||
evt.setCancelled(true);
|
evt.setCancelled(true);
|
||||||
} else if (plugin.getEventFactory().getSelectedLightningLocations().containsKey(evt.getPlayer().getUniqueId())) {
|
} else if (plugin.getEventFactory().getSelectedLightningLocations().containsKey(evt.getPlayer()
|
||||||
|
.getUniqueId())) {
|
||||||
Block block = evt.getClickedBlock();
|
Block block = evt.getClickedBlock();
|
||||||
Location loc = block.getLocation();
|
Location loc = block.getLocation();
|
||||||
Map<UUID, Block> temp = plugin.getEventFactory().getSelectedLightningLocations();
|
Map<UUID, Block> temp = plugin.getEventFactory().getSelectedLightningLocations();
|
||||||
temp.put(evt.getPlayer().getUniqueId(), block);
|
temp.put(evt.getPlayer().getUniqueId(), block);
|
||||||
plugin.getEventFactory().setSelectedLightningLocations(temp);
|
plugin.getEventFactory().setSelectedLightningLocations(temp);
|
||||||
evt.getPlayer().sendMessage(ChatColor.GOLD + Lang.get(player, "questSelectedLocation") + " " + ChatColor.AQUA + loc.getWorld().getName() + ": " + loc.getX() + ", " + loc.getY() + ", " + loc.getZ() + ChatColor.GOLD + " (" + ChatColor.GREEN + ItemUtil.getName(new ItemStack(block.getType())) + ChatColor.GOLD + ")");
|
evt.getPlayer().sendMessage(ChatColor.GOLD + Lang.get(player, "questSelectedLocation") + " "
|
||||||
|
+ ChatColor.AQUA + loc.getWorld().getName() + ": " + loc.getX() + ", " + loc.getY()
|
||||||
|
+ ", " + loc.getZ() + ChatColor.GOLD + " (" + ChatColor.GREEN
|
||||||
|
+ ItemUtil.getName(new ItemStack(block.getType())) + ChatColor.GOLD + ")");
|
||||||
evt.setCancelled(true);
|
evt.setCancelled(true);
|
||||||
} else if (plugin.getEventFactory().getSelectedTeleportLocations().containsKey(evt.getPlayer().getUniqueId())) {
|
} else if (plugin.getEventFactory().getSelectedTeleportLocations().containsKey(evt.getPlayer()
|
||||||
|
.getUniqueId())) {
|
||||||
Block block = evt.getClickedBlock();
|
Block block = evt.getClickedBlock();
|
||||||
Location loc = block.getLocation();
|
Location loc = block.getLocation();
|
||||||
Map<UUID, Block> temp = plugin.getEventFactory().getSelectedTeleportLocations();
|
Map<UUID, Block> temp = plugin.getEventFactory().getSelectedTeleportLocations();
|
||||||
temp.put(evt.getPlayer().getUniqueId(), block);
|
temp.put(evt.getPlayer().getUniqueId(), block);
|
||||||
plugin.getEventFactory().setSelectedTeleportLocations(temp);
|
plugin.getEventFactory().setSelectedTeleportLocations(temp);
|
||||||
evt.getPlayer().sendMessage(ChatColor.GOLD + Lang.get(player, "questSelectedLocation") + " " + ChatColor.AQUA + loc.getWorld().getName() + ": " + loc.getX() + ", " + loc.getY() + ", " + loc.getZ() + ChatColor.GOLD + " (" + ChatColor.GREEN + ItemUtil.getName(new ItemStack(block.getType())) + ChatColor.GOLD + ")");
|
evt.getPlayer().sendMessage(ChatColor.GOLD + Lang.get(player, "questSelectedLocation") + " "
|
||||||
|
+ ChatColor.AQUA + loc.getWorld().getName() + ": " + loc.getX() + ", " + loc.getY()
|
||||||
|
+ ", " + loc.getZ() + ChatColor.GOLD + " (" + ChatColor.GREEN
|
||||||
|
+ ItemUtil.getName(new ItemStack(block.getType())) + ChatColor.GOLD + ")");
|
||||||
evt.setCancelled(true);
|
evt.setCancelled(true);
|
||||||
} else if (plugin.getQuestFactory().getSelectedKillLocations().containsKey(evt.getPlayer().getUniqueId())) {
|
} else if (plugin.getQuestFactory().getSelectedKillLocations().containsKey(evt.getPlayer()
|
||||||
|
.getUniqueId())) {
|
||||||
Block block = evt.getClickedBlock();
|
Block block = evt.getClickedBlock();
|
||||||
Location loc = block.getLocation();
|
Location loc = block.getLocation();
|
||||||
Map<UUID, Block> temp = plugin.getQuestFactory().getSelectedKillLocations();
|
Map<UUID, Block> temp = plugin.getQuestFactory().getSelectedKillLocations();
|
||||||
temp.put(evt.getPlayer().getUniqueId(), block);
|
temp.put(evt.getPlayer().getUniqueId(), block);
|
||||||
plugin.getQuestFactory().setSelectedKillLocations(temp);
|
plugin.getQuestFactory().setSelectedKillLocations(temp);
|
||||||
evt.getPlayer().sendMessage(ChatColor.GOLD + Lang.get(player, "questSelectedLocation") + " " + ChatColor.AQUA + loc.getWorld().getName() + ": " + loc.getX() + ", " + loc.getY() + ", " + loc.getZ() + ChatColor.GOLD + " (" + ChatColor.GREEN + ItemUtil.getName(new ItemStack(block.getType())) + ChatColor.GOLD + ")");
|
evt.getPlayer().sendMessage(ChatColor.GOLD + Lang.get(player, "questSelectedLocation") + " "
|
||||||
|
+ ChatColor.AQUA + loc.getWorld().getName() + ": " + loc.getX() + ", " + loc.getY()
|
||||||
|
+ ", " + loc.getZ() + ChatColor.GOLD + " (" + ChatColor.GREEN
|
||||||
|
+ ItemUtil.getName(new ItemStack(block.getType())) + ChatColor.GOLD + ")");
|
||||||
evt.setCancelled(true);
|
evt.setCancelled(true);
|
||||||
} else if (plugin.getQuestFactory().getSelectedReachLocations().containsKey(evt.getPlayer().getUniqueId())) {
|
} else if (plugin.getQuestFactory().getSelectedReachLocations().containsKey(evt.getPlayer()
|
||||||
|
.getUniqueId())) {
|
||||||
Block block = evt.getClickedBlock();
|
Block block = evt.getClickedBlock();
|
||||||
Location loc = block.getLocation();
|
Location loc = block.getLocation();
|
||||||
Map<UUID, Block> temp = plugin.getQuestFactory().getSelectedReachLocations();
|
Map<UUID, Block> temp = plugin.getQuestFactory().getSelectedReachLocations();
|
||||||
temp.put(evt.getPlayer().getUniqueId(), block);
|
temp.put(evt.getPlayer().getUniqueId(), block);
|
||||||
plugin.getQuestFactory().setSelectedReachLocations(temp);
|
plugin.getQuestFactory().setSelectedReachLocations(temp);
|
||||||
evt.getPlayer().sendMessage(ChatColor.GOLD + Lang.get(player, "questSelectedLocation") + " " + ChatColor.AQUA + loc.getWorld().getName() + ": " + loc.getX() + ", " + loc.getY() + ", " + loc.getZ() + ChatColor.GOLD + " (" + ChatColor.GREEN + ItemUtil.getName(new ItemStack(block.getType())) + ChatColor.GOLD + ")");
|
evt.getPlayer().sendMessage(ChatColor.GOLD + Lang.get(player, "questSelectedLocation") + " "
|
||||||
|
+ ChatColor.AQUA + loc.getWorld().getName() + ": " + loc.getX() + ", " + loc.getY() + ", "
|
||||||
|
+ loc.getZ() + ChatColor.GOLD + " (" + ChatColor.GREEN
|
||||||
|
+ ItemUtil.getName(new ItemStack(block.getType())) + ChatColor.GOLD + ")");
|
||||||
evt.setCancelled(true);
|
evt.setCancelled(true);
|
||||||
} else if (player.isConversing() == false) {
|
} else if (player.isConversing() == false) {
|
||||||
for (final Quest q : plugin.getQuests()) {
|
for (final Quest q : plugin.getQuests()) {
|
||||||
if (q.getBlockStart() != null) {
|
if (q.getBlockStart() != null) {
|
||||||
if (q.getBlockStart().equals(evt.getClickedBlock().getLocation())) {
|
if (q.getBlockStart().equals(evt.getClickedBlock().getLocation())) {
|
||||||
if (quester.getCurrentQuests().size() >= plugin.getSettings().getMaxQuests() && plugin.getSettings().getMaxQuests() > 0) {
|
if (quester.getCurrentQuests().size() >= plugin.getSettings().getMaxQuests()
|
||||||
|
&& plugin.getSettings().getMaxQuests() > 0) {
|
||||||
String msg = Lang.get(player, "questMaxAllowed");
|
String msg = Lang.get(player, "questMaxAllowed");
|
||||||
msg = msg.replace("<number>", String.valueOf(plugin.getSettings().getMaxQuests()));
|
msg = msg.replace("<number>", String.valueOf(plugin.getSettings().getMaxQuests()));
|
||||||
player.sendMessage(ChatColor.YELLOW + msg);
|
player.sendMessage(ChatColor.YELLOW + msg);
|
||||||
} else {
|
} else {
|
||||||
if (quester.getCompletedQuests().contains(q.getName())) {
|
if (quester.getCompletedQuests().contains(q.getName())) {
|
||||||
if (q.getPlanner().getCooldown() > -1 && (quester.getCooldownDifference(q)) > 0) {
|
if (q.getPlanner().getCooldown() > -1
|
||||||
|
&& (quester.getCooldownDifference(q)) > 0) {
|
||||||
String early = Lang.get(player, "questTooEarly");
|
String early = Lang.get(player, "questTooEarly");
|
||||||
early = early.replace("<quest>", ChatColor.AQUA + q.getName() + ChatColor.YELLOW);
|
early = early.replace("<quest>", ChatColor.AQUA + q.getName()
|
||||||
early = early.replace("<time>", ChatColor.DARK_PURPLE + Quests.getTime(quester.getCooldownDifference(q)) + ChatColor.YELLOW);
|
+ ChatColor.YELLOW);
|
||||||
|
early = early.replace("<time>", ChatColor.DARK_PURPLE
|
||||||
|
+ Quests.getTime(quester.getCooldownDifference(q))
|
||||||
|
+ ChatColor.YELLOW);
|
||||||
player.sendMessage(ChatColor.YELLOW + early);
|
player.sendMessage(ChatColor.YELLOW + early);
|
||||||
return;
|
return;
|
||||||
} else if (quester.getCompletedQuests().contains(q.getName()) && q.getPlanner().getCooldown() < 0) {
|
} else if (quester.getCompletedQuests().contains(q.getName())
|
||||||
|
&& q.getPlanner().getCooldown() < 0) {
|
||||||
String completed = Lang.get(player, "questAlreadyCompleted");
|
String completed = Lang.get(player, "questAlreadyCompleted");
|
||||||
completed = completed.replace("<quest>", ChatColor.AQUA + q.getName() + ChatColor.YELLOW);
|
completed = completed.replace("<quest>", ChatColor.AQUA
|
||||||
|
+ q.getName() + ChatColor.YELLOW);
|
||||||
player.sendMessage(ChatColor.YELLOW + completed);
|
player.sendMessage(ChatColor.YELLOW + completed);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
quester.setQuestToTake(q.getName());
|
quester.setQuestToTake(q.getName());
|
||||||
String s = ChatColor.GOLD + "- " + ChatColor.DARK_PURPLE + quester.getQuestToTake() + ChatColor.GOLD + " -\n" + "\n" + ChatColor.RESET + plugin.getQuest(quester.getQuestToTake()).getDescription() + "\n";
|
String s = ChatColor.GOLD + "- " + ChatColor.DARK_PURPLE
|
||||||
|
+ quester.getQuestToTake() + ChatColor.GOLD + " -\n" + "\n"
|
||||||
|
+ ChatColor.RESET + plugin.getQuest(quester.getQuestToTake())
|
||||||
|
.getDescription() + "\n";
|
||||||
for (String msg : s.split("<br>")) {
|
for (String msg : s.split("<br>")) {
|
||||||
player.sendMessage(msg);
|
player.sendMessage(msg);
|
||||||
}
|
}
|
||||||
@ -342,14 +398,16 @@ public class PlayerListener implements Listener {
|
|||||||
if (quester.getCurrentQuests().containsKey(quest)) {
|
if (quester.getCurrentQuests().containsKey(quest)) {
|
||||||
final Stage currentStage = quester.getCurrentStage(quest);
|
final Stage currentStage = quester.getCurrentStage(quest);
|
||||||
if (currentStage == null) {
|
if (currentStage == null) {
|
||||||
plugin.getLogger().severe("currentStage was null for " + quester.getUUID().toString() + " on chat for quest " + quest.getName());
|
plugin.getLogger().severe("currentStage was null for " + quester.getUUID().toString()
|
||||||
|
+ " on chat for quest " + quest.getName());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (currentStage.getChatEvents().isEmpty() == false) {
|
if (currentStage.getChatEvents().isEmpty() == false) {
|
||||||
String chat = evt.getMessage();
|
String chat = evt.getMessage();
|
||||||
for (final String s : currentStage.getChatEvents().keySet()) {
|
for (final String s : currentStage.getChatEvents().keySet()) {
|
||||||
if (s.equalsIgnoreCase(chat)) {
|
if (s.equalsIgnoreCase(chat)) {
|
||||||
if (quester.getQuestData(quest).eventFired.get(s) == null || quester.getQuestData(quest).eventFired.get(s) == false) {
|
if (quester.getQuestData(quest).eventFired.get(s) == null
|
||||||
|
|| quester.getQuestData(quest).eventFired.get(s) == false) {
|
||||||
new BukkitRunnable() {
|
new BukkitRunnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
@ -383,23 +441,27 @@ public class PlayerListener implements Listener {
|
|||||||
for (Quest quest : quester.getCurrentQuests().keySet()) {
|
for (Quest quest : quester.getCurrentQuests().keySet()) {
|
||||||
if (!quest.getOptions().getAllowCommands()) {
|
if (!quest.getOptions().getAllowCommands()) {
|
||||||
if (!evt.getMessage().startsWith("/quest")) {
|
if (!evt.getMessage().startsWith("/quest")) {
|
||||||
evt.getPlayer().sendMessage(ChatColor.RED + Lang.get(evt.getPlayer(), "optCommandsDenied").replace("<quest>", ChatColor.DARK_PURPLE + quest.getName() + ChatColor.RED));
|
evt.getPlayer().sendMessage(ChatColor.RED + Lang.get(evt.getPlayer(), "optCommandsDenied")
|
||||||
|
.replace("<quest>", ChatColor.DARK_PURPLE + quest.getName() + ChatColor.RED));
|
||||||
evt.setCancelled(true);
|
evt.setCancelled(true);
|
||||||
plugin.getLogger().info("Player " + evt.getPlayer().getName() + " tried to use command " + evt.getMessage()
|
plugin.getLogger().info("Player " + evt.getPlayer().getName() + " tried to use command "
|
||||||
+ " but was denied because they are currently on quest " + quest.getName());
|
+ evt.getMessage() + " but was denied because they are currently on quest "
|
||||||
|
+ quest.getName());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Stage currentStage = quester.getCurrentStage(quest);
|
Stage currentStage = quester.getCurrentStage(quest);
|
||||||
if (currentStage == null) {
|
if (currentStage == null) {
|
||||||
plugin.getLogger().severe("currentStage was null for " + quester.getUUID().toString() + " on command for quest " + quest.getName());
|
plugin.getLogger().severe("currentStage was null for " + quester.getUUID().toString()
|
||||||
|
+ " on command for quest " + quest.getName());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (currentStage.getCommandEvents().isEmpty() == false) {
|
if (currentStage.getCommandEvents().isEmpty() == false) {
|
||||||
String command = evt.getMessage();
|
String command = evt.getMessage();
|
||||||
for (String s : currentStage.getCommandEvents().keySet()) {
|
for (String s : currentStage.getCommandEvents().keySet()) {
|
||||||
if (command.equalsIgnoreCase("/" + s)) {
|
if (command.equalsIgnoreCase("/" + s)) {
|
||||||
if (quester.getQuestData(quest).eventFired.get(s) == null || quester.getQuestData(quest).eventFired.get(s) == false) {
|
if (quester.getQuestData(quest).eventFired.get(s) == null
|
||||||
|
|| quester.getQuestData(quest).eventFired.get(s) == false) {
|
||||||
currentStage.getCommandEvents().get(s).fire(quester, quest);
|
currentStage.getCommandEvents().get(s).fire(quester, quest);
|
||||||
quester.getQuestData(quest).eventFired.put(s, true);
|
quester.getQuestData(quest).eventFired.put(s, true);
|
||||||
}
|
}
|
||||||
@ -415,7 +477,8 @@ public class PlayerListener implements Listener {
|
|||||||
@EventHandler
|
@EventHandler
|
||||||
public void onBlockDamage(BlockDamageEvent evt) {
|
public void onBlockDamage(BlockDamageEvent evt) {
|
||||||
if (plugin.checkQuester(evt.getPlayer().getUniqueId()) == false) {
|
if (plugin.checkQuester(evt.getPlayer().getUniqueId()) == false) {
|
||||||
final ItemStack blockItemStack = new ItemStack(evt.getBlock().getType(), 1, evt.getBlock().getState().getData().toItemStack().getDurability());
|
final ItemStack blockItemStack = new ItemStack(evt.getBlock().getType(), 1, evt.getBlock().getState()
|
||||||
|
.getData().toItemStack().getDurability());
|
||||||
Quester quester = plugin.getQuester(evt.getPlayer().getUniqueId());
|
Quester quester = plugin.getQuester(evt.getPlayer().getUniqueId());
|
||||||
for (Quest quest : plugin.getQuests()) {
|
for (Quest quest : plugin.getQuests()) {
|
||||||
if (quester.getCurrentQuests().containsKey(quest) && quester.containsObjective(quest, "damageBlock")) {
|
if (quester.getCurrentQuests().containsKey(quest) && quester.containsObjective(quest, "damageBlock")) {
|
||||||
@ -434,11 +497,13 @@ public class PlayerListener implements Listener {
|
|||||||
@EventHandler(priority = EventPriority.HIGHEST)
|
@EventHandler(priority = EventPriority.HIGHEST)
|
||||||
public void onBlockPlace(BlockPlaceEvent evt) {
|
public void onBlockPlace(BlockPlaceEvent evt) {
|
||||||
if (plugin.checkQuester(evt.getPlayer().getUniqueId()) == false) {
|
if (plugin.checkQuester(evt.getPlayer().getUniqueId()) == false) {
|
||||||
final ItemStack blockItemStack = new ItemStack(evt.getBlock().getType(), 1, evt.getBlock().getState().getData().toItemStack().getDurability());
|
final ItemStack blockItemStack = new ItemStack(evt.getBlock().getType(), 1, evt.getBlock().getState()
|
||||||
|
.getData().toItemStack().getDurability());
|
||||||
Quester quester = plugin.getQuester(evt.getPlayer().getUniqueId());
|
Quester quester = plugin.getQuester(evt.getPlayer().getUniqueId());
|
||||||
for (Quest quest : plugin.getQuests()) {
|
for (Quest quest : plugin.getQuests()) {
|
||||||
if (evt.isCancelled() == false) {
|
if (evt.isCancelled() == false) {
|
||||||
if (quester.getCurrentQuests().containsKey(quest) && quester.containsObjective(quest, "placeBlock")) {
|
if (quester.getCurrentQuests().containsKey(quest)
|
||||||
|
&& quester.containsObjective(quest, "placeBlock")) {
|
||||||
quester.placeBlock(quest, blockItemStack);
|
quester.placeBlock(quest, blockItemStack);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -455,11 +520,13 @@ public class PlayerListener implements Listener {
|
|||||||
@EventHandler(priority = EventPriority.HIGHEST)
|
@EventHandler(priority = EventPriority.HIGHEST)
|
||||||
public void onBlockBreak(BlockBreakEvent evt) {
|
public void onBlockBreak(BlockBreakEvent evt) {
|
||||||
if (plugin.checkQuester(evt.getPlayer().getUniqueId()) == false) {
|
if (plugin.checkQuester(evt.getPlayer().getUniqueId()) == false) {
|
||||||
final ItemStack blockItemStack = new ItemStack(evt.getBlock().getType(), 1, evt.getBlock().getState().getData().toItemStack().getDurability());
|
final ItemStack blockItemStack = new ItemStack(evt.getBlock().getType(), 1, evt.getBlock().getState()
|
||||||
|
.getData().toItemStack().getDurability());
|
||||||
Quester quester = plugin.getQuester(evt.getPlayer().getUniqueId());
|
Quester quester = plugin.getQuester(evt.getPlayer().getUniqueId());
|
||||||
for (Quest quest : plugin.getQuests()) {
|
for (Quest quest : plugin.getQuests()) {
|
||||||
if (evt.isCancelled() == false) {
|
if (evt.isCancelled() == false) {
|
||||||
if (quester.getCurrentQuests().containsKey(quest) && quester.containsObjective(quest, "breakBlock")) {
|
if (quester.getCurrentQuests().containsKey(quest)
|
||||||
|
&& quester.containsObjective(quest, "breakBlock")) {
|
||||||
if (!evt.getPlayer().getItemInHand().containsEnchantment(Enchantment.SILK_TOUCH)) {
|
if (!evt.getPlayer().getItemInHand().containsEnchantment(Enchantment.SILK_TOUCH)) {
|
||||||
quester.breakBlock(quest, blockItemStack);
|
quester.breakBlock(quest, blockItemStack);
|
||||||
}
|
}
|
||||||
@ -470,7 +537,8 @@ public class PlayerListener implements Listener {
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
});
|
});
|
||||||
if (quester.getCurrentQuests().containsKey(quest) && quester.containsObjective(quest, "placeBlock")) {
|
if (quester.getCurrentQuests().containsKey(quest)
|
||||||
|
&& quester.containsObjective(quest, "placeBlock")) {
|
||||||
for (ItemStack is : quester.getQuestData(quest).blocksPlaced) {
|
for (ItemStack is : quester.getQuestData(quest).blocksPlaced) {
|
||||||
if (evt.getBlock().getType().equals(is.getType()) && is.getAmount() > 0) {
|
if (evt.getBlock().getType().equals(is.getType()) && is.getAmount() > 0) {
|
||||||
int index = quester.getQuestData(quest).blocksPlaced.indexOf(is);
|
int index = quester.getQuestData(quest).blocksPlaced.indexOf(is);
|
||||||
@ -512,7 +580,8 @@ public class PlayerListener implements Listener {
|
|||||||
Sheep sheep = (Sheep) evt.getEntity();
|
Sheep sheep = (Sheep) evt.getEntity();
|
||||||
Quester quester = plugin.getQuester(evt.getPlayer().getUniqueId());
|
Quester quester = plugin.getQuester(evt.getPlayer().getUniqueId());
|
||||||
for (Quest quest : plugin.getQuests()) {
|
for (Quest quest : plugin.getQuests()) {
|
||||||
if (quester.getCurrentQuests().containsKey(quest) && quester.containsObjective(quest, "shearSheep")) {
|
if (quester.getCurrentQuests().containsKey(quest)
|
||||||
|
&& quester.containsObjective(quest, "shearSheep")) {
|
||||||
quester.shearSheep(quest, sheep.getColor());
|
quester.shearSheep(quest, sheep.getColor());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -554,7 +623,8 @@ public class PlayerListener implements Listener {
|
|||||||
final ItemStack craftedItem = getCraftedItem(evt);
|
final ItemStack craftedItem = getCraftedItem(evt);
|
||||||
Quester quester = plugin.getQuester(evt.getWhoClicked().getUniqueId());
|
Quester quester = plugin.getQuester(evt.getWhoClicked().getUniqueId());
|
||||||
for (Quest quest : plugin.getQuests()) {
|
for (Quest quest : plugin.getQuests()) {
|
||||||
if (quester.getCurrentQuests().containsKey(quest) && quester.containsObjective(quest, "craftItem")) {
|
if (quester.getCurrentQuests().containsKey(quest)
|
||||||
|
&& quester.containsObjective(quest, "craftItem")) {
|
||||||
quester.craftItem(quest, craftedItem);
|
quester.craftItem(quest, craftedItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -593,11 +663,14 @@ public class PlayerListener implements Listener {
|
|||||||
@EventHandler
|
@EventHandler
|
||||||
public void onInventoryClick(InventoryClickEvent evt) {
|
public void onInventoryClick(InventoryClickEvent evt) {
|
||||||
if (evt.getWhoClicked() instanceof Player) {
|
if (evt.getWhoClicked() instanceof Player) {
|
||||||
if (evt.getInventory().getType() == InventoryType.FURNACE) {
|
if (evt.getInventory().getType() == InventoryType.FURNACE
|
||||||
|
|| evt.getInventory().getType().name().equals("BLAST_FURNACE")
|
||||||
|
|| evt.getInventory().getType().name().equals("SMOKER")) {
|
||||||
if (evt.getSlotType() == SlotType.RESULT) {
|
if (evt.getSlotType() == SlotType.RESULT) {
|
||||||
Quester quester = plugin.getQuester(evt.getWhoClicked().getUniqueId());
|
Quester quester = plugin.getQuester(evt.getWhoClicked().getUniqueId());
|
||||||
for (Quest quest : plugin.getQuests()) {
|
for (Quest quest : plugin.getQuests()) {
|
||||||
if (quester.getCurrentQuests().containsKey(quest) && quester.containsObjective(quest, "smeltItem")) {
|
if (quester.getCurrentQuests().containsKey(quest)
|
||||||
|
&& quester.containsObjective(quest, "smeltItem")) {
|
||||||
quester.smeltItem(quest, evt.getCurrentItem());
|
quester.smeltItem(quest, evt.getCurrentItem());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -611,7 +684,8 @@ public class PlayerListener implements Listener {
|
|||||||
if (evt.getSlotType() == SlotType.CRAFTING) {
|
if (evt.getSlotType() == SlotType.CRAFTING) {
|
||||||
Quester quester = plugin.getQuester(evt.getWhoClicked().getUniqueId());
|
Quester quester = plugin.getQuester(evt.getWhoClicked().getUniqueId());
|
||||||
for (Quest quest : plugin.getQuests()) {
|
for (Quest quest : plugin.getQuests()) {
|
||||||
if (quester.getCurrentQuests().containsKey(quest) && quester.containsObjective(quest, "brewItem")) {
|
if (quester.getCurrentQuests().containsKey(quest)
|
||||||
|
&& quester.containsObjective(quest, "brewItem")) {
|
||||||
quester.brewItem(quest, evt.getCurrentItem());
|
quester.brewItem(quest, evt.getCurrentItem());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -779,7 +853,8 @@ public class PlayerListener implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if damager is blacklisted. Ensures damager and target are Player and not NPC. Kills target Player if objective exists
|
* Checks if damager is blacklisted. Ensures damager and target are Player and not NPC.
|
||||||
|
* Kills target Player if objective exists
|
||||||
*
|
*
|
||||||
* @param damager the attacking entity
|
* @param damager the attacking entity
|
||||||
* @param target the entity being attacked
|
* @param target the entity being attacked
|
||||||
@ -818,7 +893,8 @@ public class PlayerListener implements Listener {
|
|||||||
if (plugin.canUseQuests(player.getUniqueId())) {
|
if (plugin.canUseQuests(player.getUniqueId())) {
|
||||||
Quester quester = plugin.getQuester(player.getUniqueId());
|
Quester quester = plugin.getQuester(player.getUniqueId());
|
||||||
for (Quest quest : plugin.getQuests()) {
|
for (Quest quest : plugin.getQuests()) {
|
||||||
if (quester.getCurrentQuests().containsKey(quest) && quester.containsObjective(quest, "catchFish") && evt.getState().equals(State.CAUGHT_FISH)) {
|
if (quester.getCurrentQuests().containsKey(quest) && quester.containsObjective(quest, "catchFish")
|
||||||
|
&& evt.getState().equals(State.CAUGHT_FISH)) {
|
||||||
quester.catchFish(quest);
|
quester.catchFish(quest);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -873,7 +949,8 @@ public class PlayerListener implements Listener {
|
|||||||
for (String s : quester.getCompletedQuests()) {
|
for (String s : quester.getCompletedQuests()) {
|
||||||
Quest q = plugin.getQuest(s);
|
Quest q = plugin.getQuest(s);
|
||||||
if (q != null) {
|
if (q != null) {
|
||||||
if (quester.getCompletedTimes().containsKey(q.getName()) == false && q.getPlanner().getCooldown() > -1) {
|
if (quester.getCompletedTimes().containsKey(q.getName()) == false
|
||||||
|
&& q.getPlanner().getCooldown() > -1) {
|
||||||
quester.getCompletedTimes().put(q.getName(), System.currentTimeMillis());
|
quester.getCompletedTimes().put(q.getName(), System.currentTimeMillis());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -898,7 +975,8 @@ public class PlayerListener implements Listener {
|
|||||||
for (Quest quest : quester.getCurrentQuests().keySet()) {
|
for (Quest quest : quester.getCurrentQuests().keySet()) {
|
||||||
Stage currentStage = quester.getCurrentStage(quest);
|
Stage currentStage = quester.getCurrentStage(quest);
|
||||||
if (currentStage == null) {
|
if (currentStage == null) {
|
||||||
plugin.getLogger().severe("currentStage was null for " + quester.getUUID().toString() + " on quit for quest " + quest.getName());
|
plugin.getLogger().severe("currentStage was null for " + quester.getUUID().toString()
|
||||||
|
+ " on quit for quest " + quest.getName());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (currentStage.getDelay() > -1) {
|
if (currentStage.getDelay() > -1) {
|
||||||
@ -945,16 +1023,28 @@ public class PlayerListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (plugin.getQuester(evt.getPlayer().getUniqueId()) != null) {
|
playerMove(evt.getPlayer().getUniqueId(), evt.getTo());
|
||||||
if (plugin.canUseQuests(evt.getPlayer().getUniqueId())) {
|
}
|
||||||
Quester quester = plugin.getQuester(evt.getPlayer().getUniqueId());
|
|
||||||
|
/**
|
||||||
|
* Checks if uuid is blacklisted. Updates reach-location objectives
|
||||||
|
*
|
||||||
|
* @param uuid The UUID of the Player
|
||||||
|
* @param location The current location of the Player
|
||||||
|
* @since 3.8.2
|
||||||
|
*/
|
||||||
|
public void playerMove(UUID uuid, Location location) {
|
||||||
|
if (plugin.getQuester(uuid) != null) {
|
||||||
|
if (plugin.canUseQuests(uuid)) {
|
||||||
|
Quester quester = plugin.getQuester(uuid);
|
||||||
for (Quest quest : plugin.getQuests()) {
|
for (Quest quest : plugin.getQuests()) {
|
||||||
if (quester.getCurrentQuests().containsKey(quest) && quester.containsObjective(quest, "reachLocation")) {
|
if (quester.getCurrentQuests().containsKey(quest)
|
||||||
quester.reachLocation(quest, evt.getTo());
|
&& quester.containsObjective(quest, "reachLocation")) {
|
||||||
|
quester.reachLocation(quest, location);
|
||||||
}
|
}
|
||||||
|
|
||||||
quester.dispatchMultiplayerEverything(quest, "reachLocation", (Quester q) -> {
|
quester.dispatchMultiplayerEverything(quest, "reachLocation", (Quester q) -> {
|
||||||
q.reachLocation(quest, evt.getTo());
|
q.reachLocation(quest, location);
|
||||||
return null;
|
return null;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
package me.blackvein.quests.particle;
|
package me.blackvein.quests.particle;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.logging.Level;
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Particle;
|
import org.bukkit.Particle;
|
||||||
@ -28,18 +27,21 @@ public abstract class ParticleProvider {
|
|||||||
String packageName = ParticleProvider.class.getPackage().getName();
|
String packageName = ParticleProvider.class.getPackage().getName();
|
||||||
String internalsName = Bukkit.getServer().getClass().getPackage().getName().split("\\.")[3];
|
String internalsName = Bukkit.getServer().getClass().getPackage().getName().split("\\.")[3];
|
||||||
if (internalsName.startsWith("v1_8_R")) {
|
if (internalsName.startsWith("v1_8_R")) {
|
||||||
loaded = (ParticleProvider) Class.forName(packageName + ".ParticleProvider_" + internalsName).newInstance();
|
loaded = (ParticleProvider) Class.forName(packageName + ".ParticleProvider_" + internalsName)
|
||||||
|
.newInstance();
|
||||||
} else {
|
} else {
|
||||||
loaded = new ParticleProvider_Bukkit();
|
loaded = new ParticleProvider_Bukkit();
|
||||||
}
|
}
|
||||||
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | ClassCastException exception) {
|
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException
|
||||||
Bukkit.getLogger().log(Level.SEVERE, "Quests could not find a valid implementation for this server version.");
|
| ClassCastException exception) {
|
||||||
|
Bukkit.getLogger().severe("[Quests] Could not find a valid implementation for this server version.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract Map<PreBuiltParticle, Object> getParticleMap();
|
abstract Map<PreBuiltParticle, Object> getParticleMap();
|
||||||
|
|
||||||
abstract void spawnParticle(Player player, Location location, Object particle, float offsetX, float offsetY, float offsetZ, float speed, int count, int[] data);
|
abstract void spawnParticle(Player player, Location location, Object particle, float offsetX, float offsetY,
|
||||||
|
float offsetZ, float speed, int count, int[] data);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sends the particle to the player.
|
* Sends the particle to the player.
|
||||||
@ -65,7 +67,8 @@ public abstract class ParticleProvider {
|
|||||||
* packets such as block crack or particle colour on redstone /
|
* packets such as block crack or particle colour on redstone /
|
||||||
* firework particles.
|
* firework particles.
|
||||||
*/
|
*/
|
||||||
public static void sendToPlayer(Player player, Location location, String particleId, float offsetX, float offsetY, float offsetZ, float speed, int count, int[] data) {
|
public static void sendToPlayer(Player player, Location location, String particleId, float offsetX, float offsetY,
|
||||||
|
float offsetZ, float speed, int count, int[] data) {
|
||||||
Object particle;
|
Object particle;
|
||||||
PreBuiltParticle pbp = PreBuiltParticle.fromIdentifier(particleId);
|
PreBuiltParticle pbp = PreBuiltParticle.fromIdentifier(particleId);
|
||||||
if (pbp != null) {
|
if (pbp != null) {
|
||||||
@ -124,8 +127,7 @@ public abstract class ParticleProvider {
|
|||||||
if (particle.getVector() != null) {
|
if (particle.getVector() != null) {
|
||||||
pos.add(particle.getVector());
|
pos.add(particle.getVector());
|
||||||
}
|
}
|
||||||
loaded.spawnParticle(player, pos,
|
loaded.spawnParticle(player, pos, loaded.getParticleMap().get(particle), particle.getOffsetX(),
|
||||||
loaded.getParticleMap().get(particle),
|
particle.getOffsetY(), particle.getOffsetZ(), particle.getSpeed(),particle.getCount(), null);
|
||||||
particle.getOffsetX(), particle.getOffsetY(), particle.getOffsetZ(), particle.getSpeed(), particle.getCount(), null);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,8 @@ class ParticleProvider_Bukkit extends ParticleProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
void spawnParticle(Player player, Location location, Object particle, float offsetX, float offsetY, float offsetZ, float speed, int count, int[] data) {
|
void spawnParticle(Player player, Location location, Object particle, float offsetX, float offsetY, float offsetZ,
|
||||||
|
float speed, int count, int[] data) {
|
||||||
player.spawnParticle((Particle) particle, location, count, offsetX, offsetY, offsetZ, speed, data);
|
player.spawnParticle((Particle) particle, location, count, offsetX, offsetY, offsetZ, speed, data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,8 @@ public enum PreBuiltParticle {
|
|||||||
this.count = count;
|
this.count = count;
|
||||||
}
|
}
|
||||||
|
|
||||||
PreBuiltParticle(String identifier, float offsetX, float offsetY, float offsetZ, float speed, int count, Vector vector) {
|
PreBuiltParticle(String identifier, float offsetX, float offsetY, float offsetZ, float speed, int count,
|
||||||
|
Vector vector) {
|
||||||
this(identifier, offsetX, offsetY, offsetZ, speed, count);
|
this(identifier, offsetX, offsetY, offsetZ, speed, count);
|
||||||
this.vector = vector;
|
this.vector = vector;
|
||||||
}
|
}
|
||||||
|
@ -48,56 +48,72 @@ public class BlocksPrompt extends FixedSetPrompt {
|
|||||||
context.setSessionData(pref, Boolean.TRUE);
|
context.setSessionData(pref, Boolean.TRUE);
|
||||||
String text = ChatColor.AQUA + "- " + Lang.get("stageEditorBlocks") + " -\n";
|
String text = ChatColor.AQUA + "- " + Lang.get("stageEditorBlocks") + " -\n";
|
||||||
if (context.getSessionData(pref + CK.S_BREAK_NAMES) == null) {
|
if (context.getSessionData(pref + CK.S_BREAK_NAMES) == null) {
|
||||||
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "1 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE + "- " + Lang.get("stageEditorBreakBlocks") + ChatColor.GRAY + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "1 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE
|
||||||
|
+ "- " + Lang.get("stageEditorBreakBlocks") + ChatColor.GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "1 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE + "- " + Lang.get("stageEditorBreakBlocks") + "\n";
|
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "1 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE
|
||||||
|
+ "- " + Lang.get("stageEditorBreakBlocks") + "\n";
|
||||||
LinkedList<String> names = (LinkedList<String>) context.getSessionData(pref + CK.S_BREAK_NAMES);
|
LinkedList<String> names = (LinkedList<String>) context.getSessionData(pref + CK.S_BREAK_NAMES);
|
||||||
LinkedList<Integer> amnts = (LinkedList<Integer>) context.getSessionData(pref + CK.S_BREAK_AMOUNTS);
|
LinkedList<Integer> amnts = (LinkedList<Integer>) context.getSessionData(pref + CK.S_BREAK_AMOUNTS);
|
||||||
for (int i = 0; i < names.size(); i++) {
|
for (int i = 0; i < names.size(); i++) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.BLUE + ItemUtil.getPrettyItemName(names.get(i)) + ChatColor.GRAY + " x " + ChatColor.DARK_AQUA + amnts.get(i) + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.BLUE + ItemUtil.getPrettyItemName(names.get(i))
|
||||||
|
+ ChatColor.GRAY + " x " + ChatColor.DARK_AQUA + amnts.get(i) + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (context.getSessionData(pref + CK.S_DAMAGE_NAMES) == null) {
|
if (context.getSessionData(pref + CK.S_DAMAGE_NAMES) == null) {
|
||||||
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "2 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE + "- " + Lang.get("stageEditorDamageBlocks") + ChatColor.GRAY + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "2 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE
|
||||||
|
+ "- " + Lang.get("stageEditorDamageBlocks") + ChatColor.GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "2 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE + "- " + Lang.get("stageEditorDamageBlocks") + "\n";
|
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "2 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE
|
||||||
|
+ "- " + Lang.get("stageEditorDamageBlocks") + "\n";
|
||||||
LinkedList<String> names = (LinkedList<String>) context.getSessionData(pref + CK.S_DAMAGE_NAMES);
|
LinkedList<String> names = (LinkedList<String>) context.getSessionData(pref + CK.S_DAMAGE_NAMES);
|
||||||
LinkedList<Integer> amnts = (LinkedList<Integer>) context.getSessionData(pref + CK.S_DAMAGE_AMOUNTS);
|
LinkedList<Integer> amnts = (LinkedList<Integer>) context.getSessionData(pref + CK.S_DAMAGE_AMOUNTS);
|
||||||
for (int i = 0; i < names.size(); i++) {
|
for (int i = 0; i < names.size(); i++) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.BLUE + ItemUtil.getPrettyItemName(names.get(i)) + ChatColor.GRAY + " x " + ChatColor.DARK_AQUA + amnts.get(i) + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.BLUE + ItemUtil.getPrettyItemName(names.get(i))
|
||||||
|
+ ChatColor.GRAY + " x " + ChatColor.DARK_AQUA + amnts.get(i) + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (context.getSessionData(pref + CK.S_PLACE_NAMES) == null) {
|
if (context.getSessionData(pref + CK.S_PLACE_NAMES) == null) {
|
||||||
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "3 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE + "- " + Lang.get("stageEditorPlaceBlocks") + ChatColor.GRAY + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "3 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE
|
||||||
|
+ "- " + Lang.get("stageEditorPlaceBlocks") + ChatColor.GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "3 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE + "- " + Lang.get("stageEditorPlaceBlocks") + "\n";
|
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "3 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE
|
||||||
|
+ "- " + Lang.get("stageEditorPlaceBlocks") + "\n";
|
||||||
LinkedList<String> names = (LinkedList<String>) context.getSessionData(pref + CK.S_PLACE_NAMES);
|
LinkedList<String> names = (LinkedList<String>) context.getSessionData(pref + CK.S_PLACE_NAMES);
|
||||||
LinkedList<Integer> amnts = (LinkedList<Integer>) context.getSessionData(pref + CK.S_PLACE_AMOUNTS);
|
LinkedList<Integer> amnts = (LinkedList<Integer>) context.getSessionData(pref + CK.S_PLACE_AMOUNTS);
|
||||||
for (int i = 0; i < names.size(); i++) {
|
for (int i = 0; i < names.size(); i++) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.BLUE + ItemUtil.getPrettyItemName(names.get(i)) + ChatColor.GRAY + " x " + ChatColor.DARK_AQUA + amnts.get(i) + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.BLUE + ItemUtil.getPrettyItemName(names.get(i))
|
||||||
|
+ ChatColor.GRAY + " x " + ChatColor.DARK_AQUA + amnts.get(i) + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (context.getSessionData(pref + CK.S_USE_NAMES) == null) {
|
if (context.getSessionData(pref + CK.S_USE_NAMES) == null) {
|
||||||
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "4 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE + "- " + Lang.get("stageEditorUseBlocks") + ChatColor.GRAY + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "4 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE
|
||||||
|
+ "- " + Lang.get("stageEditorUseBlocks") + ChatColor.GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "4 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE + "- " + Lang.get("stageEditorUseBlocks") + "\n";
|
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "4 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE
|
||||||
|
+ "- " + Lang.get("stageEditorUseBlocks") + "\n";
|
||||||
LinkedList<String> names = (LinkedList<String>) context.getSessionData(pref + CK.S_USE_NAMES);
|
LinkedList<String> names = (LinkedList<String>) context.getSessionData(pref + CK.S_USE_NAMES);
|
||||||
LinkedList<Integer> amnts = (LinkedList<Integer>) context.getSessionData(pref + CK.S_USE_AMOUNTS);
|
LinkedList<Integer> amnts = (LinkedList<Integer>) context.getSessionData(pref + CK.S_USE_AMOUNTS);
|
||||||
for (int i = 0; i < names.size(); i++) {
|
for (int i = 0; i < names.size(); i++) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.BLUE + ItemUtil.getPrettyItemName(names.get(i)) + ChatColor.GRAY + " x " + ChatColor.DARK_AQUA + amnts.get(i) + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.BLUE + ItemUtil.getPrettyItemName(names.get(i))
|
||||||
|
+ ChatColor.GRAY + " x " + ChatColor.DARK_AQUA + amnts.get(i) + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (context.getSessionData(pref + CK.S_CUT_NAMES) == null) {
|
if (context.getSessionData(pref + CK.S_CUT_NAMES) == null) {
|
||||||
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "5 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE + "- " + Lang.get("stageEditorCutBlocks") + ChatColor.GRAY + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "5 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE
|
||||||
|
+ "- " + Lang.get("stageEditorCutBlocks") + ChatColor.GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "5 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE + "- " + Lang.get("stageEditorCutBlocks") + "\n";
|
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "5 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE
|
||||||
|
+ "- " + Lang.get("stageEditorCutBlocks") + "\n";
|
||||||
LinkedList<String> names = (LinkedList<String>) context.getSessionData(pref + CK.S_CUT_NAMES);
|
LinkedList<String> names = (LinkedList<String>) context.getSessionData(pref + CK.S_CUT_NAMES);
|
||||||
LinkedList<Integer> amnts = (LinkedList<Integer>) context.getSessionData(pref + CK.S_CUT_AMOUNTS);
|
LinkedList<Integer> amnts = (LinkedList<Integer>) context.getSessionData(pref + CK.S_CUT_AMOUNTS);
|
||||||
for (int i = 0; i < names.size(); i++) {
|
for (int i = 0; i < names.size(); i++) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.BLUE + ItemUtil.getPrettyItemName(names.get(i)) + ChatColor.GRAY + " x " + ChatColor.DARK_AQUA + amnts.get(i) + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.BLUE + ItemUtil.getPrettyItemName(names.get(i))
|
||||||
|
+ ChatColor.GRAY + " x " + ChatColor.DARK_AQUA + amnts.get(i) + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
text += ChatColor.GREEN + "" + ChatColor.BOLD + "6 " + ChatColor.RESET + ChatColor.DARK_PURPLE + "- " + Lang.get("done") + "\n";
|
text += ChatColor.GREEN + "" + ChatColor.BOLD + "6 " + ChatColor.RESET + ChatColor.DARK_PURPLE + "- "
|
||||||
|
+ Lang.get("done") + "\n";
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -132,34 +148,46 @@ public class BlocksPrompt extends FixedSetPrompt {
|
|||||||
public String getPromptText(ConversationContext context) {
|
public String getPromptText(ConversationContext context) {
|
||||||
String text = ChatColor.GOLD + "- " + Lang.get("stageEditorBreakBlocks") + " -\n";
|
String text = ChatColor.GOLD + "- " + Lang.get("stageEditorBreakBlocks") + " -\n";
|
||||||
if (context.getSessionData(pref + CK.S_BREAK_NAMES) == null) {
|
if (context.getSessionData(pref + CK.S_BREAK_NAMES) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetBlockNames") + " (" + Lang.get("noNamesSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
text += ChatColor.GRAY + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.GRAY + " - " + Lang.get("stageEditorSetBlockAmounts") + " (" + Lang.get("noneSet") + ")\n";
|
+ Lang.get("stageEditorSetBlockNames") + " (" + Lang.get("noNamesSet") + ")\n";
|
||||||
text += ChatColor.GRAY + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.GRAY + " - " + Lang.get("stageEditorSetBlockDurability") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.GRAY + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.GRAY + " - "
|
||||||
text += ChatColor.RED + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("clear") + "\n";
|
+ Lang.get("stageEditorSetBlockAmounts") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
text += ChatColor.GREEN + "" + ChatColor.BOLD + "5" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("done");
|
text += ChatColor.GRAY + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.GRAY + " - "
|
||||||
|
+ Lang.get("stageEditorSetBlockDurability") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
|
text += ChatColor.RED + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("clear") + "\n";
|
||||||
|
text += ChatColor.GREEN + "" + ChatColor.BOLD + "5" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("done");
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetBlockNames") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorSetBlockNames") + "\n";
|
||||||
for (String s : getBlockNames(context)) {
|
for (String s : getBlockNames(context)) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.AQUA + ItemUtil.getPrettyItemName(s) + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.AQUA + ItemUtil.getPrettyItemName(s) + "\n";
|
||||||
}
|
}
|
||||||
if (context.getSessionData(pref + CK.S_BREAK_AMOUNTS) == null) {
|
if (context.getSessionData(pref + CK.S_BREAK_AMOUNTS) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetBlockAmounts") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorSetBlockAmounts") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetBlockAmounts") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorSetBlockAmounts") + "\n";
|
||||||
for (Integer i : getBlockAmounts(context)) {
|
for (Integer i : getBlockAmounts(context)) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.AQUA + i + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.AQUA + i + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (context.getSessionData(pref + CK.S_BREAK_DURABILITY) == null) {
|
if (context.getSessionData(pref + CK.S_BREAK_DURABILITY) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.BLUE + " - " + Lang.get("stageEditorSetBlockDurability") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.BLUE + " - "
|
||||||
|
+ Lang.get("stageEditorSetBlockDurability") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetBlockDurability") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorSetBlockDurability") + "\n";
|
||||||
for (Short s : getBlockDurability(context)) {
|
for (Short s : getBlockDurability(context)) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.AQUA + s + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.AQUA + s + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
text += ChatColor.RED + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("clear") + "\n";
|
text += ChatColor.RED + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
text += ChatColor.GREEN + "" + ChatColor.BOLD + "5" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("done");
|
+ Lang.get("clear") + "\n";
|
||||||
|
text += ChatColor.GREEN + "" + ChatColor.BOLD + "5" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("done");
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
@ -260,15 +288,18 @@ public class BlocksPrompt extends FixedSetPrompt {
|
|||||||
if (m.isBlock()) {
|
if (m.isBlock()) {
|
||||||
names.add(s);
|
names.add(s);
|
||||||
} else {
|
} else {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " " + Lang.get("stageEditorNotSolid"));
|
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " "
|
||||||
|
+ Lang.get("stageEditorNotSolid"));
|
||||||
return new BreakBlockNamesPrompt();
|
return new BreakBlockNamesPrompt();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " " + Lang.get("stageEditorInvalidBlockName"));
|
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " "
|
||||||
|
+ Lang.get("stageEditorInvalidBlockName"));
|
||||||
return new BreakBlockNamesPrompt();
|
return new BreakBlockNamesPrompt();
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED + Lang.get("stageEditorNotListofNumbers"));
|
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED
|
||||||
|
+ Lang.get("stageEditorNotListofNumbers"));
|
||||||
return new BreakBlockNamesPrompt();
|
return new BreakBlockNamesPrompt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -282,7 +313,7 @@ public class BlocksPrompt extends FixedSetPrompt {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getPromptText(ConversationContext context) {
|
public String getPromptText(ConversationContext context) {
|
||||||
return ChatColor.YELLOW + Lang.get("stageEditorBreakBlocksPrompt");
|
return ChatColor.YELLOW + Lang.get("stageEditorEnterBlockAmounts");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -295,11 +326,13 @@ public class BlocksPrompt extends FixedSetPrompt {
|
|||||||
if (Integer.parseInt(s) > 0) {
|
if (Integer.parseInt(s) > 0) {
|
||||||
amounts.add(Integer.parseInt(s));
|
amounts.add(Integer.parseInt(s));
|
||||||
} else {
|
} else {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidMinimum").replace("<number>", "1"));
|
context.getForWhom().sendRawMessage(ChatColor.RED
|
||||||
|
+ Lang.get("invalidMinimum").replace("<number>", "1"));
|
||||||
return new BreakBlockAmountsPrompt();
|
return new BreakBlockAmountsPrompt();
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED + Lang.get("stageEditorNotListofNumbers"));
|
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED
|
||||||
|
+ Lang.get("stageEditorNotListofNumbers"));
|
||||||
return new BreakBlockAmountsPrompt();
|
return new BreakBlockAmountsPrompt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -326,11 +359,13 @@ public class BlocksPrompt extends FixedSetPrompt {
|
|||||||
if (Short.parseShort(s) >= 0) {
|
if (Short.parseShort(s) >= 0) {
|
||||||
durability.add(Short.parseShort(s));
|
durability.add(Short.parseShort(s));
|
||||||
} else {
|
} else {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidMinimum").replace("<number>", "0"));
|
context.getForWhom().sendRawMessage(ChatColor.RED
|
||||||
|
+ Lang.get("invalidMinimum").replace("<number>", "0"));
|
||||||
return new BreakBlockDurabilityPrompt();
|
return new BreakBlockDurabilityPrompt();
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED + Lang.get("stageEditorNotListofNumbers"));
|
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED
|
||||||
|
+ Lang.get("stageEditorNotListofNumbers"));
|
||||||
return new BreakBlockDurabilityPrompt();
|
return new BreakBlockDurabilityPrompt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -350,34 +385,46 @@ public class BlocksPrompt extends FixedSetPrompt {
|
|||||||
public String getPromptText(ConversationContext context) {
|
public String getPromptText(ConversationContext context) {
|
||||||
String text = ChatColor.GOLD + "- " + Lang.get("stageEditorDamageBlocks") + " -\n";
|
String text = ChatColor.GOLD + "- " + Lang.get("stageEditorDamageBlocks") + " -\n";
|
||||||
if (context.getSessionData(pref + CK.S_DAMAGE_NAMES) == null) {
|
if (context.getSessionData(pref + CK.S_DAMAGE_NAMES) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetBlockNames") + " (" + Lang.get("noNamesSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
text += ChatColor.GRAY + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.GRAY + " - " + Lang.get("stageEditorSetDamageAmounts") + " (" + Lang.get("noneSet") + ")\n";
|
+ Lang.get("stageEditorSetBlockNames") + " (" + Lang.get("noNamesSet") + ")\n";
|
||||||
text += ChatColor.GRAY + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.GRAY + " - " + Lang.get("stageEditorSetBlockDurability") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.GRAY + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.GRAY + " - "
|
||||||
text += ChatColor.RED + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("clear") + "\n";
|
+ Lang.get("stageEditorSetBlockAmounts") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
text += ChatColor.GREEN + "" + ChatColor.BOLD + "5" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("done");
|
text += ChatColor.GRAY + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.GRAY + " - "
|
||||||
|
+ Lang.get("stageEditorSetBlockDurability") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
|
text += ChatColor.RED + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("clear") + "\n";
|
||||||
|
text += ChatColor.GREEN + "" + ChatColor.BOLD + "5" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("done");
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetBlockNames") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorSetBlockNames") + "\n";
|
||||||
for (String s : getBlockNames(context)) {
|
for (String s : getBlockNames(context)) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.AQUA + ItemUtil.getPrettyItemName(s) + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.AQUA + ItemUtil.getPrettyItemName(s) + "\n";
|
||||||
}
|
}
|
||||||
if (context.getSessionData(pref + CK.S_DAMAGE_AMOUNTS) == null) {
|
if (context.getSessionData(pref + CK.S_DAMAGE_AMOUNTS) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetDamageAmounts") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorSetBlockAmounts") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetDamageAmounts") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorSetBlockAmounts") + "\n";
|
||||||
for (Integer i : getBlockAmounts(context)) {
|
for (Integer i : getBlockAmounts(context)) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.AQUA + i + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.AQUA + i + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (context.getSessionData(pref + CK.S_DAMAGE_DURABILITY) == null) {
|
if (context.getSessionData(pref + CK.S_DAMAGE_DURABILITY) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.BLUE + " - " + Lang.get("stageEditorSetBlockDurability") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.BLUE + " - "
|
||||||
|
+ Lang.get("stageEditorSetBlockDurability") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetBlockDurability") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorSetBlockDurability") + "\n";
|
||||||
for (Short s : getBlockDurability(context)) {
|
for (Short s : getBlockDurability(context)) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.AQUA + s + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.AQUA + s + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
text += ChatColor.RED + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("clear") + "\n";
|
text += ChatColor.RED + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
text += ChatColor.GREEN + "" + ChatColor.BOLD + "5" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("done");
|
+ Lang.get("clear") + "\n";
|
||||||
|
text += ChatColor.GREEN + "" + ChatColor.BOLD + "5" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("done");
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
@ -478,15 +525,18 @@ public class BlocksPrompt extends FixedSetPrompt {
|
|||||||
if (m.isBlock()) {
|
if (m.isBlock()) {
|
||||||
names.add(s);
|
names.add(s);
|
||||||
} else {
|
} else {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " " + Lang.get("stageEditorNotSolid"));
|
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " "
|
||||||
|
+ Lang.get("stageEditorNotSolid"));
|
||||||
return new DamageBlockNamesPrompt();
|
return new DamageBlockNamesPrompt();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " " + Lang.get("stageEditorInvalidBlockName"));
|
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " "
|
||||||
|
+ Lang.get("stageEditorInvalidBlockName"));
|
||||||
return new DamageBlockNamesPrompt();
|
return new DamageBlockNamesPrompt();
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED + Lang.get("stageEditorNotListofNumbers"));
|
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED
|
||||||
|
+ Lang.get("stageEditorNotListofNumbers"));
|
||||||
return new DamageBlockNamesPrompt();
|
return new DamageBlockNamesPrompt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -500,7 +550,7 @@ public class BlocksPrompt extends FixedSetPrompt {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getPromptText(ConversationContext context) {
|
public String getPromptText(ConversationContext context) {
|
||||||
return ChatColor.YELLOW + Lang.get("stageEditorDamageBlocksPrompt");
|
return ChatColor.YELLOW + Lang.get("stageEditorEnterBlockAmounts");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -513,11 +563,13 @@ public class BlocksPrompt extends FixedSetPrompt {
|
|||||||
if (Integer.parseInt(s) > 0) {
|
if (Integer.parseInt(s) > 0) {
|
||||||
amounts.add(Integer.parseInt(s));
|
amounts.add(Integer.parseInt(s));
|
||||||
} else {
|
} else {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidMinimum").replace("<number>", "1"));
|
context.getForWhom().sendRawMessage(ChatColor.RED
|
||||||
|
+ Lang.get("invalidMinimum").replace("<number>", "1"));
|
||||||
return new DamageBlockAmountsPrompt();
|
return new DamageBlockAmountsPrompt();
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED + Lang.get("stageEditorNotListofNumbers"));
|
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED
|
||||||
|
+ Lang.get("stageEditorNotListofNumbers"));
|
||||||
return new DamageBlockAmountsPrompt();
|
return new DamageBlockAmountsPrompt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -544,11 +596,13 @@ public class BlocksPrompt extends FixedSetPrompt {
|
|||||||
if (Short.parseShort(s) >= 0) {
|
if (Short.parseShort(s) >= 0) {
|
||||||
durability.add(Short.parseShort(s));
|
durability.add(Short.parseShort(s));
|
||||||
} else {
|
} else {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidMinimum").replace("<number>", "0"));
|
context.getForWhom().sendRawMessage(ChatColor.RED
|
||||||
|
+ Lang.get("invalidMinimum").replace("<number>", "0"));
|
||||||
return new DamageBlockDurabilityPrompt();
|
return new DamageBlockDurabilityPrompt();
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED + Lang.get("stageEditorNotListofNumbers"));
|
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED
|
||||||
|
+ Lang.get("stageEditorNotListofNumbers"));
|
||||||
return new DamageBlockDurabilityPrompt();
|
return new DamageBlockDurabilityPrompt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -568,34 +622,46 @@ public class BlocksPrompt extends FixedSetPrompt {
|
|||||||
public String getPromptText(ConversationContext context) {
|
public String getPromptText(ConversationContext context) {
|
||||||
String text = ChatColor.GOLD + "- " + Lang.get("stageEditorPlaceBlocks") + " -\n";
|
String text = ChatColor.GOLD + "- " + Lang.get("stageEditorPlaceBlocks") + " -\n";
|
||||||
if (context.getSessionData(pref + CK.S_PLACE_NAMES) == null) {
|
if (context.getSessionData(pref + CK.S_PLACE_NAMES) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetBlockNames") + " (" + Lang.get("noNamesSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
text += ChatColor.GRAY + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.GRAY + " - " + Lang.get("stageEditorSetPlaceAmounts") + " (" + Lang.get("noneSet") + ")\n";
|
+ Lang.get("stageEditorSetBlockNames") + " (" + Lang.get("noNamesSet") + ")\n";
|
||||||
text += ChatColor.GRAY + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.GRAY + " - " + Lang.get("stageEditorSetBlockDurability") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.GRAY + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.GRAY + " - "
|
||||||
text += ChatColor.RED + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("clear") + "\n";
|
+ Lang.get("stageEditorSetBlockAmounts") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
text += ChatColor.GREEN + "" + ChatColor.BOLD + "5" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("done");
|
text += ChatColor.GRAY + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.GRAY + " - "
|
||||||
|
+ Lang.get("stageEditorSetBlockDurability") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
|
text += ChatColor.RED + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("clear") + "\n";
|
||||||
|
text += ChatColor.GREEN + "" + ChatColor.BOLD + "5" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("done");
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetBlockNames") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorSetBlockNames") + "\n";
|
||||||
for (String s : getBlockNames(context)) {
|
for (String s : getBlockNames(context)) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.AQUA + ItemUtil.getPrettyItemName(s) + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.AQUA + ItemUtil.getPrettyItemName(s) + "\n";
|
||||||
}
|
}
|
||||||
if (context.getSessionData(pref + CK.S_PLACE_AMOUNTS) == null) {
|
if (context.getSessionData(pref + CK.S_PLACE_AMOUNTS) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetPlaceAmounts") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorSetBlockAmounts") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetPlaceAmounts") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorSetBlockAmounts") + "\n";
|
||||||
for (Integer i : getBlockAmounts(context)) {
|
for (Integer i : getBlockAmounts(context)) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.AQUA + i + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.AQUA + i + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (context.getSessionData(pref + CK.S_PLACE_DURABILITY) == null) {
|
if (context.getSessionData(pref + CK.S_PLACE_DURABILITY) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.BLUE + " - " + Lang.get("stageEditorSetBlockDurability") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.BLUE + " - "
|
||||||
|
+ Lang.get("stageEditorSetBlockDurability") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetBlockDurability") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorSetBlockDurability") + "\n";
|
||||||
for (Short s : getBlockDurability(context)) {
|
for (Short s : getBlockDurability(context)) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.AQUA + s + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.AQUA + s + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
text += ChatColor.RED + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("clear") + "\n";
|
text += ChatColor.RED + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
text += ChatColor.GREEN + "" + ChatColor.BOLD + "5" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("done");
|
+ Lang.get("clear") + "\n";
|
||||||
|
text += ChatColor.GREEN + "" + ChatColor.BOLD + "5" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("done");
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
@ -696,15 +762,18 @@ public class BlocksPrompt extends FixedSetPrompt {
|
|||||||
if (m.isBlock()) {
|
if (m.isBlock()) {
|
||||||
names.add(s);
|
names.add(s);
|
||||||
} else {
|
} else {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " " + Lang.get("stageEditorNotSolid"));
|
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " "
|
||||||
|
+ Lang.get("stageEditorNotSolid"));
|
||||||
return new PlaceBlockNamesPrompt();
|
return new PlaceBlockNamesPrompt();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + Lang.get("stageEditorInvalidBlockName"));
|
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED
|
||||||
|
+ Lang.get("stageEditorInvalidBlockName"));
|
||||||
return new PlaceBlockNamesPrompt();
|
return new PlaceBlockNamesPrompt();
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED + Lang.get("stageEditorNotListofNumbers"));
|
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED
|
||||||
|
+ Lang.get("stageEditorNotListofNumbers"));
|
||||||
return new PlaceBlockNamesPrompt();
|
return new PlaceBlockNamesPrompt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -718,7 +787,7 @@ public class BlocksPrompt extends FixedSetPrompt {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getPromptText(ConversationContext context) {
|
public String getPromptText(ConversationContext context) {
|
||||||
return ChatColor.YELLOW + Lang.get("stageEditorPlaceBlocksPrompt");
|
return ChatColor.YELLOW + Lang.get("stageEditorEnterBlockAmounts");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -731,11 +800,13 @@ public class BlocksPrompt extends FixedSetPrompt {
|
|||||||
if (Integer.parseInt(s) > 0) {
|
if (Integer.parseInt(s) > 0) {
|
||||||
amounts.add(Integer.parseInt(s));
|
amounts.add(Integer.parseInt(s));
|
||||||
} else {
|
} else {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidMinimum").replace("<number>", "1"));
|
context.getForWhom().sendRawMessage(ChatColor.RED
|
||||||
|
+ Lang.get("invalidMinimum").replace("<number>", "1"));
|
||||||
return new PlaceBlockAmountsPrompt();
|
return new PlaceBlockAmountsPrompt();
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED + Lang.get("stageEditorNotListofNumbers"));
|
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED
|
||||||
|
+ Lang.get("stageEditorNotListofNumbers"));
|
||||||
return new PlaceBlockAmountsPrompt();
|
return new PlaceBlockAmountsPrompt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -762,11 +833,13 @@ public class BlocksPrompt extends FixedSetPrompt {
|
|||||||
if (Short.parseShort(s) >= 0) {
|
if (Short.parseShort(s) >= 0) {
|
||||||
durability.add(Short.parseShort(s));
|
durability.add(Short.parseShort(s));
|
||||||
} else {
|
} else {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidMinimum").replace("<number>", "0"));
|
context.getForWhom().sendRawMessage(ChatColor.RED
|
||||||
|
+ Lang.get("invalidMinimum").replace("<number>", "0"));
|
||||||
return new PlaceBlockDurabilityPrompt();
|
return new PlaceBlockDurabilityPrompt();
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED + Lang.get("stageEditorNotListofNumbers"));
|
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED
|
||||||
|
+ Lang.get("stageEditorNotListofNumbers"));
|
||||||
return new PlaceBlockDurabilityPrompt();
|
return new PlaceBlockDurabilityPrompt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -786,34 +859,46 @@ public class BlocksPrompt extends FixedSetPrompt {
|
|||||||
public String getPromptText(ConversationContext context) {
|
public String getPromptText(ConversationContext context) {
|
||||||
String text = ChatColor.GOLD + "- " + Lang.get("stageEditorUseBlocks") + " -\n";
|
String text = ChatColor.GOLD + "- " + Lang.get("stageEditorUseBlocks") + " -\n";
|
||||||
if (context.getSessionData(pref + CK.S_USE_NAMES) == null) {
|
if (context.getSessionData(pref + CK.S_USE_NAMES) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetBlockNames") + " (" + Lang.get("noNamesSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
text += ChatColor.GRAY + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.GRAY + " - " + Lang.get("stageEditorSetUseAmounts") + " (" + Lang.get("noneSet") + ")\n";
|
+ Lang.get("stageEditorSetBlockNames") + " (" + Lang.get("noNamesSet") + ")\n";
|
||||||
text += ChatColor.GRAY + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.GRAY + " - " + Lang.get("stageEditorSetBlockDurability") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.GRAY + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.GRAY + " - "
|
||||||
text += ChatColor.RED + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("clear") + "\n";
|
+ Lang.get("stageEditorSetBlockAmounts") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
text += ChatColor.GREEN + "" + ChatColor.BOLD + "5" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("done");
|
text += ChatColor.GRAY + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.GRAY + " - "
|
||||||
|
+ Lang.get("stageEditorSetBlockDurability") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
|
text += ChatColor.RED + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("clear") + "\n";
|
||||||
|
text += ChatColor.GREEN + "" + ChatColor.BOLD + "5" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("done");
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetBlockNames") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorSetBlockNames") + "\n";
|
||||||
for (String s : getBlockNames(context)) {
|
for (String s : getBlockNames(context)) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.AQUA + ItemUtil.getPrettyItemName(s) + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.AQUA + ItemUtil.getPrettyItemName(s) + "\n";
|
||||||
}
|
}
|
||||||
if (context.getSessionData(pref + CK.S_USE_AMOUNTS) == null) {
|
if (context.getSessionData(pref + CK.S_USE_AMOUNTS) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetUseAmounts") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorSetBlockAmounts") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetUseAmounts") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorSetBlockAmounts") + "\n";
|
||||||
for (Integer i : getBlockAmounts(context)) {
|
for (Integer i : getBlockAmounts(context)) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.AQUA + i + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.AQUA + i + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (context.getSessionData(pref + CK.S_USE_DURABILITY) == null) {
|
if (context.getSessionData(pref + CK.S_USE_DURABILITY) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.BLUE + " - " + Lang.get("stageEditorSetBlockDurability") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.BLUE + " - "
|
||||||
|
+ Lang.get("stageEditorSetBlockDurability") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetBlockDurability") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorSetBlockDurability") + "\n";
|
||||||
for (Short s : getBlockDurability(context)) {
|
for (Short s : getBlockDurability(context)) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.AQUA + s + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.AQUA + s + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
text += ChatColor.RED + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("clear") + "\n";
|
text += ChatColor.RED + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
text += ChatColor.GREEN + "" + ChatColor.BOLD + "5" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("done");
|
+ Lang.get("clear") + "\n";
|
||||||
|
text += ChatColor.GREEN + "" + ChatColor.BOLD + "5" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("done");
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
@ -914,15 +999,18 @@ public class BlocksPrompt extends FixedSetPrompt {
|
|||||||
if (m.isBlock()) {
|
if (m.isBlock()) {
|
||||||
names.add(s);
|
names.add(s);
|
||||||
} else {
|
} else {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " " + Lang.get("stageEditorNotSolid"));
|
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " "
|
||||||
|
+ Lang.get("stageEditorNotSolid"));
|
||||||
return new UseBlockNamesPrompt();
|
return new UseBlockNamesPrompt();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " " + Lang.get("stageEditorInvalidBlockName"));
|
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " "
|
||||||
|
+ Lang.get("stageEditorInvalidBlockName"));
|
||||||
return new UseBlockNamesPrompt();
|
return new UseBlockNamesPrompt();
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED + Lang.get("stageEditorNotListofNumbers"));
|
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED
|
||||||
|
+ Lang.get("stageEditorNotListofNumbers"));
|
||||||
return new UseBlockNamesPrompt();
|
return new UseBlockNamesPrompt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -936,7 +1024,7 @@ public class BlocksPrompt extends FixedSetPrompt {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getPromptText(ConversationContext context) {
|
public String getPromptText(ConversationContext context) {
|
||||||
return ChatColor.YELLOW + Lang.get("stageEditorUseBlocksPrompt");
|
return ChatColor.YELLOW + Lang.get("stageEditorEnterBlockAmounts");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -949,11 +1037,13 @@ public class BlocksPrompt extends FixedSetPrompt {
|
|||||||
if (Integer.parseInt(s) > 0) {
|
if (Integer.parseInt(s) > 0) {
|
||||||
amounts.add(Integer.parseInt(s));
|
amounts.add(Integer.parseInt(s));
|
||||||
} else {
|
} else {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidMinimum").replace("<number>", "1"));
|
context.getForWhom().sendRawMessage(ChatColor.RED
|
||||||
|
+ Lang.get("invalidMinimum").replace("<number>", "1"));
|
||||||
return new UseBlockAmountsPrompt();
|
return new UseBlockAmountsPrompt();
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED + Lang.get("stageEditorNotListofNumbers"));
|
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED
|
||||||
|
+ Lang.get("stageEditorNotListofNumbers"));
|
||||||
return new UseBlockAmountsPrompt();
|
return new UseBlockAmountsPrompt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -980,11 +1070,13 @@ public class BlocksPrompt extends FixedSetPrompt {
|
|||||||
if (Short.parseShort(s) >= 0) {
|
if (Short.parseShort(s) >= 0) {
|
||||||
durability.add(Short.parseShort(s));
|
durability.add(Short.parseShort(s));
|
||||||
} else {
|
} else {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidMinimum").replace("<number>", "0"));
|
context.getForWhom().sendRawMessage(ChatColor.RED
|
||||||
|
+ Lang.get("invalidMinimum").replace("<number>", "0"));
|
||||||
return new UseBlockDurabilityPrompt();
|
return new UseBlockDurabilityPrompt();
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED + Lang.get("stageEditorNotListofNumbers"));
|
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED
|
||||||
|
+ Lang.get("stageEditorNotListofNumbers"));
|
||||||
return new UseBlockDurabilityPrompt();
|
return new UseBlockDurabilityPrompt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1004,34 +1096,46 @@ public class BlocksPrompt extends FixedSetPrompt {
|
|||||||
public String getPromptText(ConversationContext context) {
|
public String getPromptText(ConversationContext context) {
|
||||||
String text = ChatColor.GOLD + "- " + Lang.get("stageEditorCutBlocks") + " -\n";
|
String text = ChatColor.GOLD + "- " + Lang.get("stageEditorCutBlocks") + " -\n";
|
||||||
if (context.getSessionData(pref + CK.S_CUT_NAMES) == null) {
|
if (context.getSessionData(pref + CK.S_CUT_NAMES) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetBlockNames") + " (" + Lang.get("noNamesSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
text += ChatColor.GRAY + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.GRAY + " - " + Lang.get("stageEditorSetCutAmounts") + " (" + Lang.get("noneSet") + ")\n";
|
+ Lang.get("stageEditorSetBlockNames") + " (" + Lang.get("noNamesSet") + ")\n";
|
||||||
text += ChatColor.GRAY + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.GRAY + " - " + Lang.get("stageEditorSetBlockDurability") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.GRAY + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.GRAY + " - "
|
||||||
text += ChatColor.RED + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("clear") + "\n";
|
+ Lang.get("stageEditorSetBlockAmounts") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
text += ChatColor.GREEN + "" + ChatColor.BOLD + "5" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("done");
|
text += ChatColor.GRAY + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.GRAY + " - "
|
||||||
|
+ Lang.get("stageEditorSetBlockDurability") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
|
text += ChatColor.RED + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("clear") + "\n";
|
||||||
|
text += ChatColor.GREEN + "" + ChatColor.BOLD + "5" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("done");
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetBlockNames") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorSetBlockNames") + "\n";
|
||||||
for (String s : getBlockNames(context)) {
|
for (String s : getBlockNames(context)) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.AQUA + ItemUtil.getPrettyItemName(s) + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.AQUA + ItemUtil.getPrettyItemName(s) + "\n";
|
||||||
}
|
}
|
||||||
if (context.getSessionData(pref + CK.S_CUT_AMOUNTS) == null) {
|
if (context.getSessionData(pref + CK.S_CUT_AMOUNTS) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetCutAmounts") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorSetBlockAmounts") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetCutAmounts") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorSetBlockAmounts") + "\n";
|
||||||
for (Integer i : getBlockAmounts(context)) {
|
for (Integer i : getBlockAmounts(context)) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.AQUA + i + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.AQUA + i + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (context.getSessionData(pref + CK.S_CUT_DURABILITY) == null) {
|
if (context.getSessionData(pref + CK.S_CUT_DURABILITY) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.BLUE + " - " + Lang.get("stageEditorSetBlockDurability") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.BLUE + " - "
|
||||||
|
+ Lang.get("stageEditorSetBlockDurability") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetBlockDurability") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorSetBlockDurability") + "\n";
|
||||||
for (Short s : getBlockDurability(context)) {
|
for (Short s : getBlockDurability(context)) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.AQUA + s + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.AQUA + s + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
text += ChatColor.RED + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("clear") + "\n";
|
text += ChatColor.RED + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
text += ChatColor.GREEN + "" + ChatColor.BOLD + "5" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("done");
|
+ Lang.get("clear") + "\n";
|
||||||
|
text += ChatColor.GREEN + "" + ChatColor.BOLD + "5" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("done");
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
@ -1132,15 +1236,18 @@ public class BlocksPrompt extends FixedSetPrompt {
|
|||||||
if (m.isBlock()) {
|
if (m.isBlock()) {
|
||||||
names.add(s);
|
names.add(s);
|
||||||
} else {
|
} else {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " " + Lang.get("stageEditorNotSolid"));
|
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " "
|
||||||
|
+ Lang.get("stageEditorNotSolid"));
|
||||||
return new CutBlockNamesPrompt();
|
return new CutBlockNamesPrompt();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " " + Lang.get("stageEditorInvalidBlockName"));
|
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " "
|
||||||
|
+ Lang.get("stageEditorInvalidBlockName"));
|
||||||
return new CutBlockNamesPrompt();
|
return new CutBlockNamesPrompt();
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED + Lang.get("stageEditorNotListofNumbers"));
|
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED
|
||||||
|
+ Lang.get("stageEditorNotListofNumbers"));
|
||||||
return new CutBlockNamesPrompt();
|
return new CutBlockNamesPrompt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1154,7 +1261,7 @@ public class BlocksPrompt extends FixedSetPrompt {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getPromptText(ConversationContext context) {
|
public String getPromptText(ConversationContext context) {
|
||||||
return ChatColor.YELLOW + Lang.get("stageEditorCutBlocksPrompt");
|
return ChatColor.YELLOW + Lang.get("stageEditorEnterBlockAmounts");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -1167,11 +1274,13 @@ public class BlocksPrompt extends FixedSetPrompt {
|
|||||||
if (Integer.parseInt(s) > 0) {
|
if (Integer.parseInt(s) > 0) {
|
||||||
amounts.add(Integer.parseInt(s));
|
amounts.add(Integer.parseInt(s));
|
||||||
} else {
|
} else {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidMinimum").replace("<number>", "1"));
|
context.getForWhom().sendRawMessage(ChatColor.RED
|
||||||
|
+ Lang.get("invalidMinimum").replace("<number>", "1"));
|
||||||
return new CutBlockAmountsPrompt();
|
return new CutBlockAmountsPrompt();
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED + Lang.get("stageEditorNotListofNumbers"));
|
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED
|
||||||
|
+ Lang.get("stageEditorNotListofNumbers"));
|
||||||
return new CutBlockAmountsPrompt();
|
return new CutBlockAmountsPrompt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1198,11 +1307,13 @@ public class BlocksPrompt extends FixedSetPrompt {
|
|||||||
if (Short.parseShort(s) >= 0) {
|
if (Short.parseShort(s) >= 0) {
|
||||||
durability.add(Short.parseShort(s));
|
durability.add(Short.parseShort(s));
|
||||||
} else {
|
} else {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidMinimum").replace("<number>", "0"));
|
context.getForWhom().sendRawMessage(ChatColor.RED
|
||||||
|
+ Lang.get("invalidMinimum").replace("<number>", "0"));
|
||||||
return new CutBlockDurabilityPrompt();
|
return new CutBlockDurabilityPrompt();
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED + Lang.get("stageEditorNotListofNumbers"));
|
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED
|
||||||
|
+ Lang.get("stageEditorNotListofNumbers"));
|
||||||
return new CutBlockDurabilityPrompt();
|
return new CutBlockDurabilityPrompt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,9 @@ import me.blackvein.quests.Quests;
|
|||||||
import me.blackvein.quests.actions.Action;
|
import me.blackvein.quests.actions.Action;
|
||||||
import me.blackvein.quests.events.editor.quests.QuestsEditorPostOpenCreateStagePromptEvent;
|
import me.blackvein.quests.events.editor.quests.QuestsEditorPostOpenCreateStagePromptEvent;
|
||||||
import me.blackvein.quests.util.CK;
|
import me.blackvein.quests.util.CK;
|
||||||
|
import me.blackvein.quests.util.ConfigUtil;
|
||||||
import me.blackvein.quests.util.Lang;
|
import me.blackvein.quests.util.Lang;
|
||||||
|
import me.blackvein.quests.util.MiscUtil;
|
||||||
|
|
||||||
public class CreateStagePrompt extends NumericPrompt {
|
public class CreateStagePrompt extends NumericPrompt {
|
||||||
|
|
||||||
@ -228,21 +230,31 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
public String getAdditionalText(ConversationContext context, int number) {
|
public String getAdditionalText(ConversationContext context, int number) {
|
||||||
switch (number) {
|
switch (number) {
|
||||||
case 1:
|
case 1:
|
||||||
if (context.getSessionData(pref + CK.S_BREAK_NAMES) == null && context.getSessionData(pref + CK.S_DAMAGE_NAMES) == null
|
if (context.getSessionData(pref + CK.S_BREAK_NAMES) == null
|
||||||
&& context.getSessionData(pref + CK.S_PLACE_NAMES) == null && context.getSessionData(pref + CK.S_USE_NAMES) == null
|
&& context.getSessionData(pref + CK.S_DAMAGE_NAMES) == null
|
||||||
|
&& context.getSessionData(pref + CK.S_PLACE_NAMES) == null
|
||||||
|
&& context.getSessionData(pref + CK.S_USE_NAMES) == null
|
||||||
&& context.getSessionData(pref + CK.S_CUT_NAMES) == null) {
|
&& context.getSessionData(pref + CK.S_CUT_NAMES) == null) {
|
||||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||||
}
|
}
|
||||||
case 2:
|
case 2:
|
||||||
if (context.getSessionData(pref + CK.S_CRAFT_ITEMS) == null && context.getSessionData(pref + CK.S_SMELT_ITEMS) == null && context.getSessionData(pref + CK.S_ENCHANT_TYPES) == null && context.getSessionData(pref + CK.S_BREW_ITEMS) == null) {
|
if (context.getSessionData(pref + CK.S_CRAFT_ITEMS) == null
|
||||||
|
&& context.getSessionData(pref + CK.S_SMELT_ITEMS) == null
|
||||||
|
&& context.getSessionData(pref + CK.S_ENCHANT_TYPES) == null
|
||||||
|
&& context.getSessionData(pref + CK.S_BREW_ITEMS) == null) {
|
||||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||||
}
|
}
|
||||||
case 3:
|
case 3:
|
||||||
if (context.getSessionData(pref + CK.S_DELIVERY_NPCS) == null && context.getSessionData(pref + CK.S_NPCS_TO_TALK_TO) == null && context.getSessionData(pref + CK.S_NPCS_TO_KILL) == null) {
|
if (context.getSessionData(pref + CK.S_DELIVERY_NPCS) == null
|
||||||
|
&& context.getSessionData(pref + CK.S_NPCS_TO_TALK_TO) == null
|
||||||
|
&& context.getSessionData(pref + CK.S_NPCS_TO_KILL) == null) {
|
||||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||||
}
|
}
|
||||||
case 4:
|
case 4:
|
||||||
if (context.getSessionData(pref + CK.S_MOB_TYPES) == null && context.getSessionData(pref + CK.S_FISH) == null && context.getSessionData(pref + CK.S_TAME_TYPES) == null && context.getSessionData(pref + CK.S_SHEAR_COLORS) == null) {
|
if (context.getSessionData(pref + CK.S_MOB_TYPES) == null
|
||||||
|
&& context.getSessionData(pref + CK.S_FISH) == null
|
||||||
|
&& context.getSessionData(pref + CK.S_TAME_TYPES) == null
|
||||||
|
&& context.getSessionData(pref + CK.S_SHEAR_COLORS) == null) {
|
||||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||||
}
|
}
|
||||||
case 5:
|
case 5:
|
||||||
@ -250,18 +262,25 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||||
} else {
|
} else {
|
||||||
Integer players = (Integer) context.getSessionData(pref + CK.S_PLAYER_KILL);
|
Integer players = (Integer) context.getSessionData(pref + CK.S_PLAYER_KILL);
|
||||||
return ChatColor.GRAY + "(" + ChatColor.AQUA + players + " " + Lang.get("stageEditorPlayers") + ChatColor.GRAY + ")";
|
return ChatColor.GRAY + "(" + ChatColor.AQUA + players + " " + Lang.get("stageEditorPlayers")
|
||||||
|
+ ChatColor.GRAY + ")";
|
||||||
}
|
}
|
||||||
case 6:
|
case 6:
|
||||||
if (context.getSessionData(pref + CK.S_REACH_LOCATIONS) == null) {
|
if (context.getSessionData(pref + CK.S_REACH_LOCATIONS) == null) {
|
||||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||||
} else {
|
} else {
|
||||||
String text = "";
|
String text = "";
|
||||||
LinkedList<String> locations = (LinkedList<String>) context.getSessionData(pref + CK.S_REACH_LOCATIONS);
|
LinkedList<String> locations
|
||||||
LinkedList<Integer> radii = (LinkedList<Integer>) context.getSessionData(pref + CK.S_REACH_LOCATIONS_RADIUS);
|
= (LinkedList<String>) context.getSessionData(pref + CK.S_REACH_LOCATIONS);
|
||||||
LinkedList<String> names = (LinkedList<String>) context.getSessionData(pref + CK.S_REACH_LOCATIONS_NAMES);
|
LinkedList<Integer> radii
|
||||||
|
= (LinkedList<Integer>) context.getSessionData(pref + CK.S_REACH_LOCATIONS_RADIUS);
|
||||||
|
LinkedList<String> names
|
||||||
|
= (LinkedList<String>) context.getSessionData(pref + CK.S_REACH_LOCATIONS_NAMES);
|
||||||
for (int i = 0; i < locations.size(); i++) {
|
for (int i = 0; i < locations.size(); i++) {
|
||||||
text += ChatColor.GRAY + " - " + Lang.get("stageEditorReachRadii1") + " " + ChatColor.BLUE + radii.get(i) + ChatColor.GRAY + " " + Lang.get("stageEditorReachRadii2") + " " + ChatColor.AQUA + names.get(i) + ChatColor.GRAY + " (" + ChatColor.DARK_AQUA + locations.get(i) + ChatColor.GRAY + ")\n";
|
text += ChatColor.GRAY + " - " + Lang.get("stageEditorReachRadii1") + " " + ChatColor.BLUE
|
||||||
|
+ radii.get(i) + ChatColor.GRAY + " " + Lang.get("stageEditorReachRadii2") + " "
|
||||||
|
+ ChatColor.AQUA + names.get(i) + ChatColor.GRAY + " (" + ChatColor.DARK_AQUA
|
||||||
|
+ locations.get(i) + ChatColor.GRAY + ")\n";
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
@ -270,8 +289,10 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||||
} else {
|
} else {
|
||||||
String text = "";
|
String text = "";
|
||||||
LinkedList<LinkedList<String>> passPhrases = (LinkedList<LinkedList<String>>) context.getSessionData(pref + CK.S_PASSWORD_PHRASES);
|
LinkedList<LinkedList<String>> passPhrases
|
||||||
LinkedList<String> passDisplays = (LinkedList<String>) context.getSessionData(pref + CK.S_PASSWORD_DISPLAYS);
|
= (LinkedList<LinkedList<String>>) context.getSessionData(pref + CK.S_PASSWORD_PHRASES);
|
||||||
|
LinkedList<String> passDisplays
|
||||||
|
= (LinkedList<String>) context.getSessionData(pref + CK.S_PASSWORD_DISPLAYS);
|
||||||
for (int i = 0; i < passPhrases.size(); i++) {
|
for (int i = 0; i < passPhrases.size(); i++) {
|
||||||
text += ChatColor.AQUA + " - \"" + passDisplays.get(i) + "\"\n";
|
text += ChatColor.AQUA + " - \"" + passDisplays.get(i) + "\"\n";
|
||||||
LinkedList<String> phrases = passPhrases.get(i);
|
LinkedList<String> phrases = passPhrases.get(i);
|
||||||
@ -286,8 +307,10 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||||
} else {
|
} else {
|
||||||
String text = "";
|
String text = "";
|
||||||
LinkedList<String> customObjs = (LinkedList<String>) context.getSessionData(pref + CK.S_CUSTOM_OBJECTIVES);
|
LinkedList<String> customObjs
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "8" + ChatColor.RESET + ChatColor.DARK_PURPLE + " - " + Lang.get("stageEditorCustom") + "\n";
|
= (LinkedList<String>) context.getSessionData(pref + CK.S_CUSTOM_OBJECTIVES);
|
||||||
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "8" + ChatColor.RESET + ChatColor.DARK_PURPLE + " - "
|
||||||
|
+ Lang.get("stageEditorCustom") + "\n";
|
||||||
for (String s : customObjs) {
|
for (String s : customObjs) {
|
||||||
text += ChatColor.LIGHT_PURPLE + " - " + ChatColor.GOLD + s + "\n";
|
text += ChatColor.LIGHT_PURPLE + " - " + ChatColor.GOLD + s + "\n";
|
||||||
}
|
}
|
||||||
@ -305,7 +328,7 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||||
} else {
|
} else {
|
||||||
long time = (Long) context.getSessionData(pref + CK.S_DELAY);
|
long time = (Long) context.getSessionData(pref + CK.S_DELAY);
|
||||||
return ChatColor.GRAY + "(" + ChatColor.AQUA + Quests.getTime(time) + ChatColor.GRAY + ")";
|
return ChatColor.GRAY + "(" + ChatColor.AQUA + MiscUtil.getTime(time) + ChatColor.GRAY + ")";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case 11:
|
case 11:
|
||||||
@ -314,7 +337,8 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
} else if (context.getSessionData(pref + CK.S_DELAY_MESSAGE) == null) {
|
} else if (context.getSessionData(pref + CK.S_DELAY_MESSAGE) == null) {
|
||||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||||
} else {
|
} else {
|
||||||
return ChatColor.GRAY + "(" + ChatColor.AQUA + "\"" + context.getSessionData(pref + CK.S_DELAY_MESSAGE) + "\"" + ChatColor.GRAY + ")";
|
return ChatColor.GRAY + "(" + ChatColor.AQUA + "\""
|
||||||
|
+ context.getSessionData(pref + CK.S_DELAY_MESSAGE) + "\"" + ChatColor.GRAY + ")";
|
||||||
}
|
}
|
||||||
case 12:
|
case 12:
|
||||||
if (plugin.getDependencies().getDenizenAPI() == null) {
|
if (plugin.getDependencies().getDenizenAPI() == null) {
|
||||||
@ -326,7 +350,8 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
if (context.getSessionData(pref + CK.S_DENIZEN) == null) {
|
if (context.getSessionData(pref + CK.S_DENIZEN) == null) {
|
||||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||||
} else {
|
} else {
|
||||||
return ChatColor.GRAY + "(" + ChatColor.AQUA + context.getSessionData(pref + CK.S_DENIZEN) + ChatColor.GRAY + ")";
|
return ChatColor.GRAY + "(" + ChatColor.AQUA + context.getSessionData(pref + CK.S_DENIZEN)
|
||||||
|
+ ChatColor.GRAY + ")";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -338,7 +363,8 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return ChatColor.GRAY + "(" + ChatColor.AQUA + "\"" + context.getSessionData(pref + CK.S_START_MESSAGE) + "\"" + ChatColor.GRAY + ")";
|
return ChatColor.GRAY + "(" + ChatColor.AQUA + "\""
|
||||||
|
+ context.getSessionData(pref + CK.S_START_MESSAGE) + "\"" + ChatColor.GRAY + ")";
|
||||||
}
|
}
|
||||||
case 14:
|
case 14:
|
||||||
if (context.getSessionData(pref + CK.S_COMPLETE_MESSAGE) == null) {
|
if (context.getSessionData(pref + CK.S_COMPLETE_MESSAGE) == null) {
|
||||||
@ -348,7 +374,8 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return ChatColor.GRAY + "(" + ChatColor.AQUA + "\"" + context.getSessionData(pref + CK.S_COMPLETE_MESSAGE) + "\"" + ChatColor.GRAY + ")";
|
return ChatColor.GRAY + "(" + ChatColor.AQUA + "\""
|
||||||
|
+ context.getSessionData(pref + CK.S_COMPLETE_MESSAGE) + "\"" + ChatColor.GRAY + ")";
|
||||||
}
|
}
|
||||||
case 15:
|
case 15:
|
||||||
if (context.getSessionData(pref + CK.S_OVERRIDE_DISPLAY) == null) {
|
if (context.getSessionData(pref + CK.S_OVERRIDE_DISPLAY) == null) {
|
||||||
@ -358,7 +385,8 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return ChatColor.GRAY + "(" + ChatColor.AQUA + "\"" + context.getSessionData(pref + CK.S_OVERRIDE_DISPLAY) + "\"" + ChatColor.GRAY + ")";
|
return ChatColor.GRAY + "(" + ChatColor.AQUA + "\""
|
||||||
|
+ context.getSessionData(pref + CK.S_OVERRIDE_DISPLAY) + "\"" + ChatColor.GRAY + ")";
|
||||||
}
|
}
|
||||||
case 16:
|
case 16:
|
||||||
case 17:
|
case 17:
|
||||||
@ -373,12 +401,15 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
context.setSessionData(pref, Boolean.TRUE);
|
context.setSessionData(pref, Boolean.TRUE);
|
||||||
checkObjective(context);
|
checkObjective(context);
|
||||||
|
|
||||||
QuestsEditorPostOpenCreateStagePromptEvent event = new QuestsEditorPostOpenCreateStagePromptEvent(questFactory, stageNum, context);
|
QuestsEditorPostOpenCreateStagePromptEvent event
|
||||||
|
= new QuestsEditorPostOpenCreateStagePromptEvent(questFactory, stageNum, context);
|
||||||
plugin.getServer().getPluginManager().callEvent(event);
|
plugin.getServer().getPluginManager().callEvent(event);
|
||||||
|
|
||||||
String text = ChatColor.LIGHT_PURPLE + "- " + ChatColor.AQUA + getTitle(context).replaceFirst(" \\| ", ChatColor.LIGHT_PURPLE + " | ") + " -\n";
|
String text = ChatColor.LIGHT_PURPLE + "- " + ChatColor.AQUA
|
||||||
|
+ getTitle(context).replaceFirst(" \\| ", ChatColor.LIGHT_PURPLE + " | ") + " -\n";
|
||||||
for (int i = 1; i <= size; i++) {
|
for (int i = 1; i <= size; i++) {
|
||||||
text += getNumberColor(context, i) + "" + ChatColor.BOLD + i + ChatColor.RESET + " - " + getSelectionText(context, i) + " " + getAdditionalText(context, i) + "\n";
|
text += getNumberColor(context, i) + "" + ChatColor.BOLD + i + ChatColor.RESET + " - "
|
||||||
|
+ getSelectionText(context, i) + " " + getAdditionalText(context, i) + "\n";
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
@ -466,18 +497,28 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void checkObjective(ConversationContext context) {
|
public void checkObjective(ConversationContext context) {
|
||||||
if (context.getSessionData(pref + CK.S_BREAK_NAMES) != null || context.getSessionData(pref + CK.S_DAMAGE_NAMES) != null
|
if (context.getSessionData(pref + CK.S_BREAK_NAMES) != null
|
||||||
|| context.getSessionData(pref + CK.S_PLACE_NAMES) != null || context.getSessionData(pref + CK.S_USE_NAMES) != null
|
|| context.getSessionData(pref + CK.S_DAMAGE_NAMES) != null
|
||||||
|
|| context.getSessionData(pref + CK.S_PLACE_NAMES) != null
|
||||||
|
|| context.getSessionData(pref + CK.S_USE_NAMES) != null
|
||||||
|| context.getSessionData(pref + CK.S_CUT_NAMES) != null) {
|
|| context.getSessionData(pref + CK.S_CUT_NAMES) != null) {
|
||||||
hasObjective = true;
|
hasObjective = true;
|
||||||
}
|
}
|
||||||
if (context.getSessionData(pref + CK.S_CRAFT_ITEMS) != null || context.getSessionData(pref + CK.S_SMELT_ITEMS) != null || context.getSessionData(pref + CK.S_ENCHANT_TYPES) != null || context.getSessionData(pref + CK.S_BREW_ITEMS) != null) {
|
if (context.getSessionData(pref + CK.S_CRAFT_ITEMS) != null
|
||||||
|
|| context.getSessionData(pref + CK.S_SMELT_ITEMS) != null
|
||||||
|
|| context.getSessionData(pref + CK.S_ENCHANT_TYPES) != null
|
||||||
|
|| context.getSessionData(pref + CK.S_BREW_ITEMS) != null) {
|
||||||
hasObjective = true;
|
hasObjective = true;
|
||||||
}
|
}
|
||||||
if (context.getSessionData(pref + CK.S_DELIVERY_NPCS) != null || context.getSessionData(pref + CK.S_NPCS_TO_TALK_TO) != null || context.getSessionData(pref + CK.S_NPCS_TO_KILL) != null) {
|
if (context.getSessionData(pref + CK.S_DELIVERY_NPCS) != null
|
||||||
|
|| context.getSessionData(pref + CK.S_NPCS_TO_TALK_TO) != null
|
||||||
|
|| context.getSessionData(pref + CK.S_NPCS_TO_KILL) != null) {
|
||||||
hasObjective = true;
|
hasObjective = true;
|
||||||
}
|
}
|
||||||
if (context.getSessionData(pref + CK.S_MOB_TYPES) != null || context.getSessionData(pref + CK.S_FISH) != null || context.getSessionData(pref + CK.S_TAME_TYPES) != null || context.getSessionData(pref + CK.S_SHEAR_COLORS) != null) {
|
if (context.getSessionData(pref + CK.S_MOB_TYPES) != null
|
||||||
|
|| context.getSessionData(pref + CK.S_FISH) != null
|
||||||
|
|| context.getSessionData(pref + CK.S_TAME_TYPES) != null
|
||||||
|
|| context.getSessionData(pref + CK.S_SHEAR_COLORS) != null) {
|
||||||
hasObjective = true;
|
hasObjective = true;
|
||||||
}
|
}
|
||||||
if (context.getSessionData(pref + CK.S_PLAYER_KILL) != null) {
|
if (context.getSessionData(pref + CK.S_PLAYER_KILL) != null) {
|
||||||
@ -504,19 +545,26 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
public String getPromptText(ConversationContext context) {
|
public String getPromptText(ConversationContext context) {
|
||||||
String text = ChatColor.GOLD + "- " + Lang.get("stageEditorPassword") + "-\n";
|
String text = ChatColor.GOLD + "- " + Lang.get("stageEditorPassword") + "-\n";
|
||||||
if (context.getSessionData(pref + CK.S_PASSWORD_DISPLAYS) == null) {
|
if (context.getSessionData(pref + CK.S_PASSWORD_DISPLAYS) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorAddPasswordDisplay") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
text += ChatColor.GRAY + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.GRAY + " - " + Lang.get("stageEditorAddPasswordPhrases") + " (" + Lang.get("noneSet") + ")\n";
|
+ Lang.get("stageEditorAddPasswordDisplay") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("clear") + "\n";
|
text += ChatColor.GRAY + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.GRAY + " - "
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("done");
|
+ Lang.get("stageEditorAddPasswordPhrases") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("clear") + "\n";
|
||||||
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("done");
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorAddPasswordDisplay") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorAddPasswordDisplay") + "\n";
|
||||||
for (String display : getPasswordDisplays(context)) {
|
for (String display : getPasswordDisplays(context)) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.AQUA + display + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.AQUA + display + "\n";
|
||||||
}
|
}
|
||||||
if (context.getSessionData(pref + CK.S_PASSWORD_PHRASES) == null) {
|
if (context.getSessionData(pref + CK.S_PASSWORD_PHRASES) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.BLUE + " - " + Lang.get("stageEditorAddPasswordPhrases") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.BLUE + " - "
|
||||||
|
+ Lang.get("stageEditorAddPasswordPhrases") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorAddPasswordPhrases") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorAddPasswordPhrases") + "\n";
|
||||||
for (LinkedList<String> phraseList : getPasswordPhrases(context)) {
|
for (LinkedList<String> phraseList : getPasswordPhrases(context)) {
|
||||||
text += ChatColor.GRAY + " - ";
|
text += ChatColor.GRAY + " - ";
|
||||||
for (String s : phraseList) {
|
for (String s : phraseList) {
|
||||||
@ -528,8 +576,10 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("clear") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("done");
|
+ Lang.get("clear") + "\n";
|
||||||
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("done");
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
@ -560,7 +610,8 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
one = 0;
|
one = 0;
|
||||||
}
|
}
|
||||||
if (context.getSessionData(pref + CK.S_PASSWORD_PHRASES) != null) {
|
if (context.getSessionData(pref + CK.S_PASSWORD_PHRASES) != null) {
|
||||||
two = ((LinkedList<LinkedList<String>>) context.getSessionData(pref + CK.S_PASSWORD_PHRASES)).size();
|
two = ((LinkedList<LinkedList<String>>) context.getSessionData(pref + CK.S_PASSWORD_PHRASES))
|
||||||
|
.size();
|
||||||
} else {
|
} else {
|
||||||
two = 0;
|
two = 0;
|
||||||
}
|
}
|
||||||
@ -626,7 +677,8 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false) {
|
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false) {
|
||||||
if (context.getSessionData(pref + CK.S_PASSWORD_PHRASES) != null) {
|
if (context.getSessionData(pref + CK.S_PASSWORD_PHRASES) != null) {
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
LinkedList<LinkedList<String>> phrases = (LinkedList<LinkedList<String>>) context.getSessionData(pref + CK.S_PASSWORD_PHRASES);
|
LinkedList<LinkedList<String>> phrases
|
||||||
|
= (LinkedList<LinkedList<String>>) context.getSessionData(pref + CK.S_PASSWORD_PHRASES);
|
||||||
LinkedList<String> newPhrases = new LinkedList<String>();
|
LinkedList<String> newPhrases = new LinkedList<String>();
|
||||||
newPhrases.addAll(Arrays.asList(input.split(Lang.get("charSemi"))));
|
newPhrases.addAll(Arrays.asList(input.split(Lang.get("charSemi"))));
|
||||||
phrases.add(newPhrases);
|
phrases.add(newPhrases);
|
||||||
@ -654,7 +706,8 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Prompt acceptInput(ConversationContext context, String input) {
|
public Prompt acceptInput(ConversationContext context, String input) {
|
||||||
if (input.equalsIgnoreCase(Lang.get("cmdClear")) == false && input.equalsIgnoreCase(Lang.get("cmdCancel")) == false) {
|
if (input.equalsIgnoreCase(Lang.get("cmdClear")) == false
|
||||||
|
&& input.equalsIgnoreCase(Lang.get("cmdCancel")) == false) {
|
||||||
context.setSessionData(pref + CK.S_OVERRIDE_DISPLAY, input);
|
context.setSessionData(pref + CK.S_OVERRIDE_DISPLAY, input);
|
||||||
} else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) {
|
} else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) {
|
||||||
context.setSessionData(pref + CK.S_OVERRIDE_DISPLAY, null);
|
context.setSessionData(pref + CK.S_OVERRIDE_DISPLAY, null);
|
||||||
@ -673,7 +726,8 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Prompt acceptInput(ConversationContext context, String input) {
|
public Prompt acceptInput(ConversationContext context, String input) {
|
||||||
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false && input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false
|
||||||
|
&& input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
||||||
try {
|
try {
|
||||||
int i = Integer.parseInt(input);
|
int i = Integer.parseInt(input);
|
||||||
if (i < 0) {
|
if (i < 0) {
|
||||||
@ -683,7 +737,8 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
context.setSessionData(pref + CK.S_PLAYER_KILL, i);
|
context.setSessionData(pref + CK.S_PLAYER_KILL, i);
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("reqNotANumber").replace("<input>", input));
|
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("reqNotANumber")
|
||||||
|
.replace("<input>", input));
|
||||||
return new KillPlayerPrompt();
|
return new KillPlayerPrompt();
|
||||||
}
|
}
|
||||||
} else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) {
|
} else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) {
|
||||||
@ -703,34 +758,46 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
public String getPromptText(ConversationContext context) {
|
public String getPromptText(ConversationContext context) {
|
||||||
String text = ChatColor.GOLD + "- " + Lang.get("stageEditorReachLocs") + " -\n";
|
String text = ChatColor.GOLD + "- " + Lang.get("stageEditorReachLocs") + " -\n";
|
||||||
if (context.getSessionData(pref + CK.S_REACH_LOCATIONS) == null) {
|
if (context.getSessionData(pref + CK.S_REACH_LOCATIONS) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetLocations") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
text += ChatColor.GRAY + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.GRAY + " - " + Lang.get("stageEditorSetLocationRadii") + " (" + Lang.get("noneSet") + ")\n";
|
+ Lang.get("stageEditorSetLocations") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
text += ChatColor.GRAY + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.GRAY + " - " + Lang.get("stageEditorSetLocationNames") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.GRAY + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.GRAY + " - "
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("clear") + "\n";
|
+ Lang.get("stageEditorSetLocationRadii") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "5" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("done");
|
text += ChatColor.GRAY + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.GRAY + " - "
|
||||||
|
+ Lang.get("stageEditorSetLocationNames") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("clear") + "\n";
|
||||||
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "5" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("done");
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetLocations") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorSetLocations") + "\n";
|
||||||
for (String s : getLocations(context)) {
|
for (String s : getLocations(context)) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.DARK_AQUA + s + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.DARK_AQUA + s + "\n";
|
||||||
}
|
}
|
||||||
if (context.getSessionData(pref + CK.S_REACH_LOCATIONS_RADIUS) == null) {
|
if (context.getSessionData(pref + CK.S_REACH_LOCATIONS_RADIUS) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.BLUE + " - " + Lang.get("stageEditorSetLocationRadii") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.BLUE + " - "
|
||||||
|
+ Lang.get("stageEditorSetLocationRadii") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetLocationRadii") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorSetLocationRadii") + "\n";
|
||||||
for (Integer i : getLocationRadii(context)) {
|
for (Integer i : getLocationRadii(context)) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.AQUA + i + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.AQUA + i + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (context.getSessionData(pref + CK.S_REACH_LOCATIONS_NAMES) == null) {
|
if (context.getSessionData(pref + CK.S_REACH_LOCATIONS_NAMES) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.BLUE + " - " + Lang.get("stageEditorSetLocationNames") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.BLUE + " - "
|
||||||
|
+ Lang.get("stageEditorSetLocationNames") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetLocationNames") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorSetLocationNames") + "\n";
|
||||||
for (String s : getLocationNames(context)) {
|
for (String s : getLocationNames(context)) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.AQUA + s + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.AQUA + s + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("clear") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "5" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("done");
|
+ Lang.get("clear") + "\n";
|
||||||
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "5" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("done");
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
@ -830,7 +897,7 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
} else {
|
} else {
|
||||||
locs = new LinkedList<String>();
|
locs = new LinkedList<String>();
|
||||||
}
|
}
|
||||||
locs.add(Quests.getLocationInfo(loc));
|
locs.add(ConfigUtil.getLocationInfo(loc));
|
||||||
context.setSessionData(pref + CK.S_REACH_LOCATIONS, locs);
|
context.setSessionData(pref + CK.S_REACH_LOCATIONS, locs);
|
||||||
Map<UUID, Block> temp = questFactory.getSelectedReachLocations();
|
Map<UUID, Block> temp = questFactory.getSelectedReachLocations();
|
||||||
temp.remove(player.getUniqueId());
|
temp.remove(player.getUniqueId());
|
||||||
@ -867,7 +934,8 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
try {
|
try {
|
||||||
int i = Integer.parseInt(s);
|
int i = Integer.parseInt(s);
|
||||||
if (i < 1) {
|
if (i < 1) {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidMinimum").replace("<number>", "1"));
|
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidMinimum")
|
||||||
|
.replace("<number>", "1"));
|
||||||
return new ReachRadiiPrompt();
|
return new ReachRadiiPrompt();
|
||||||
}
|
}
|
||||||
radii.add(i);
|
radii.add(i);
|
||||||
@ -911,46 +979,70 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
public String getPromptText(ConversationContext context) {
|
public String getPromptText(ConversationContext context) {
|
||||||
String text = ChatColor.AQUA + "- " + Lang.get("stageEditorStageEvents") + " -\n";
|
String text = ChatColor.AQUA + "- " + Lang.get("stageEditorStageEvents") + " -\n";
|
||||||
if (context.getSessionData(pref + CK.S_START_EVENT) == null) {
|
if (context.getSessionData(pref + CK.S_START_EVENT) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorStartEvent") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorStartEvent") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorStartEvent") + " (" + ChatColor.AQUA + ((String) context.getSessionData(pref + CK.S_START_EVENT)) + ChatColor.YELLOW + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorStartEvent") + " (" + ChatColor.AQUA
|
||||||
|
+ ((String) context.getSessionData(pref + CK.S_START_EVENT)) + ChatColor.YELLOW + ")\n";
|
||||||
}
|
}
|
||||||
if (context.getSessionData(pref + CK.S_FINISH_EVENT) == null) {
|
if (context.getSessionData(pref + CK.S_FINISH_EVENT) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorFinishEvent") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorFinishEvent") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorFinishEvent") + " (" + ChatColor.AQUA + ((String) context.getSessionData(pref + CK.S_FINISH_EVENT)) + ChatColor.YELLOW + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorFinishEvent") + " (" + ChatColor.AQUA
|
||||||
|
+ ((String) context.getSessionData(pref + CK.S_FINISH_EVENT)) + ChatColor.YELLOW + ")\n";
|
||||||
}
|
}
|
||||||
if (context.getSessionData(pref + CK.S_DEATH_EVENT) == null) {
|
if (context.getSessionData(pref + CK.S_DEATH_EVENT) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorDeathEvent") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorDeathEvent") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorDeathEvent") + " (" + ChatColor.AQUA + ((String) context.getSessionData(pref + CK.S_DEATH_EVENT)) + ChatColor.YELLOW + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorDeathEvent") + " (" + ChatColor.AQUA
|
||||||
|
+ ((String) context.getSessionData(pref + CK.S_DEATH_EVENT)) + ChatColor.YELLOW + ")\n";
|
||||||
}
|
}
|
||||||
if (context.getSessionData(pref + CK.S_DISCONNECT_EVENT) == null) {
|
if (context.getSessionData(pref + CK.S_DISCONNECT_EVENT) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorDisconnectEvent") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorDisconnectEvent") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorDisconnectEvent") + " (" + ChatColor.AQUA + ((String) context.getSessionData(pref + CK.S_DISCONNECT_EVENT)) + ChatColor.YELLOW + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorDisconnectEvent") + " (" + ChatColor.AQUA
|
||||||
|
+ ((String) context.getSessionData(pref + CK.S_DISCONNECT_EVENT)) + ChatColor.YELLOW + ")\n";
|
||||||
}
|
}
|
||||||
if (context.getSessionData(pref + CK.S_CHAT_EVENTS) == null) {
|
if (context.getSessionData(pref + CK.S_CHAT_EVENTS) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "5" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorChatEvents") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "5" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorChatEvents") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "5" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorChatEvents") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "5" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorChatEvents") + "\n";
|
||||||
LinkedList<String> chatEvents = (LinkedList<String>) context.getSessionData(pref + CK.S_CHAT_EVENTS);
|
LinkedList<String> chatEvents = (LinkedList<String>) context.getSessionData(pref + CK.S_CHAT_EVENTS);
|
||||||
LinkedList<String> chatEventTriggers = (LinkedList<String>) context.getSessionData(pref + CK.S_CHAT_EVENT_TRIGGERS);
|
LinkedList<String> chatEventTriggers
|
||||||
|
= (LinkedList<String>) context.getSessionData(pref + CK.S_CHAT_EVENT_TRIGGERS);
|
||||||
for (String event : chatEvents) {
|
for (String event : chatEvents) {
|
||||||
text += ChatColor.AQUA + " - " + event + ChatColor.BLUE + " (" + Lang.get("stageEditorTriggeredBy") + ": \"" + chatEventTriggers.get(chatEvents.indexOf(event)) + "\")\n";
|
text += ChatColor.AQUA + " - " + event + ChatColor.BLUE + " ("
|
||||||
|
+ Lang.get("stageEditorTriggeredBy") + ": \""
|
||||||
|
+ chatEventTriggers.get(chatEvents.indexOf(event)) + "\")\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (context.getSessionData(pref + CK.S_COMMAND_EVENTS) == null) {
|
if (context.getSessionData(pref + CK.S_COMMAND_EVENTS) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "6" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorCommandEvents") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "6" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorCommandEvents") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "6" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorCommandEvents") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "6" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
LinkedList<String> commandEvents = (LinkedList<String>) context.getSessionData(pref + CK.S_COMMAND_EVENTS);
|
+ Lang.get("stageEditorCommandEvents") + "\n";
|
||||||
LinkedList<String> commandEventTriggers = (LinkedList<String>) context.getSessionData(pref + CK.S_COMMAND_EVENT_TRIGGERS);
|
LinkedList<String> commandEvents
|
||||||
|
= (LinkedList<String>) context.getSessionData(pref + CK.S_COMMAND_EVENTS);
|
||||||
|
LinkedList<String> commandEventTriggers
|
||||||
|
= (LinkedList<String>) context.getSessionData(pref + CK.S_COMMAND_EVENT_TRIGGERS);
|
||||||
for (String event : commandEvents) {
|
for (String event : commandEvents) {
|
||||||
text += ChatColor.AQUA + " - " + event + ChatColor.BLUE + " (" + Lang.get("stageEditorTriggeredBy") + ": \"" + commandEventTriggers.get(commandEvents.indexOf(event)) + "\")\n";
|
text += ChatColor.AQUA + " - " + event + ChatColor.BLUE + " ("
|
||||||
|
+ Lang.get("stageEditorTriggeredBy") + ": \""
|
||||||
|
+ commandEventTriggers.get(commandEvents.indexOf(event)) + "\")\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
text += ChatColor.GREEN + "" + ChatColor.BOLD + "7" + ChatColor.RESET + ChatColor.BLUE + " - " + Lang.get("done");
|
text += ChatColor.GREEN + "" + ChatColor.BOLD + "7" + ChatColor.RESET + ChatColor.BLUE + " - "
|
||||||
|
+ Lang.get("done");
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -994,7 +1086,8 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
@Override
|
@Override
|
||||||
public Prompt acceptInput(ConversationContext context, String input) {
|
public Prompt acceptInput(ConversationContext context, String input) {
|
||||||
Player player = (Player) context.getForWhom();
|
Player player = (Player) context.getForWhom();
|
||||||
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false && input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false
|
||||||
|
&& input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
||||||
Action found = null;
|
Action found = null;
|
||||||
for (Action e : plugin.getActions()) {
|
for (Action e : plugin.getActions()) {
|
||||||
if (e.getName().equalsIgnoreCase(input)) {
|
if (e.getName().equalsIgnoreCase(input)) {
|
||||||
@ -1003,7 +1096,8 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (found == null) {
|
if (found == null) {
|
||||||
player.sendMessage(ChatColor.RED + input + ChatColor.YELLOW + " " + Lang.get("stageEditorInvalidEvent"));
|
player.sendMessage(ChatColor.RED + input + ChatColor.YELLOW + " "
|
||||||
|
+ Lang.get("stageEditorInvalidEvent"));
|
||||||
return new StartEventPrompt();
|
return new StartEventPrompt();
|
||||||
} else {
|
} else {
|
||||||
context.setSessionData(pref + CK.S_START_EVENT, found.getName());
|
context.setSessionData(pref + CK.S_START_EVENT, found.getName());
|
||||||
@ -1039,7 +1133,8 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
@Override
|
@Override
|
||||||
public Prompt acceptInput(ConversationContext context, String input) {
|
public Prompt acceptInput(ConversationContext context, String input) {
|
||||||
Player player = (Player) context.getForWhom();
|
Player player = (Player) context.getForWhom();
|
||||||
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false && input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false
|
||||||
|
&& input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
||||||
Action found = null;
|
Action found = null;
|
||||||
for (Action e : plugin.getActions()) {
|
for (Action e : plugin.getActions()) {
|
||||||
if (e.getName().equalsIgnoreCase(input)) {
|
if (e.getName().equalsIgnoreCase(input)) {
|
||||||
@ -1048,7 +1143,8 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (found == null) {
|
if (found == null) {
|
||||||
player.sendMessage(ChatColor.RED + input + ChatColor.YELLOW + " " + Lang.get("stageEditorInvalidEvent"));
|
player.sendMessage(ChatColor.RED + input + ChatColor.YELLOW + " "
|
||||||
|
+ Lang.get("stageEditorInvalidEvent"));
|
||||||
return new FinishEventPrompt();
|
return new FinishEventPrompt();
|
||||||
} else {
|
} else {
|
||||||
context.setSessionData(pref + CK.S_FINISH_EVENT, found.getName());
|
context.setSessionData(pref + CK.S_FINISH_EVENT, found.getName());
|
||||||
@ -1084,7 +1180,8 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
@Override
|
@Override
|
||||||
public Prompt acceptInput(ConversationContext context, String input) {
|
public Prompt acceptInput(ConversationContext context, String input) {
|
||||||
Player player = (Player) context.getForWhom();
|
Player player = (Player) context.getForWhom();
|
||||||
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false && input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false
|
||||||
|
&& input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
||||||
Action found = null;
|
Action found = null;
|
||||||
for (Action e : plugin.getActions()) {
|
for (Action e : plugin.getActions()) {
|
||||||
if (e.getName().equalsIgnoreCase(input)) {
|
if (e.getName().equalsIgnoreCase(input)) {
|
||||||
@ -1093,7 +1190,8 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (found == null) {
|
if (found == null) {
|
||||||
player.sendMessage(ChatColor.RED + input + ChatColor.YELLOW + " " + Lang.get("stageEditorInvalidEvent"));
|
player.sendMessage(ChatColor.RED + input + ChatColor.YELLOW + " "
|
||||||
|
+ Lang.get("stageEditorInvalidEvent"));
|
||||||
return new DeathEventPrompt();
|
return new DeathEventPrompt();
|
||||||
} else {
|
} else {
|
||||||
context.setSessionData(pref + CK.S_DEATH_EVENT, found.getName());
|
context.setSessionData(pref + CK.S_DEATH_EVENT, found.getName());
|
||||||
@ -1129,7 +1227,8 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
@Override
|
@Override
|
||||||
public Prompt acceptInput(ConversationContext context, String input) {
|
public Prompt acceptInput(ConversationContext context, String input) {
|
||||||
Player player = (Player) context.getForWhom();
|
Player player = (Player) context.getForWhom();
|
||||||
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false && input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false
|
||||||
|
&& input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
||||||
Action found = null;
|
Action found = null;
|
||||||
for (Action e : plugin.getActions()) {
|
for (Action e : plugin.getActions()) {
|
||||||
if (e.getName().equalsIgnoreCase(input)) {
|
if (e.getName().equalsIgnoreCase(input)) {
|
||||||
@ -1138,7 +1237,8 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (found == null) {
|
if (found == null) {
|
||||||
player.sendMessage(ChatColor.RED + input + ChatColor.YELLOW + " " + Lang.get("stageEditorInvalidEvent"));
|
player.sendMessage(ChatColor.RED + input + ChatColor.YELLOW + " "
|
||||||
|
+ Lang.get("stageEditorInvalidEvent"));
|
||||||
return new DisconnectEventPrompt();
|
return new DisconnectEventPrompt();
|
||||||
} else {
|
} else {
|
||||||
context.setSessionData(pref + CK.S_DISCONNECT_EVENT, found.getName());
|
context.setSessionData(pref + CK.S_DISCONNECT_EVENT, found.getName());
|
||||||
@ -1174,7 +1274,8 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
@Override
|
@Override
|
||||||
public Prompt acceptInput(ConversationContext context, String input) {
|
public Prompt acceptInput(ConversationContext context, String input) {
|
||||||
Player player = (Player) context.getForWhom();
|
Player player = (Player) context.getForWhom();
|
||||||
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false && input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false
|
||||||
|
&& input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
||||||
Action found = null;
|
Action found = null;
|
||||||
for (Action e : plugin.getActions()) {
|
for (Action e : plugin.getActions()) {
|
||||||
if (e.getName().equalsIgnoreCase(input)) {
|
if (e.getName().equalsIgnoreCase(input)) {
|
||||||
@ -1183,7 +1284,8 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (found == null) {
|
if (found == null) {
|
||||||
player.sendMessage(ChatColor.RED + input + ChatColor.YELLOW + " " + Lang.get("stageEditorInvalidEvent"));
|
player.sendMessage(ChatColor.RED + input + ChatColor.YELLOW + " "
|
||||||
|
+ Lang.get("stageEditorInvalidEvent"));
|
||||||
return new ChatEventPrompt();
|
return new ChatEventPrompt();
|
||||||
} else {
|
} else {
|
||||||
context.setSessionData(pref + CK.S_CHAT_TEMP_EVENT, found.getName());
|
context.setSessionData(pref + CK.S_CHAT_TEMP_EVENT, found.getName());
|
||||||
@ -1208,7 +1310,8 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
public String getPromptText(ConversationContext context) {
|
public String getPromptText(ConversationContext context) {
|
||||||
String tempEvent = (String) context.getSessionData(pref + CK.S_CHAT_TEMP_EVENT);
|
String tempEvent = (String) context.getSessionData(pref + CK.S_CHAT_TEMP_EVENT);
|
||||||
String text = ChatColor.GOLD + "- " + Lang.get("stageEditorChatTrigger") + " -\n";
|
String text = ChatColor.GOLD + "- " + Lang.get("stageEditorChatTrigger") + " -\n";
|
||||||
text += Lang.get("stageEditorChatEventsTriggerPrompt").replace("<event>", tempEvent).replace("<action>", tempEvent);
|
text += Lang.get("stageEditorChatEventsTriggerPrompt").replace("<event>", tempEvent)
|
||||||
|
.replace("<action>", tempEvent);
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1226,8 +1329,10 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
context.setSessionData(pref + CK.S_CHAT_EVENT_TRIGGERS, chatEventTriggers);
|
context.setSessionData(pref + CK.S_CHAT_EVENT_TRIGGERS, chatEventTriggers);
|
||||||
return new EventListPrompt();
|
return new EventListPrompt();
|
||||||
} else {
|
} else {
|
||||||
LinkedList<String> chatEvents = (LinkedList<String>) context.getSessionData(pref + CK.S_CHAT_EVENTS);
|
LinkedList<String> chatEvents
|
||||||
LinkedList<String> chatEventTriggers = (LinkedList<String>) context.getSessionData(pref + CK.S_CHAT_EVENT_TRIGGERS);
|
= (LinkedList<String>) context.getSessionData(pref + CK.S_CHAT_EVENTS);
|
||||||
|
LinkedList<String> chatEventTriggers
|
||||||
|
= (LinkedList<String>) context.getSessionData(pref + CK.S_CHAT_EVENT_TRIGGERS);
|
||||||
String event = (String) context.getSessionData(pref + CK.S_CHAT_TEMP_EVENT);
|
String event = (String) context.getSessionData(pref + CK.S_CHAT_TEMP_EVENT);
|
||||||
chatEvents.add(event);
|
chatEvents.add(event);
|
||||||
chatEventTriggers.add(input.trim());
|
chatEventTriggers.add(input.trim());
|
||||||
@ -1261,7 +1366,8 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
@Override
|
@Override
|
||||||
public Prompt acceptInput(ConversationContext context, String input) {
|
public Prompt acceptInput(ConversationContext context, String input) {
|
||||||
Player player = (Player) context.getForWhom();
|
Player player = (Player) context.getForWhom();
|
||||||
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false && input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false
|
||||||
|
&& input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
||||||
Action found = null;
|
Action found = null;
|
||||||
for (Action e : plugin.getActions()) {
|
for (Action e : plugin.getActions()) {
|
||||||
if (e.getName().equalsIgnoreCase(input)) {
|
if (e.getName().equalsIgnoreCase(input)) {
|
||||||
@ -1270,7 +1376,8 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (found == null) {
|
if (found == null) {
|
||||||
player.sendMessage(ChatColor.RED + input + ChatColor.YELLOW + " " + Lang.get("stageEditorInvalidEvent"));
|
player.sendMessage(ChatColor.RED + input + ChatColor.YELLOW + " "
|
||||||
|
+ Lang.get("stageEditorInvalidEvent"));
|
||||||
return new CommandEventPrompt();
|
return new CommandEventPrompt();
|
||||||
} else {
|
} else {
|
||||||
context.setSessionData(pref + CK.S_COMMAND_TEMP_EVENT, found.getName());
|
context.setSessionData(pref + CK.S_COMMAND_TEMP_EVENT, found.getName());
|
||||||
@ -1295,7 +1402,8 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
public String getPromptText(ConversationContext context) {
|
public String getPromptText(ConversationContext context) {
|
||||||
String tempEvent = (String) context.getSessionData(pref + CK.S_COMMAND_TEMP_EVENT);
|
String tempEvent = (String) context.getSessionData(pref + CK.S_COMMAND_TEMP_EVENT);
|
||||||
String text = ChatColor.GOLD + "- " + Lang.get("stageEditorCommandTrigger") + " -\n";
|
String text = ChatColor.GOLD + "- " + Lang.get("stageEditorCommandTrigger") + " -\n";
|
||||||
text += Lang.get("stageEditorCommandEventsTriggerPrompt").replace("<event>", tempEvent).replace("<action>", tempEvent);
|
text += Lang.get("stageEditorCommandEventsTriggerPrompt").replace("<event>", tempEvent)
|
||||||
|
.replace("<action>", tempEvent);
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1313,8 +1421,10 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
context.setSessionData(pref + CK.S_COMMAND_EVENT_TRIGGERS, commandEventTriggers);
|
context.setSessionData(pref + CK.S_COMMAND_EVENT_TRIGGERS, commandEventTriggers);
|
||||||
return new EventListPrompt();
|
return new EventListPrompt();
|
||||||
} else {
|
} else {
|
||||||
LinkedList<String> commandEvents = (LinkedList<String>) context.getSessionData(pref + CK.S_COMMAND_EVENTS);
|
LinkedList<String> commandEvents
|
||||||
LinkedList<String> commandEventTriggers = (LinkedList<String>) context.getSessionData(pref + CK.S_COMMAND_EVENT_TRIGGERS);
|
= (LinkedList<String>) context.getSessionData(pref + CK.S_COMMAND_EVENTS);
|
||||||
|
LinkedList<String> commandEventTriggers
|
||||||
|
= (LinkedList<String>) context.getSessionData(pref + CK.S_COMMAND_EVENT_TRIGGERS);
|
||||||
String event = (String) context.getSessionData(pref + CK.S_COMMAND_TEMP_EVENT);
|
String event = (String) context.getSessionData(pref + CK.S_COMMAND_TEMP_EVENT);
|
||||||
commandEvents.add(event);
|
commandEvents.add(event);
|
||||||
commandEventTriggers.add(input.trim());
|
commandEventTriggers.add(input.trim());
|
||||||
@ -1376,7 +1486,8 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
@Override
|
@Override
|
||||||
public Prompt acceptInput(ConversationContext context, String input) {
|
public Prompt acceptInput(ConversationContext context, String input) {
|
||||||
Player player = (Player) context.getForWhom();
|
Player player = (Player) context.getForWhom();
|
||||||
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false && input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false
|
||||||
|
&& input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
||||||
context.setSessionData(pref + CK.S_DELAY_MESSAGE, input);
|
context.setSessionData(pref + CK.S_DELAY_MESSAGE, input);
|
||||||
return new CreateStagePrompt(plugin, stageNum, questFactory);
|
return new CreateStagePrompt(plugin, stageNum, questFactory);
|
||||||
} else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) {
|
} else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) {
|
||||||
@ -1403,7 +1514,8 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
@Override
|
@Override
|
||||||
public Prompt acceptInput(ConversationContext context, String input) {
|
public Prompt acceptInput(ConversationContext context, String input) {
|
||||||
Player player = (Player) context.getForWhom();
|
Player player = (Player) context.getForWhom();
|
||||||
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false && input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false
|
||||||
|
&& input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
||||||
if (plugin.getDependencies().getDenizenAPI().containsScript(input)) {
|
if (plugin.getDependencies().getDenizenAPI().containsScript(input)) {
|
||||||
context.setSessionData(pref + CK.S_DENIZEN, input.toUpperCase());
|
context.setSessionData(pref + CK.S_DENIZEN, input.toUpperCase());
|
||||||
return new CreateStagePrompt(plugin, stageNum, questFactory);
|
return new CreateStagePrompt(plugin, stageNum, questFactory);
|
||||||
@ -1425,9 +1537,13 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getPromptText(ConversationContext context) {
|
public String getPromptText(ConversationContext context) {
|
||||||
String text = ChatColor.GREEN + "" + ChatColor.BOLD + "1" + ChatColor.RESET + "" + ChatColor.GREEN + " - " + Lang.get("yesWord") + "\n";
|
String text = ChatColor.GREEN + "" + ChatColor.BOLD + "1" + ChatColor.RESET + "" + ChatColor.GREEN + " - "
|
||||||
text += ChatColor.RED + "" + ChatColor.BOLD + "2" + ChatColor.RESET + "" + ChatColor.RED + " - " + Lang.get("noWord");
|
+ Lang.get("yesWord") + "\n";
|
||||||
return ChatColor.RED + Lang.get("confirmDelete") + " (" + ChatColor.YELLOW + Lang.get("stageEditorStage") + " " + stageNum + ChatColor.RED + ")\n" + ChatColor.GOLD + "(" + Lang.get("stageEditorConfirmStageNote") + ")\n" + text;
|
text += ChatColor.RED + "" + ChatColor.BOLD + "2" + ChatColor.RESET + "" + ChatColor.RED + " - "
|
||||||
|
+ Lang.get("noWord");
|
||||||
|
return ChatColor.RED + Lang.get("confirmDelete") + " (" + ChatColor.YELLOW + Lang.get("stageEditorStage")
|
||||||
|
+ " " + stageNum + ChatColor.RED + ")\n" + ChatColor.GOLD + "("
|
||||||
|
+ Lang.get("stageEditorConfirmStageNote") + ")\n" + text;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -1456,7 +1572,8 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
@Override
|
@Override
|
||||||
public Prompt acceptInput(ConversationContext context, String input) {
|
public Prompt acceptInput(ConversationContext context, String input) {
|
||||||
Player player = (Player) context.getForWhom();
|
Player player = (Player) context.getForWhom();
|
||||||
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false && input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false
|
||||||
|
&& input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
||||||
context.setSessionData(pref + CK.S_START_MESSAGE, input);
|
context.setSessionData(pref + CK.S_START_MESSAGE, input);
|
||||||
return new CreateStagePrompt(plugin, stageNum, questFactory);
|
return new CreateStagePrompt(plugin, stageNum, questFactory);
|
||||||
} else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) {
|
} else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) {
|
||||||
@ -1479,7 +1596,8 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
@Override
|
@Override
|
||||||
public Prompt acceptInput(ConversationContext context, String input) {
|
public Prompt acceptInput(ConversationContext context, String input) {
|
||||||
Player player = (Player) context.getForWhom();
|
Player player = (Player) context.getForWhom();
|
||||||
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false && input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false
|
||||||
|
&& input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
||||||
context.setSessionData(pref + CK.S_COMPLETE_MESSAGE, input);
|
context.setSessionData(pref + CK.S_COMPLETE_MESSAGE, input);
|
||||||
return new CreateStagePrompt(plugin, stageNum, questFactory);
|
return new CreateStagePrompt(plugin, stageNum, questFactory);
|
||||||
} else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) {
|
} else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) {
|
||||||
@ -1510,7 +1628,8 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public Prompt acceptInput(ConversationContext context, String input) {
|
public Prompt acceptInput(ConversationContext context, String input) {
|
||||||
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false && input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false
|
||||||
|
&& input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
||||||
CustomObjective found = null;
|
CustomObjective found = null;
|
||||||
// Check if we have a custom objective with the specified name
|
// Check if we have a custom objective with the specified name
|
||||||
for (CustomObjective co : plugin.getCustomObjectives()) {
|
for (CustomObjective co : plugin.getCustomObjectives()) {
|
||||||
@ -1531,9 +1650,12 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
if (found != null) {
|
if (found != null) {
|
||||||
if (context.getSessionData(pref + CK.S_CUSTOM_OBJECTIVES) != null) {
|
if (context.getSessionData(pref + CK.S_CUSTOM_OBJECTIVES) != null) {
|
||||||
// The custom objective may already have been added, so let's check that
|
// The custom objective may already have been added, so let's check that
|
||||||
LinkedList<String> list = (LinkedList<String>) context.getSessionData(pref + CK.S_CUSTOM_OBJECTIVES);
|
LinkedList<String> list
|
||||||
LinkedList<Entry<String, Object>> datamapList = (LinkedList<Entry<String, Object>>) context.getSessionData(pref + CK.S_CUSTOM_OBJECTIVES_DATA);
|
= (LinkedList<String>) context.getSessionData(pref + CK.S_CUSTOM_OBJECTIVES);
|
||||||
LinkedList<Integer> countList = (LinkedList<Integer>) context.getSessionData(pref + CK.S_CUSTOM_OBJECTIVES_COUNT);
|
LinkedList<Entry<String, Object>> datamapList = (LinkedList<Entry<String, Object>>) context
|
||||||
|
.getSessionData(pref + CK.S_CUSTOM_OBJECTIVES_DATA);
|
||||||
|
LinkedList<Integer> countList
|
||||||
|
= (LinkedList<Integer>) context.getSessionData(pref + CK.S_CUSTOM_OBJECTIVES_COUNT);
|
||||||
if (list.contains(found.getName()) == false) {
|
if (list.contains(found.getName()) == false) {
|
||||||
// Hasn't been added yet, so let's do it
|
// Hasn't been added yet, so let's do it
|
||||||
list.add(found.getName());
|
list.add(found.getName());
|
||||||
@ -1543,7 +1665,8 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
context.setSessionData(pref + CK.S_CUSTOM_OBJECTIVES_DATA, datamapList);
|
context.setSessionData(pref + CK.S_CUSTOM_OBJECTIVES_DATA, datamapList);
|
||||||
} else {
|
} else {
|
||||||
// Already added, so inform user
|
// Already added, so inform user
|
||||||
context.getForWhom().sendRawMessage(ChatColor.YELLOW + Lang.get("stageEditorCustomAlreadyAdded"));
|
context.getForWhom().sendRawMessage(ChatColor.YELLOW
|
||||||
|
+ Lang.get("stageEditorCustomAlreadyAdded"));
|
||||||
return new CustomObjectivesPrompt();
|
return new CustomObjectivesPrompt();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -1563,7 +1686,8 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
return new CustomObjectiveCountPrompt();
|
return new CustomObjectiveCountPrompt();
|
||||||
}
|
}
|
||||||
if (found.getData().isEmpty() == false) {
|
if (found.getData().isEmpty() == false) {
|
||||||
context.setSessionData(pref + CK.S_CUSTOM_OBJECTIVES_DATA_DESCRIPTIONS, found.getDescriptions());
|
context.setSessionData(pref + CK.S_CUSTOM_OBJECTIVES_DATA_DESCRIPTIONS, found
|
||||||
|
.getDescriptions());
|
||||||
return new ObjectiveCustomDataListPrompt();
|
return new ObjectiveCustomDataListPrompt();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -1607,7 +1731,8 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
public Prompt acceptInput(ConversationContext context, String input) {
|
public Prompt acceptInput(ConversationContext context, String input) {
|
||||||
try {
|
try {
|
||||||
int num = Integer.parseInt(input);
|
int num = Integer.parseInt(input);
|
||||||
LinkedList<Integer> counts = (LinkedList<Integer>) context.getSessionData(pref + CK.S_CUSTOM_OBJECTIVES_COUNT);
|
LinkedList<Integer> counts
|
||||||
|
= (LinkedList<Integer>) context.getSessionData(pref + CK.S_CUSTOM_OBJECTIVES_COUNT);
|
||||||
counts.set(counts.size() - 1, num);
|
counts.set(counts.size() - 1, num);
|
||||||
LinkedList<String> list = (LinkedList<String>) context.getSessionData(pref + CK.S_CUSTOM_OBJECTIVES);
|
LinkedList<String> list = (LinkedList<String>) context.getSessionData(pref + CK.S_CUSTOM_OBJECTIVES);
|
||||||
String objName = list.getLast();
|
String objName = list.getLast();
|
||||||
@ -1625,7 +1750,8 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
return new CreateStagePrompt(plugin, stageNum, questFactory);
|
return new CreateStagePrompt(plugin, stageNum, questFactory);
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("reqNotANumber").replace("<input>", input));
|
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("reqNotANumber")
|
||||||
|
.replace("<input>", input));
|
||||||
return new CustomObjectiveCountPrompt();
|
return new CustomObjectiveCountPrompt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1638,7 +1764,8 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
public String getPromptText(ConversationContext context) {
|
public String getPromptText(ConversationContext context) {
|
||||||
String text = ChatColor.AQUA + "- ";
|
String text = ChatColor.AQUA + "- ";
|
||||||
LinkedList<String> list = (LinkedList<String>) context.getSessionData(pref + CK.S_CUSTOM_OBJECTIVES);
|
LinkedList<String> list = (LinkedList<String>) context.getSessionData(pref + CK.S_CUSTOM_OBJECTIVES);
|
||||||
LinkedList<Entry<String, Object>> datamapList = (LinkedList<Entry<String, Object>>) context.getSessionData(pref + CK.S_CUSTOM_OBJECTIVES_DATA);
|
LinkedList<Entry<String, Object>> datamapList
|
||||||
|
= (LinkedList<Entry<String, Object>>) context.getSessionData(pref + CK.S_CUSTOM_OBJECTIVES_DATA);
|
||||||
String objName = list.getLast();
|
String objName = list.getLast();
|
||||||
CustomObjective found = null;
|
CustomObjective found = null;
|
||||||
for (CustomObjective co : plugin.getCustomObjectives()) {
|
for (CustomObjective co : plugin.getCustomObjectives()) {
|
||||||
@ -1655,7 +1782,8 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
for (Entry<String, Object> datamap : found.getData()) {
|
for (Entry<String, Object> datamap : found.getData()) {
|
||||||
for (Entry<String, Object> currentData : datamapList) {
|
for (Entry<String, Object> currentData : datamapList) {
|
||||||
if (currentData.getKey().equals(datamap.getKey())) {
|
if (currentData.getKey().equals(datamap.getKey())) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + index + ChatColor.RESET + ChatColor.YELLOW + " - " + datamap.getKey();
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + index + ChatColor.RESET + ChatColor.YELLOW
|
||||||
|
+ " - " + datamap.getKey();
|
||||||
if (currentData.getValue() != null) {
|
if (currentData.getValue() != null) {
|
||||||
text += ChatColor.GREEN + " (" + currentData.getValue().toString() + ")\n";
|
text += ChatColor.GREEN + " (" + currentData.getValue().toString() + ")\n";
|
||||||
} else {
|
} else {
|
||||||
@ -1706,7 +1834,8 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
context.setSessionData(pref + CK.S_CUSTOM_OBJECTIVES_DATA_TEMP, selectedKey);
|
context.setSessionData(pref + CK.S_CUSTOM_OBJECTIVES_DATA_TEMP, selectedKey);
|
||||||
return new ObjectiveCustomDataPrompt();
|
return new ObjectiveCustomDataPrompt();
|
||||||
} else {
|
} else {
|
||||||
for (Entry<String, Object> datamap : (LinkedList<Entry<String, Object>>) context.getSessionData(pref + CK.S_CUSTOM_OBJECTIVES_DATA)) {
|
for (Entry<String, Object> datamap : (LinkedList<Entry<String, Object>>) context.getSessionData(pref
|
||||||
|
+ CK.S_CUSTOM_OBJECTIVES_DATA)) {
|
||||||
if (datamap.getValue() == null) {
|
if (datamap.getValue() == null) {
|
||||||
return new ObjectiveCustomDataListPrompt();
|
return new ObjectiveCustomDataListPrompt();
|
||||||
}
|
}
|
||||||
@ -1724,7 +1853,8 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
String text = "";
|
String text = "";
|
||||||
String temp = (String) context.getSessionData(pref + CK.S_CUSTOM_OBJECTIVES_DATA_TEMP);
|
String temp = (String) context.getSessionData(pref + CK.S_CUSTOM_OBJECTIVES_DATA_TEMP);
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
Map<String, String> descriptions = (Map<String, String>) context.getSessionData(pref + CK.S_CUSTOM_OBJECTIVES_DATA_DESCRIPTIONS);
|
Map<String, String> descriptions
|
||||||
|
= (Map<String, String>) context.getSessionData(pref + CK.S_CUSTOM_OBJECTIVES_DATA_DESCRIPTIONS);
|
||||||
if (descriptions.get(temp) != null) {
|
if (descriptions.get(temp) != null) {
|
||||||
text += ChatColor.GOLD + descriptions.get(temp) + "\n";
|
text += ChatColor.GOLD + descriptions.get(temp) + "\n";
|
||||||
}
|
}
|
||||||
@ -1737,7 +1867,8 @@ public class CreateStagePrompt extends NumericPrompt {
|
|||||||
@Override
|
@Override
|
||||||
public Prompt acceptInput(ConversationContext context, String input) {
|
public Prompt acceptInput(ConversationContext context, String input) {
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
LinkedList<Entry<String, Object>> datamapList = (LinkedList<Entry<String, Object>>) context.getSessionData(pref + CK.S_CUSTOM_OBJECTIVES_DATA);
|
LinkedList<Entry<String, Object>> datamapList
|
||||||
|
= (LinkedList<Entry<String, Object>>) context.getSessionData(pref + CK.S_CUSTOM_OBJECTIVES_DATA);
|
||||||
LinkedList<Entry<String, Object>> promptList = new LinkedList<Entry<String, Object>>();
|
LinkedList<Entry<String, Object>> promptList = new LinkedList<Entry<String, Object>>();
|
||||||
String temp = (String) context.getSessionData(pref + CK.S_CUSTOM_OBJECTIVES_DATA_TEMP);
|
String temp = (String) context.getSessionData(pref + CK.S_CUSTOM_OBJECTIVES_DATA_TEMP);
|
||||||
for (Entry<String, Object> datamap : datamapList) {
|
for (Entry<String, Object> datamap : datamapList) {
|
||||||
|
@ -67,8 +67,9 @@ public class DateTimePrompt extends FixedSetPrompt {
|
|||||||
if (cc.getSessionData("tempSecond") == null) {
|
if (cc.getSessionData("tempSecond") == null) {
|
||||||
cc.setSessionData("tempSecond", cal.get(Calendar.SECOND));
|
cc.setSessionData("tempSecond", cal.get(Calendar.SECOND));
|
||||||
}
|
}
|
||||||
cal.set((Integer) cc.getSessionData("tempYear"), (Integer) cc.getSessionData("tempMonth"), (Integer) cc.getSessionData("tempDay"),
|
cal.set((Integer) cc.getSessionData("tempYear"), (Integer) cc.getSessionData("tempMonth"),
|
||||||
(Integer) cc.getSessionData("tempHour"), (Integer) cc.getSessionData("tempMinute"), (Integer) cc.getSessionData("tempSecond"));
|
(Integer) cc.getSessionData("tempDay"), (Integer) cc.getSessionData("tempHour"),
|
||||||
|
(Integer) cc.getSessionData("tempMinute"), (Integer) cc.getSessionData("tempSecond"));
|
||||||
dateData += ChatColor.DARK_AQUA + dateFormat.format(cal.getTime()) + " ";
|
dateData += ChatColor.DARK_AQUA + dateFormat.format(cal.getTime()) + " ";
|
||||||
dateData += ChatColor.AQUA + timeFormat.format(cal.getTime()) + " ";
|
dateData += ChatColor.AQUA + timeFormat.format(cal.getTime()) + " ";
|
||||||
|
|
||||||
@ -82,21 +83,31 @@ public class DateTimePrompt extends FixedSetPrompt {
|
|||||||
Double hour = (double) (cal.getTimeZone().getRawOffset() / 60 / 60 / 1000);
|
Double hour = (double) (cal.getTimeZone().getRawOffset() / 60 / 60 / 1000);
|
||||||
String[] sep = String.valueOf(hour).replace("-", "").split("\\.");
|
String[] sep = String.valueOf(hour).replace("-", "").split("\\.");
|
||||||
DecimalFormat zoneFormat = new DecimalFormat("00");
|
DecimalFormat zoneFormat = new DecimalFormat("00");
|
||||||
dateData += ChatColor.LIGHT_PURPLE + "UTC" + (hour < 0 ? "-":"+") + zoneFormat.format(Integer.valueOf(sep[0])) + ":" + zoneFormat.format(Integer.valueOf(sep[1]))
|
dateData += ChatColor.LIGHT_PURPLE + "UTC" + (hour < 0 ? "-":"+") + zoneFormat.format(Integer.valueOf(sep[0]))
|
||||||
+ ChatColor.GREEN + " (" + cal.getTimeZone().getDisplayName(loc) + ")";
|
+ ":" + zoneFormat.format(Integer.valueOf(sep[1])) + ChatColor.GREEN + " ("
|
||||||
|
+ cal.getTimeZone().getDisplayName(loc) + ")";
|
||||||
if (dateData != null) {
|
if (dateData != null) {
|
||||||
menu += dateData + "\n";
|
menu += dateData + "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
menu += ChatColor.YELLOW + "" + ChatColor.BOLD + "1. " + ChatColor.RESET + "" + ChatColor.GOLD + Lang.get("timeDay") + "\n";
|
menu += ChatColor.YELLOW + "" + ChatColor.BOLD + "1. " + ChatColor.RESET + "" + ChatColor.GOLD
|
||||||
menu += ChatColor.YELLOW + "" + ChatColor.BOLD + "2. " + ChatColor.RESET + "" + ChatColor.GOLD + Lang.get("timeMonth") + "\n";
|
+ Lang.get("timeDay") + "\n";
|
||||||
menu += ChatColor.YELLOW + "" + ChatColor.BOLD + "3. " + ChatColor.RESET + "" + ChatColor.GOLD + Lang.get("timeYear") + "\n";
|
menu += ChatColor.YELLOW + "" + ChatColor.BOLD + "2. " + ChatColor.RESET + "" + ChatColor.GOLD
|
||||||
menu += ChatColor.YELLOW + "" + ChatColor.BOLD + "4. " + ChatColor.RESET + "" + ChatColor.GOLD + Lang.get("timeHour") + "\n";
|
+ Lang.get("timeMonth") + "\n";
|
||||||
menu += ChatColor.YELLOW + "" + ChatColor.BOLD + "5. " + ChatColor.RESET + "" + ChatColor.GOLD + Lang.get("timeMinute") + "\n";
|
menu += ChatColor.YELLOW + "" + ChatColor.BOLD + "3. " + ChatColor.RESET + "" + ChatColor.GOLD
|
||||||
menu += ChatColor.YELLOW + "" + ChatColor.BOLD + "6. " + ChatColor.RESET + "" + ChatColor.GOLD + Lang.get("timeSecond") + "\n";
|
+ Lang.get("timeYear") + "\n";
|
||||||
menu += ChatColor.YELLOW + "" + ChatColor.BOLD + "7. " + ChatColor.RESET + "" + ChatColor.GOLD + Lang.get("timeZone") + "\n";
|
menu += ChatColor.YELLOW + "" + ChatColor.BOLD + "4. " + ChatColor.RESET + "" + ChatColor.GOLD
|
||||||
menu += ChatColor.YELLOW + "" + ChatColor.BOLD + "8. " + ChatColor.RESET + "" + ChatColor.RED + Lang.get("cancel") + "\n";
|
+ Lang.get("timeHour") + "\n";
|
||||||
menu += ChatColor.YELLOW + "" + ChatColor.BOLD + "9. " + ChatColor.RESET + "" + ChatColor.GREEN + Lang.get("done") + "\n";
|
menu += ChatColor.YELLOW + "" + ChatColor.BOLD + "5. " + ChatColor.RESET + "" + ChatColor.GOLD
|
||||||
|
+ Lang.get("timeMinute") + "\n";
|
||||||
|
menu += ChatColor.YELLOW + "" + ChatColor.BOLD + "6. " + ChatColor.RESET + "" + ChatColor.GOLD
|
||||||
|
+ Lang.get("timeSecond") + "\n";
|
||||||
|
menu += ChatColor.YELLOW + "" + ChatColor.BOLD + "7. " + ChatColor.RESET + "" + ChatColor.GOLD
|
||||||
|
+ Lang.get("timeZone") + "\n";
|
||||||
|
menu += ChatColor.YELLOW + "" + ChatColor.BOLD + "8. " + ChatColor.RESET + "" + ChatColor.RED
|
||||||
|
+ Lang.get("cancel") + "\n";
|
||||||
|
menu += ChatColor.YELLOW + "" + ChatColor.BOLD + "9. " + ChatColor.RESET + "" + ChatColor.GREEN
|
||||||
|
+ Lang.get("done") + "\n";
|
||||||
return menu;
|
return menu;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,7 +61,8 @@ public class GUIDisplayPrompt extends NumericPrompt {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getPromptText(ConversationContext context) {
|
public String getPromptText(ConversationContext context) {
|
||||||
QuestsEditorPostOpenGUIDisplayPromptEvent event = new QuestsEditorPostOpenGUIDisplayPromptEvent(questFactory, context);
|
QuestsEditorPostOpenGUIDisplayPromptEvent event
|
||||||
|
= new QuestsEditorPostOpenGUIDisplayPromptEvent(questFactory, context);
|
||||||
plugin.getServer().getPluginManager().callEvent(event);
|
plugin.getServer().getPluginManager().callEvent(event);
|
||||||
|
|
||||||
if (context.getSessionData("tempStack") != null) {
|
if (context.getSessionData("tempStack") != null) {
|
||||||
@ -91,7 +92,8 @@ public class GUIDisplayPrompt extends NumericPrompt {
|
|||||||
text += " " + ChatColor.GRAY + "(" + Lang.get("noneSet") + ")\n";
|
text += " " + ChatColor.GRAY + "(" + Lang.get("noneSet") + ")\n";
|
||||||
}
|
}
|
||||||
for (int i = 1; i <= size; i++) {
|
for (int i = 1; i <= size; i++) {
|
||||||
text += getNumberColor(context, i) + "" + ChatColor.BOLD + i + ChatColor.RESET + " - " + getSelectionText(context, i) + "\n";
|
text += getNumberColor(context, i) + "" + ChatColor.BOLD + i + ChatColor.RESET + " - "
|
||||||
|
+ getSelectionText(context, i) + "\n";
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.inventory.meta.ItemMeta;
|
import org.bukkit.inventory.meta.ItemMeta;
|
||||||
|
|
||||||
import me.blackvein.quests.Quests;
|
import me.blackvein.quests.util.ConfigUtil;
|
||||||
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 me.blackvein.quests.util.MiscUtil;
|
import me.blackvein.quests.util.MiscUtil;
|
||||||
@ -70,9 +70,11 @@ public class ItemStackPrompt extends FixedSetPrompt {
|
|||||||
for (String key : map.keySet()) {
|
for (String key : map.keySet()) {
|
||||||
if (key.equals("pages")) {
|
if (key.equals("pages")) {
|
||||||
List<String> pages = (List<String>) map.get(key);
|
List<String> pages = (List<String>) map.get(key);
|
||||||
menu += ChatColor.GRAY + "\u2515 " + ChatColor.DARK_GREEN + key + "=" + pages.size() + "\n";
|
menu += ChatColor.GRAY + "\u2515 " + ChatColor.DARK_GREEN + key + "=" + pages.size()
|
||||||
|
+ "\n";
|
||||||
} else {
|
} else {
|
||||||
menu += ChatColor.GRAY + "\u2515 " + ChatColor.DARK_GREEN + key + "=" + map.get(key) + "\n";
|
menu += ChatColor.GRAY + "\u2515 " + ChatColor.DARK_GREEN + key + "=" + map.get(key)
|
||||||
|
+ "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -81,24 +83,36 @@ public class ItemStackPrompt extends FixedSetPrompt {
|
|||||||
} else {
|
} else {
|
||||||
menu += "\n";
|
menu += "\n";
|
||||||
}
|
}
|
||||||
menu += ChatColor.GOLD + "" + ChatColor.BOLD + "0. " + ChatColor.RESET + "" + ChatColor.YELLOW + Lang.get("itemCreateLoadHand") + "\n";
|
menu += ChatColor.GOLD + "" + ChatColor.BOLD + "0. " + ChatColor.RESET + "" + ChatColor.YELLOW
|
||||||
menu += ChatColor.YELLOW + "" + ChatColor.BOLD + "1. " + ChatColor.RESET + "" + ChatColor.GOLD + Lang.get("itemCreateSetName") + "\n";
|
+ Lang.get("itemCreateLoadHand") + "\n";
|
||||||
menu += ChatColor.YELLOW + "" + ChatColor.BOLD + "2. " + ChatColor.RESET + "" + ChatColor.GOLD + Lang.get("itemCreateSetAmount") + "\n";
|
menu += ChatColor.YELLOW + "" + ChatColor.BOLD + "1. " + ChatColor.RESET + "" + ChatColor.GOLD
|
||||||
menu += ChatColor.YELLOW + "" + ChatColor.BOLD + "3. " + ChatColor.RESET + "" + ChatColor.GOLD + Lang.get("itemCreateSetDurab") + "\n";
|
+ Lang.get("itemCreateSetName") + "\n";
|
||||||
menu += ChatColor.YELLOW + "" + ChatColor.BOLD + "4. " + ChatColor.RESET + "" + ChatColor.GOLD + Lang.get("itemCreateSetEnchs") + "\n";
|
menu += ChatColor.YELLOW + "" + ChatColor.BOLD + "2. " + ChatColor.RESET + "" + ChatColor.GOLD
|
||||||
menu += ChatColor.YELLOW + "" + ChatColor.BOLD + "5. " + ChatColor.RESET + "" + ChatColor.ITALIC + ChatColor.GOLD + Lang.get("itemCreateSetDisplay") + "\n";
|
+ Lang.get("itemCreateSetAmount") + "\n";
|
||||||
menu += ChatColor.YELLOW + "" + ChatColor.BOLD + "6. " + ChatColor.RESET + "" + ChatColor.ITALIC + ChatColor.GOLD + Lang.get("itemCreateSetLore") + "\n";
|
menu += ChatColor.YELLOW + "" + ChatColor.BOLD + "3. " + ChatColor.RESET + "" + ChatColor.GOLD
|
||||||
|
+ Lang.get("itemCreateSetDurab") + "\n";
|
||||||
|
menu += ChatColor.YELLOW + "" + ChatColor.BOLD + "4. " + ChatColor.RESET + "" + ChatColor.GOLD
|
||||||
|
+ Lang.get("itemCreateSetEnchs") + "\n";
|
||||||
|
menu += ChatColor.YELLOW + "" + ChatColor.BOLD + "5. " + ChatColor.RESET + "" + ChatColor.ITALIC
|
||||||
|
+ ChatColor.GOLD + Lang.get("itemCreateSetDisplay") + "\n";
|
||||||
|
menu += ChatColor.YELLOW + "" + ChatColor.BOLD + "6. " + ChatColor.RESET + "" + ChatColor.ITALIC
|
||||||
|
+ ChatColor.GOLD + Lang.get("itemCreateSetLore") + "\n";
|
||||||
if (map != null) {
|
if (map != null) {
|
||||||
if (!map.isEmpty()) {
|
if (!map.isEmpty()) {
|
||||||
menu += ChatColor.YELLOW + "" + ChatColor.BOLD + "7. " + ChatColor.RESET + "" + ChatColor.DARK_GREEN + Lang.get("itemCreateSetClearMeta") + "\n";
|
menu += ChatColor.YELLOW + "" + ChatColor.BOLD + "7. " + ChatColor.RESET + "" + ChatColor.DARK_GREEN
|
||||||
|
+ Lang.get("itemCreateSetClearMeta") + "\n";
|
||||||
} else {
|
} else {
|
||||||
menu += ChatColor.GRAY + "" + ChatColor.BOLD + "7. " + ChatColor.RESET + "" + ChatColor.GRAY + Lang.get("itemCreateSetClearMeta") + "\n";
|
menu += ChatColor.GRAY + "" + ChatColor.BOLD + "7. " + ChatColor.RESET + "" + ChatColor.GRAY
|
||||||
|
+ Lang.get("itemCreateSetClearMeta") + "\n";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
menu += ChatColor.GRAY + "" + ChatColor.BOLD + "7. " + ChatColor.RESET + "" + ChatColor.GRAY + Lang.get("itemCreateSetClearMeta") + "\n";
|
menu += ChatColor.GRAY + "" + ChatColor.BOLD + "7. " + ChatColor.RESET + "" + ChatColor.GRAY
|
||||||
|
+ Lang.get("itemCreateSetClearMeta") + "\n";
|
||||||
}
|
}
|
||||||
menu += ChatColor.YELLOW + "" + ChatColor.BOLD + "8. " + ChatColor.RESET + "" + ChatColor.RED + Lang.get("cancel") + "\n";
|
menu += ChatColor.YELLOW + "" + ChatColor.BOLD + "8. " + ChatColor.RESET + "" + ChatColor.RED
|
||||||
menu += ChatColor.YELLOW + "" + ChatColor.BOLD + "9. " + ChatColor.RESET + "" + ChatColor.GREEN + Lang.get("done") + "\n";
|
+ Lang.get("cancel") + "\n";
|
||||||
|
menu += ChatColor.YELLOW + "" + ChatColor.BOLD + "9. " + ChatColor.RESET + "" + ChatColor.GREEN
|
||||||
|
+ Lang.get("done") + "\n";
|
||||||
return menu;
|
return menu;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -248,7 +262,8 @@ public class ItemStackPrompt extends FixedSetPrompt {
|
|||||||
|
|
||||||
ItemMeta meta = stack.getItemMeta();
|
ItemMeta meta = stack.getItemMeta();
|
||||||
if ((Map<String, Object>) cc.getSessionData("tempMeta") != null) {
|
if ((Map<String, Object>) cc.getSessionData("tempMeta") != null) {
|
||||||
meta = ItemUtil.deserializeItemMeta(meta.getClass(), (Map<String, Object>) cc.getSessionData("tempMeta"));
|
meta = ItemUtil.deserializeItemMeta(meta.getClass(), (Map<String, Object>) cc
|
||||||
|
.getSessionData("tempMeta"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (enchs != null) {
|
if (enchs != null) {
|
||||||
@ -344,7 +359,8 @@ public class ItemStackPrompt extends FixedSetPrompt {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Prompt acceptInput(ConversationContext cc, String input) {
|
public Prompt acceptInput(ConversationContext cc, String input) {
|
||||||
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false && input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false
|
||||||
|
&& input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
||||||
try {
|
try {
|
||||||
int amt = Integer.parseInt(input);
|
int amt = Integer.parseInt(input);
|
||||||
if (amt < 1) {
|
if (amt < 1) {
|
||||||
@ -384,7 +400,8 @@ public class ItemStackPrompt extends FixedSetPrompt {
|
|||||||
@Override
|
@Override
|
||||||
public Prompt acceptInput(ConversationContext cc, String input) {
|
public Prompt acceptInput(ConversationContext cc, String input) {
|
||||||
String s = input.replace(":", "");
|
String s = input.replace(":", "");
|
||||||
if (s.equalsIgnoreCase(Lang.get("cmdClear")) == false && s.equalsIgnoreCase(Lang.get("cmdCancel")) == false) {
|
if (s.equalsIgnoreCase(Lang.get("cmdClear")) == false
|
||||||
|
&& s.equalsIgnoreCase(Lang.get("cmdCancel")) == false) {
|
||||||
Enchantment e = ItemUtil.getEnchantmentFromPrettyName(MiscUtil.getCapitalized(s));
|
Enchantment e = ItemUtil.getEnchantmentFromPrettyName(MiscUtil.getCapitalized(s));
|
||||||
if (e != null) {
|
if (e != null) {
|
||||||
cc.setSessionData("tempEnchant", e);
|
cc.setSessionData("tempEnchant", e);
|
||||||
@ -419,12 +436,14 @@ public class ItemStackPrompt extends FixedSetPrompt {
|
|||||||
try {
|
try {
|
||||||
int num = Integer.parseInt(input);
|
int num = Integer.parseInt(input);
|
||||||
if (num < 1) {
|
if (num < 1) {
|
||||||
cc.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidMinimum").replace("<number>", "1"));
|
cc.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidMinimum")
|
||||||
|
.replace("<number>", "1"));
|
||||||
return new LevelPrompt(enchantment);
|
return new LevelPrompt(enchantment);
|
||||||
} else {
|
} else {
|
||||||
if (cc.getSessionData("tempEnchantments") != null) {
|
if (cc.getSessionData("tempEnchantments") != null) {
|
||||||
@SuppressWarnings("unchecked")
|
@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);
|
||||||
} else {
|
} else {
|
||||||
@ -452,8 +471,9 @@ public class ItemStackPrompt extends FixedSetPrompt {
|
|||||||
@Override
|
@Override
|
||||||
public Prompt acceptInput(ConversationContext cc, String input) {
|
public Prompt acceptInput(ConversationContext cc, String input) {
|
||||||
String s = input.replace(":", "");
|
String s = input.replace(":", "");
|
||||||
if (s.equalsIgnoreCase(Lang.get("cmdCancel")) == false && s.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
if (s.equalsIgnoreCase(Lang.get("cmdCancel")) == false
|
||||||
s = Quests.parseString(s);
|
&& s.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
||||||
|
s = ConfigUtil.parseString(s);
|
||||||
cc.setSessionData("tempDisplay", s);
|
cc.setSessionData("tempDisplay", s);
|
||||||
} else if (s.equalsIgnoreCase(Lang.get("cmdClear"))) {
|
} else if (s.equalsIgnoreCase(Lang.get("cmdClear"))) {
|
||||||
cc.setSessionData("tempDisplay", null);
|
cc.setSessionData("tempDisplay", null);
|
||||||
@ -472,8 +492,9 @@ public class ItemStackPrompt extends FixedSetPrompt {
|
|||||||
@Override
|
@Override
|
||||||
public Prompt acceptInput(ConversationContext cc, String input) {
|
public Prompt acceptInput(ConversationContext cc, String input) {
|
||||||
String s = input.replace(":", "");
|
String s = input.replace(":", "");
|
||||||
if (s.equalsIgnoreCase(Lang.get("cmdCancel")) == false && s.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
if (s.equalsIgnoreCase(Lang.get("cmdCancel")) == false
|
||||||
s = Quests.parseString(s);
|
&& s.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
||||||
|
s = ConfigUtil.parseString(s);
|
||||||
LinkedList<String> lore = new LinkedList<String>();
|
LinkedList<String> lore = new LinkedList<String>();
|
||||||
lore.addAll(Arrays.asList(s.split(Lang.get("charSemi"))));
|
lore.addAll(Arrays.asList(s.split(Lang.get("charSemi"))));
|
||||||
cc.setSessionData("tempLore", lore);
|
cc.setSessionData("tempLore", lore);
|
||||||
@ -494,7 +515,8 @@ public class ItemStackPrompt extends FixedSetPrompt {
|
|||||||
item += ":" + ChatColor.BLUE + (Short) cc.getSessionData("tempData");
|
item += ":" + ChatColor.BLUE + (Short) cc.getSessionData("tempData");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
item = ChatColor.LIGHT_PURPLE + "" + ChatColor.ITALIC + (String) cc.getSessionData("tempDisplay") + ChatColor.RESET + "" + ChatColor.GRAY + " (";
|
item = ChatColor.LIGHT_PURPLE + "" + ChatColor.ITALIC + (String) cc.getSessionData("tempDisplay")
|
||||||
|
+ ChatColor.RESET + "" + ChatColor.GRAY + " (";
|
||||||
String name = (String) cc.getSessionData("tempName");
|
String name = (String) cc.getSessionData("tempName");
|
||||||
item += ChatColor.AQUA + ItemUtil.getPrettyItemName(name);
|
item += ChatColor.AQUA + ItemUtil.getPrettyItemName(name);
|
||||||
if (cc.getSessionData("tempData") != null) {
|
if (cc.getSessionData("tempData") != null) {
|
||||||
@ -510,9 +532,11 @@ public class ItemStackPrompt extends FixedSetPrompt {
|
|||||||
item += "\n";
|
item += "\n";
|
||||||
if (cc.getSessionData("tempEnchantments") != null) {
|
if (cc.getSessionData("tempEnchantments") != null) {
|
||||||
@SuppressWarnings("unchecked")
|
@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()) {
|
||||||
item += ChatColor.GRAY + " - " + ChatColor.RED + ItemUtil.getPrettyEnchantmentName(e.getKey()) + " " + RomanNumeral.getNumeral(e.getValue()) + "\n";
|
item += ChatColor.GRAY + " - " + ChatColor.RED + ItemUtil.getPrettyEnchantmentName(e.getKey())
|
||||||
|
+ " " + RomanNumeral.getNumeral(e.getValue()) + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (cc.getSessionData("tempLore") != null) {
|
if (cc.getSessionData("tempLore") != null) {
|
||||||
|
@ -64,45 +64,59 @@ public class ItemsPrompt extends FixedSetPrompt {
|
|||||||
context.setSessionData(pref, Boolean.TRUE);
|
context.setSessionData(pref, Boolean.TRUE);
|
||||||
String text = ChatColor.AQUA + "- " + Lang.get("stageEditorItems") + " -\n";
|
String text = ChatColor.AQUA + "- " + Lang.get("stageEditorItems") + " -\n";
|
||||||
if (context.getSessionData(pref + CK.S_CRAFT_ITEMS) == null) {
|
if (context.getSessionData(pref + CK.S_CRAFT_ITEMS) == null) {
|
||||||
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "1 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE + "- " + Lang.get("stageEditorCraftItems") + ChatColor.GRAY + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "1 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE
|
||||||
|
+ "- " + Lang.get("stageEditorCraftItems") + ChatColor.GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "1 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE + "- " + Lang.get("stageEditorCraftItems") + "\n";
|
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "1 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE
|
||||||
|
+ "- " + Lang.get("stageEditorCraftItems") + "\n";
|
||||||
LinkedList<ItemStack> items = (LinkedList<ItemStack>) context.getSessionData(pref + CK.S_CRAFT_ITEMS);
|
LinkedList<ItemStack> items = (LinkedList<ItemStack>) context.getSessionData(pref + CK.S_CRAFT_ITEMS);
|
||||||
for (int i = 0; i < items.size(); i++) {
|
for (int i = 0; i < items.size(); i++) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.BLUE + ItemUtil.getName(items.get(i)) + ChatColor.GRAY + " x " + ChatColor.AQUA + items.get(i).getAmount() + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.BLUE + ItemUtil.getName(items.get(i)) + ChatColor.GRAY
|
||||||
|
+ " x " + ChatColor.AQUA + items.get(i).getAmount() + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (context.getSessionData(pref + CK.S_SMELT_ITEMS) == null) {
|
if (context.getSessionData(pref + CK.S_SMELT_ITEMS) == null) {
|
||||||
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "2 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE + "- " + Lang.get("stageEditorSmeltItems") + ChatColor.GRAY + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "2 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE
|
||||||
|
+ "- " + Lang.get("stageEditorSmeltItems") + ChatColor.GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "2 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE + "- " + Lang.get("stageEditorSmeltItems") + "\n";
|
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "2 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE
|
||||||
|
+ "- " + Lang.get("stageEditorSmeltItems") + "\n";
|
||||||
LinkedList<ItemStack> items = (LinkedList<ItemStack>) context.getSessionData(pref + CK.S_SMELT_ITEMS);
|
LinkedList<ItemStack> items = (LinkedList<ItemStack>) context.getSessionData(pref + CK.S_SMELT_ITEMS);
|
||||||
for (int i = 0; i < items.size(); i++) {
|
for (int i = 0; i < items.size(); i++) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.BLUE + ItemUtil.getName(items.get(i)) + ChatColor.GRAY + " x " + ChatColor.AQUA + items.get(i).getAmount() + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.BLUE + ItemUtil.getName(items.get(i)) + ChatColor.GRAY
|
||||||
|
+ " x " + ChatColor.AQUA + items.get(i).getAmount() + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (context.getSessionData(pref + CK.S_ENCHANT_TYPES) == null) {
|
if (context.getSessionData(pref + CK.S_ENCHANT_TYPES) == null) {
|
||||||
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "3 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE + "- " + Lang.get("stageEditorEnchantItems") + ChatColor.GRAY + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "3 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE
|
||||||
|
+ "- " + Lang.get("stageEditorEnchantItems") + ChatColor.GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "3 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE + "- " + Lang.get("stageEditorEnchantItems") + "\n";
|
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "3 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE
|
||||||
|
+ "- " + Lang.get("stageEditorEnchantItems") + "\n";
|
||||||
LinkedList<String> enchants = (LinkedList<String>) context.getSessionData(pref + CK.S_ENCHANT_TYPES);
|
LinkedList<String> enchants = (LinkedList<String>) context.getSessionData(pref + CK.S_ENCHANT_TYPES);
|
||||||
LinkedList<String> names = (LinkedList<String>) context.getSessionData(pref + CK.S_ENCHANT_NAMES);
|
LinkedList<String> names = (LinkedList<String>) context.getSessionData(pref + CK.S_ENCHANT_NAMES);
|
||||||
LinkedList<Integer> amnts = (LinkedList<Integer>) context.getSessionData(pref + CK.S_ENCHANT_AMOUNTS);
|
LinkedList<Integer> amnts = (LinkedList<Integer>) context.getSessionData(pref + CK.S_ENCHANT_AMOUNTS);
|
||||||
for (int i = 0; i < enchants.size(); i++) {
|
for (int i = 0; i < enchants.size(); i++) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.BLUE + ItemUtil.getPrettyItemName(names.get(i)) + ChatColor.GRAY + " " + Lang.get("with") + " " + ChatColor.AQUA
|
text += ChatColor.GRAY + " - " + ChatColor.BLUE + ItemUtil.getPrettyItemName(names.get(i))
|
||||||
+ ItemUtil.getPrettyEnchantmentName(ItemUtil.getEnchantmentFromProperName(enchants.get(i))) + ChatColor.GRAY + " x " + ChatColor.DARK_AQUA + amnts.get(i) + "\n";
|
+ ChatColor.GRAY + " " + Lang.get("with") + " " + ChatColor.AQUA
|
||||||
|
+ ItemUtil.getPrettyEnchantmentName(ItemUtil.getEnchantmentFromProperName(enchants.get(i)))
|
||||||
|
+ ChatColor.GRAY + " x " + ChatColor.DARK_AQUA + amnts.get(i) + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (context.getSessionData(pref + CK.S_BREW_ITEMS) == null) {
|
if (context.getSessionData(pref + CK.S_BREW_ITEMS) == null) {
|
||||||
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "4 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE + "- " + Lang.get("stageEditorBrewPotions") + ChatColor.GRAY + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "4 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE
|
||||||
|
+ "- " + Lang.get("stageEditorBrewPotions") + ChatColor.GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "4 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE + "- " + Lang.get("stageEditorBrewPotions") + "\n";
|
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "4 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE
|
||||||
|
+ "- " + Lang.get("stageEditorBrewPotions") + "\n";
|
||||||
LinkedList<ItemStack> items = (LinkedList<ItemStack>) context.getSessionData(pref + CK.S_BREW_ITEMS);
|
LinkedList<ItemStack> items = (LinkedList<ItemStack>) context.getSessionData(pref + CK.S_BREW_ITEMS);
|
||||||
for (int i = 0; i < items.size(); i++) {
|
for (int i = 0; i < items.size(); i++) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.BLUE + ItemUtil.getName(items.get(i)) + ChatColor.GRAY + " x " + ChatColor.AQUA + items.get(i).getAmount() + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.BLUE + ItemUtil.getName(items.get(i)) + ChatColor.GRAY
|
||||||
|
+ " x " + ChatColor.AQUA + items.get(i).getAmount() + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
text += ChatColor.GREEN + "" + ChatColor.BOLD + "5 " + ChatColor.RESET + ChatColor.DARK_PURPLE + "- " + Lang.get("done") + "\n";
|
text += ChatColor.GREEN + "" + ChatColor.BOLD + "5 " + ChatColor.RESET + ChatColor.DARK_PURPLE + "- "
|
||||||
|
+ Lang.get("done") + "\n";
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -150,15 +164,19 @@ public class ItemsPrompt extends FixedSetPrompt {
|
|||||||
String text = ChatColor.GOLD + "- " + Lang.get("stageEditorCraftItems") + " -\n";
|
String text = ChatColor.GOLD + "- " + Lang.get("stageEditorCraftItems") + " -\n";
|
||||||
if (context.getSessionData(pref + CK.S_CRAFT_ITEMS) == null) {
|
if (context.getSessionData(pref + CK.S_CRAFT_ITEMS) == null) {
|
||||||
text += ChatColor.GRAY + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorDeliveryAddItem") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorDeliveryAddItem") + "\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorDeliveryAddItem") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorDeliveryAddItem") + "\n";
|
||||||
for (ItemStack is : getItems(context)) {
|
for (ItemStack is : getItems(context)) {
|
||||||
text += ChatColor.GRAY + " - " + ItemUtil.getDisplayString(is) + "\n";
|
text += ChatColor.GRAY + " - " + ItemUtil.getDisplayString(is) + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
text += ChatColor.RED + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("clear") + "\n";
|
text += ChatColor.RED + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
text += ChatColor.GREEN + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("done");
|
+ Lang.get("clear") + "\n";
|
||||||
|
text += ChatColor.GREEN + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("done");
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -207,15 +225,19 @@ public class ItemsPrompt extends FixedSetPrompt {
|
|||||||
String text = ChatColor.GOLD + "- " + Lang.get("stageEditorSmeltItems") + " -\n";
|
String text = ChatColor.GOLD + "- " + Lang.get("stageEditorSmeltItems") + " -\n";
|
||||||
if (context.getSessionData(pref + CK.S_SMELT_ITEMS) == null) {
|
if (context.getSessionData(pref + CK.S_SMELT_ITEMS) == null) {
|
||||||
text += ChatColor.GRAY + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorDeliveryAddItem") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorDeliveryAddItem") + "\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorDeliveryAddItem") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorDeliveryAddItem") + "\n";
|
||||||
for (ItemStack is : getItems(context)) {
|
for (ItemStack is : getItems(context)) {
|
||||||
text += ChatColor.GRAY + " - " + ItemUtil.getDisplayString(is) + "\n";
|
text += ChatColor.GRAY + " - " + ItemUtil.getDisplayString(is) + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
text += ChatColor.RED + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("clear") + "\n";
|
text += ChatColor.RED + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
text += ChatColor.GREEN + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("done");
|
+ Lang.get("clear") + "\n";
|
||||||
|
text += ChatColor.GREEN + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("done");
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -249,34 +271,46 @@ public class ItemsPrompt extends FixedSetPrompt {
|
|||||||
public String getPromptText(ConversationContext context) {
|
public String getPromptText(ConversationContext context) {
|
||||||
String text = ChatColor.GOLD + "- " + Lang.get("stageEditorEnchantItems") + " -\n";
|
String text = ChatColor.GOLD + "- " + Lang.get("stageEditorEnchantItems") + " -\n";
|
||||||
if (context.getSessionData(pref + CK.S_ENCHANT_TYPES) == null) {
|
if (context.getSessionData(pref + CK.S_ENCHANT_TYPES) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetEnchantments") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
text += ChatColor.GRAY + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.GRAY + " - " + Lang.get("stageEditorSetItemNames") + " (" + Lang.get("noneSet") + ")\n";
|
+ Lang.get("stageEditorSetEnchantments") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
text += ChatColor.GRAY + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.GRAY + " - " + Lang.get("stageEditorSetEnchantAmounts") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.GRAY + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.GRAY + " - "
|
||||||
text += ChatColor.RED + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("clear") + "\n";
|
+ Lang.get("stageEditorSetItemNames") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
text += ChatColor.GREEN + "" + ChatColor.BOLD + "5" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("done");
|
text += ChatColor.GRAY + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.GRAY + " - "
|
||||||
|
+ Lang.get("stageEditorSetEnchantAmounts") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
|
text += ChatColor.RED + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("clear") + "\n";
|
||||||
|
text += ChatColor.GREEN + "" + ChatColor.BOLD + "5" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("done");
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetEnchantments") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorSetEnchantments") + "\n";
|
||||||
for (String s : getEnchantTypes(context)) {
|
for (String s : getEnchantTypes(context)) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.AQUA + s + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.AQUA + s + "\n";
|
||||||
}
|
}
|
||||||
if (context.getSessionData(pref + CK.S_ENCHANT_NAMES) == null) {
|
if (context.getSessionData(pref + CK.S_ENCHANT_NAMES) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetItemNames") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorSetItemNames") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetItemNames") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorSetItemNames") + "\n";
|
||||||
for (String s : getEnchantItems(context)) {
|
for (String s : getEnchantItems(context)) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.AQUA + ItemUtil.getPrettyItemName(s) + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.AQUA + ItemUtil.getPrettyItemName(s) + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (context.getSessionData(pref + CK.S_ENCHANT_AMOUNTS) == null) {
|
if (context.getSessionData(pref + CK.S_ENCHANT_AMOUNTS) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetEnchantAmounts") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorSetEnchantAmounts") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetEnchantAmounts") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorSetEnchantAmounts") + "\n";
|
||||||
for (int i : getEnchantAmounts(context)) {
|
for (int i : getEnchantAmounts(context)) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.AQUA + i + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.AQUA + i + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
text += ChatColor.RED + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("clear") + "\n";
|
text += ChatColor.RED + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
text += ChatColor.GREEN + "" + ChatColor.BOLD + "5" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("done");
|
+ Lang.get("clear") + "\n";
|
||||||
|
text += ChatColor.GREEN + "" + ChatColor.BOLD + "5" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("done");
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
@ -355,7 +389,8 @@ public class ItemsPrompt extends FixedSetPrompt {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getPromptText(ConversationContext context) {
|
public String getPromptText(ConversationContext context) {
|
||||||
String text = ChatColor.LIGHT_PURPLE + "- " + ChatColor.DARK_PURPLE + Lang.get("stageEditorEnchantments") + ChatColor.LIGHT_PURPLE + " -\n";
|
String text = ChatColor.LIGHT_PURPLE + "- " + ChatColor.DARK_PURPLE + Lang.get("stageEditorEnchantments")
|
||||||
|
+ ChatColor.LIGHT_PURPLE + " -\n";
|
||||||
for (int i = 0; i < Enchantment.values().length; i++) {
|
for (int i = 0; i < Enchantment.values().length; i++) {
|
||||||
if (i == Enchantment.values().length - 1) {
|
if (i == Enchantment.values().length - 1) {
|
||||||
text += ChatColor.GREEN + ItemUtil.getPrettyEnchantmentName(Enchantment.values()[i]) + " ";
|
text += ChatColor.GREEN + ItemUtil.getPrettyEnchantmentName(Enchantment.values()[i]) + " ";
|
||||||
@ -389,7 +424,8 @@ public class ItemsPrompt extends FixedSetPrompt {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (valid == false) {
|
if (valid == false) {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " " + Lang.get("stageEditorInvalidEnchantment"));
|
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " "
|
||||||
|
+ Lang.get("stageEditorInvalidEnchantment"));
|
||||||
return new EnchantTypesPrompt();
|
return new EnchantTypesPrompt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -421,11 +457,13 @@ public class ItemsPrompt extends FixedSetPrompt {
|
|||||||
return new EnchantItemsPrompt();
|
return new EnchantItemsPrompt();
|
||||||
}*/
|
}*/
|
||||||
} else {
|
} else {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " " + Lang.get("stageEditorInvalidItemName"));
|
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + ChatColor.RED + " "
|
||||||
|
+ Lang.get("stageEditorInvalidItemName"));
|
||||||
return new EnchantItemsPrompt();
|
return new EnchantItemsPrompt();
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED + Lang.get("stageEditorNotListofNumbers"));
|
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED
|
||||||
|
+ Lang.get("stageEditorNotListofNumbers"));
|
||||||
return new EnchantItemsPrompt();
|
return new EnchantItemsPrompt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -452,11 +490,13 @@ public class ItemsPrompt extends FixedSetPrompt {
|
|||||||
if (Integer.parseInt(s) > 0) {
|
if (Integer.parseInt(s) > 0) {
|
||||||
amounts.add(Integer.parseInt(s));
|
amounts.add(Integer.parseInt(s));
|
||||||
} else {
|
} else {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidMinimum").replace("<number>", "1"));
|
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidMinimum")
|
||||||
|
.replace("<number>", "1"));
|
||||||
return new EnchantAmountsPrompt();
|
return new EnchantAmountsPrompt();
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED + Lang.get("stageEditorNotListofNumbers"));
|
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED
|
||||||
|
+ Lang.get("stageEditorNotListofNumbers"));
|
||||||
return new EnchantAmountsPrompt();
|
return new EnchantAmountsPrompt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -491,15 +531,19 @@ public class ItemsPrompt extends FixedSetPrompt {
|
|||||||
String text = ChatColor.GOLD + "- " + Lang.get("stageEditorBrewPotions") + " -\n";
|
String text = ChatColor.GOLD + "- " + Lang.get("stageEditorBrewPotions") + " -\n";
|
||||||
if (context.getSessionData(pref + CK.S_BREW_ITEMS) == null) {
|
if (context.getSessionData(pref + CK.S_BREW_ITEMS) == null) {
|
||||||
text += ChatColor.GRAY + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorDeliveryAddItem") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorDeliveryAddItem") + "\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorDeliveryAddItem") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorDeliveryAddItem") + "\n";
|
||||||
for (ItemStack is : getItems(context)) {
|
for (ItemStack is : getItems(context)) {
|
||||||
text += ChatColor.GRAY + " - " + ItemUtil.getDisplayString(is) + "\n";
|
text += ChatColor.GRAY + " - " + ItemUtil.getDisplayString(is) + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
text += ChatColor.RED + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("clear") + "\n";
|
text += ChatColor.RED + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
text += ChatColor.GREEN + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("done");
|
+ Lang.get("clear") + "\n";
|
||||||
|
text += ChatColor.GREEN + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("done");
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,6 +33,7 @@ import org.bukkit.entity.Tameable;
|
|||||||
import me.blackvein.quests.QuestFactory;
|
import me.blackvein.quests.QuestFactory;
|
||||||
import me.blackvein.quests.Quests;
|
import me.blackvein.quests.Quests;
|
||||||
import me.blackvein.quests.util.CK;
|
import me.blackvein.quests.util.CK;
|
||||||
|
import me.blackvein.quests.util.ConfigUtil;
|
||||||
import me.blackvein.quests.util.Lang;
|
import me.blackvein.quests.util.Lang;
|
||||||
import me.blackvein.quests.util.MiscUtil;
|
import me.blackvein.quests.util.MiscUtil;
|
||||||
|
|
||||||
@ -56,53 +57,72 @@ public class MobsPrompt extends FixedSetPrompt {
|
|||||||
context.setSessionData(pref, Boolean.TRUE);
|
context.setSessionData(pref, Boolean.TRUE);
|
||||||
String text = ChatColor.AQUA + "- " + Lang.get("stageEditorMobs") + " -\n";
|
String text = ChatColor.AQUA + "- " + Lang.get("stageEditorMobs") + " -\n";
|
||||||
if (context.getSessionData(pref + CK.S_MOB_TYPES) == null) {
|
if (context.getSessionData(pref + CK.S_MOB_TYPES) == null) {
|
||||||
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "1 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE + "- " + Lang.get("stageEditorKillMobs") + ChatColor.GRAY + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "1 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE
|
||||||
|
+ "- " + Lang.get("stageEditorKillMobs") + ChatColor.GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "1 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE + "- " + Lang.get("stageEditorKillMobs") + "\n";
|
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "1 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE
|
||||||
|
+ "- " + Lang.get("stageEditorKillMobs") + "\n";
|
||||||
LinkedList<String> mobs = (LinkedList<String>) context.getSessionData(pref + CK.S_MOB_TYPES);
|
LinkedList<String> mobs = (LinkedList<String>) context.getSessionData(pref + CK.S_MOB_TYPES);
|
||||||
LinkedList<Integer> amnts = (LinkedList<Integer>) context.getSessionData(pref + CK.S_MOB_AMOUNTS);
|
LinkedList<Integer> amnts = (LinkedList<Integer>) context.getSessionData(pref + CK.S_MOB_AMOUNTS);
|
||||||
if (context.getSessionData(pref + CK.S_MOB_KILL_LOCATIONS) == null) {
|
if (context.getSessionData(pref + CK.S_MOB_KILL_LOCATIONS) == null) {
|
||||||
for (int i = 0; i < mobs.size(); i++) {
|
for (int i = 0; i < mobs.size(); i++) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.AQUA + MiscUtil.getPrettyMobName(Quests.getMobType(mobs.get(i))) + ChatColor.GRAY + " x " + ChatColor.DARK_AQUA + amnts.get(i) + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.AQUA
|
||||||
|
+ MiscUtil.getPrettyMobName(MiscUtil.getProperMobType(mobs.get(i))) + ChatColor.GRAY + " x "
|
||||||
|
+ ChatColor.DARK_AQUA + amnts.get(i) + "\n";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
LinkedList<String> locs = (LinkedList<String>) context.getSessionData(pref + CK.S_MOB_KILL_LOCATIONS);
|
LinkedList<String> locs = (LinkedList<String>) context.getSessionData(pref + CK.S_MOB_KILL_LOCATIONS);
|
||||||
LinkedList<Integer> radii = (LinkedList<Integer>) context.getSessionData(pref + CK.S_MOB_KILL_LOCATIONS_RADIUS);
|
LinkedList<Integer> radii
|
||||||
LinkedList<String> names = (LinkedList<String>) context.getSessionData(pref + CK.S_MOB_KILL_LOCATIONS_NAMES);
|
= (LinkedList<Integer>) context.getSessionData(pref + CK.S_MOB_KILL_LOCATIONS_RADIUS);
|
||||||
|
LinkedList<String> names
|
||||||
|
= (LinkedList<String>) context.getSessionData(pref + CK.S_MOB_KILL_LOCATIONS_NAMES);
|
||||||
for (int i = 0; i < mobs.size(); i++) {
|
for (int i = 0; i < mobs.size(); i++) {
|
||||||
String msg = Lang.get("blocksWithin");
|
String msg = Lang.get("blocksWithin");
|
||||||
msg = msg.replaceAll("<amount>", ChatColor.DARK_PURPLE + "" + radii.get(i) + ChatColor.GRAY);
|
msg = msg.replaceAll("<amount>", ChatColor.DARK_PURPLE + "" + radii.get(i) + ChatColor.GRAY);
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.BLUE + MiscUtil.getPrettyMobName(Quests.getMobType(mobs.get(i))) + ChatColor.GRAY + " x " + ChatColor.DARK_AQUA + amnts.get(i) + ChatColor.GRAY + msg + ChatColor.YELLOW + names.get(i) + " (" + locs.get(i) + ")\n";
|
text += ChatColor.GRAY + " - " + ChatColor.BLUE
|
||||||
|
+ MiscUtil.getPrettyMobName(MiscUtil.getProperMobType(mobs.get(i))) + ChatColor.GRAY + " x "
|
||||||
|
+ ChatColor.DARK_AQUA + amnts.get(i) + ChatColor.GRAY + msg + ChatColor.YELLOW
|
||||||
|
+ names.get(i) + " (" + locs.get(i) + ")\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (context.getSessionData(pref + CK.S_FISH) == null) {
|
if (context.getSessionData(pref + CK.S_FISH) == null) {
|
||||||
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "2 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE + "- " + Lang.get("stageEditorCatchFish") + ChatColor.GRAY + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "2 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE
|
||||||
|
+ "- " + Lang.get("stageEditorCatchFish") + ChatColor.GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
Integer fish = (Integer) context.getSessionData(pref + CK.S_FISH);
|
Integer fish = (Integer) context.getSessionData(pref + CK.S_FISH);
|
||||||
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "2 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE + "- " + Lang.get("stageEditorCatchFish") + " " + ChatColor.GRAY + "(" + ChatColor.AQUA + fish + " " + Lang.get("stageEditorFish") + ChatColor.GRAY + ")\n";
|
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "2 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE
|
||||||
|
+ "- " + Lang.get("stageEditorCatchFish") + " " + ChatColor.GRAY + "(" + ChatColor.AQUA + fish
|
||||||
|
+ " " + Lang.get("stageEditorFish") + ChatColor.GRAY + ")\n";
|
||||||
}
|
}
|
||||||
if (context.getSessionData(pref + CK.S_TAME_TYPES) == null) {
|
if (context.getSessionData(pref + CK.S_TAME_TYPES) == null) {
|
||||||
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "3 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE + "- " + Lang.get("stageEditorTameMobs") + ChatColor.GRAY + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "3 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE
|
||||||
|
+ "- " + Lang.get("stageEditorTameMobs") + ChatColor.GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "3 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE + "- " + Lang.get("stageEditorTameMobs") + "\n";
|
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "3 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE
|
||||||
|
+ "- " + Lang.get("stageEditorTameMobs") + "\n";
|
||||||
LinkedList<String> mobs = (LinkedList<String>) context.getSessionData(pref + CK.S_TAME_TYPES);
|
LinkedList<String> mobs = (LinkedList<String>) context.getSessionData(pref + CK.S_TAME_TYPES);
|
||||||
LinkedList<Integer> amounts = (LinkedList<Integer>) context.getSessionData(pref + CK.S_TAME_AMOUNTS);
|
LinkedList<Integer> amounts = (LinkedList<Integer>) context.getSessionData(pref + CK.S_TAME_AMOUNTS);
|
||||||
for (int i = 0; i < mobs.size(); i++) {
|
for (int i = 0; i < mobs.size(); i++) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.BLUE + mobs.get(i) + ChatColor.GRAY + " x " + ChatColor.AQUA + amounts.get(i) + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.BLUE + mobs.get(i) + ChatColor.GRAY + " x "
|
||||||
|
+ ChatColor.AQUA + amounts.get(i) + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (context.getSessionData(pref + CK.S_SHEAR_COLORS) == null) {
|
if (context.getSessionData(pref + CK.S_SHEAR_COLORS) == null) {
|
||||||
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "4 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE + "- " + Lang.get("stageEditorShearSheep") + ChatColor.GRAY + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "4 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE
|
||||||
|
+ "- " + Lang.get("stageEditorShearSheep") + ChatColor.GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "4 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE + "- " + Lang.get("stageEditorShearSheep") + "\n";
|
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "4 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE
|
||||||
|
+ "- " + Lang.get("stageEditorShearSheep") + "\n";
|
||||||
LinkedList<String> colors = (LinkedList<String>) context.getSessionData(pref + CK.S_SHEAR_COLORS);
|
LinkedList<String> colors = (LinkedList<String>) context.getSessionData(pref + CK.S_SHEAR_COLORS);
|
||||||
LinkedList<Integer> amounts = (LinkedList<Integer>) context.getSessionData(pref + CK.S_SHEAR_AMOUNTS);
|
LinkedList<Integer> amounts = (LinkedList<Integer>) context.getSessionData(pref + CK.S_SHEAR_AMOUNTS);
|
||||||
for (int i = 0; i < colors.size(); i++) {
|
for (int i = 0; i < colors.size(); i++) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.BLUE + colors.get(i) + ChatColor.GRAY + " x " + ChatColor.AQUA + amounts.get(i) + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.BLUE + colors.get(i) + ChatColor.GRAY + " x "
|
||||||
|
+ ChatColor.AQUA + amounts.get(i) + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
text += ChatColor.GREEN + "" + ChatColor.BOLD + "5 " + ChatColor.RESET + ChatColor.DARK_PURPLE + "- " + Lang.get("done") + "\n";
|
text += ChatColor.GREEN + "" + ChatColor.BOLD + "5 " + ChatColor.RESET + ChatColor.DARK_PURPLE + "- "
|
||||||
|
+ Lang.get("done") + "\n";
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -136,52 +156,70 @@ public class MobsPrompt extends FixedSetPrompt {
|
|||||||
public String getPromptText(ConversationContext context) {
|
public String getPromptText(ConversationContext context) {
|
||||||
String text = ChatColor.GOLD + "- " + Lang.get("stageEditorKillMobs") + " -\n";
|
String text = ChatColor.GOLD + "- " + Lang.get("stageEditorKillMobs") + " -\n";
|
||||||
if (context.getSessionData(pref + CK.S_MOB_TYPES) == null) {
|
if (context.getSessionData(pref + CK.S_MOB_TYPES) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetMobTypes") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetMobAmounts") + " (" + Lang.get("noneSet") + ")\n";
|
+ Lang.get("stageEditorSetMobTypes") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
text += ChatColor.GRAY + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.GRAY + " - " + Lang.get("stageEditorSetKillLocations") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
text += ChatColor.GRAY + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.GRAY + " - " + Lang.get("stageEditorSetKillLocationRadii") + " (" + Lang.get("noneSet") + ")\n";
|
+ Lang.get("stageEditorSetMobAmounts") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
text += ChatColor.GRAY + "" + ChatColor.BOLD + "5" + ChatColor.RESET + ChatColor.GRAY + " - " + Lang.get("stageEditorSetKillLocationNames") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.GRAY + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.GRAY + " - "
|
||||||
text += ChatColor.RED + "" + ChatColor.BOLD + "6" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("clear") + "\n";
|
+ Lang.get("stageEditorSetKillLocations") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
text += ChatColor.GREEN + "" + ChatColor.BOLD + "7" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("done");
|
text += ChatColor.GRAY + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.GRAY + " - "
|
||||||
|
+ Lang.get("stageEditorSetKillLocationRadii") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
|
text += ChatColor.GRAY + "" + ChatColor.BOLD + "5" + ChatColor.RESET + ChatColor.GRAY + " - "
|
||||||
|
+ Lang.get("stageEditorSetKillLocationNames") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
|
text += ChatColor.RED + "" + ChatColor.BOLD + "6" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("clear") + "\n";
|
||||||
|
text += ChatColor.GREEN + "" + ChatColor.BOLD + "7" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("done");
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetMobTypes") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorSetMobTypes") + "\n";
|
||||||
for (String s : getMobTypes(context)) {
|
for (String s : getMobTypes(context)) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.AQUA + s + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.AQUA + s + "\n";
|
||||||
}
|
}
|
||||||
if (context.getSessionData(pref + CK.S_MOB_AMOUNTS) == null) {
|
if (context.getSessionData(pref + CK.S_MOB_AMOUNTS) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetMobAmounts") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorSetMobAmounts") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetMobAmounts") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorSetMobAmounts") + "\n";
|
||||||
for (Integer i : getMobAmounts(context)) {
|
for (Integer i : getMobAmounts(context)) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.AQUA + i + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.AQUA + i + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (context.getSessionData(pref + CK.S_MOB_KILL_LOCATIONS) == null) {
|
if (context.getSessionData(pref + CK.S_MOB_KILL_LOCATIONS) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.BLUE + " - " + Lang.get("stageEditorSetKillLocations") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.BLUE + " - "
|
||||||
|
+ Lang.get("stageEditorSetKillLocations") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.BLUE + " - " + Lang.get("stageEditorSetKillLocations") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.BLUE + " - "
|
||||||
|
+ Lang.get("stageEditorSetKillLocations") + "\n";
|
||||||
for (String s : getKillLocations(context)) {
|
for (String s : getKillLocations(context)) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.AQUA + s + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.AQUA + s + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (context.getSessionData(pref + CK.S_MOB_KILL_LOCATIONS_RADIUS) == null) {
|
if (context.getSessionData(pref + CK.S_MOB_KILL_LOCATIONS_RADIUS) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.BLUE + " - " + Lang.get("stageEditorSetKillLocationRadii") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.BLUE + " - "
|
||||||
|
+ Lang.get("stageEditorSetKillLocationRadii") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.BLUE + " - " + Lang.get("stageEditorSetKillLocationRadii") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.BLUE + " - "
|
||||||
|
+ Lang.get("stageEditorSetKillLocationRadii") + "\n";
|
||||||
for (int i : getKillRadii(context)) {
|
for (int i : getKillRadii(context)) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.AQUA + i + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.AQUA + i + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (context.getSessionData(pref + CK.S_MOB_KILL_LOCATIONS_NAMES) == null) {
|
if (context.getSessionData(pref + CK.S_MOB_KILL_LOCATIONS_NAMES) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "5" + ChatColor.RESET + ChatColor.BLUE + " - " + Lang.get("stageEditorSetKillLocationNames") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "5" + ChatColor.RESET + ChatColor.BLUE + " - "
|
||||||
|
+ Lang.get("stageEditorSetKillLocationNames") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "5" + ChatColor.RESET + ChatColor.BLUE + " - " + Lang.get("stageEditorSetKillLocationNames") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "5" + ChatColor.RESET + ChatColor.BLUE + " - "
|
||||||
|
+ Lang.get("stageEditorSetKillLocationNames") + "\n";
|
||||||
for (String s : getKillLocationNames(context)) {
|
for (String s : getKillLocationNames(context)) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.AQUA + s + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.AQUA + s + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
text += ChatColor.RED + "" + ChatColor.BOLD + "6" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("clear") + "\n";
|
text += ChatColor.RED + "" + ChatColor.BOLD + "6" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
text += ChatColor.GREEN + "" + ChatColor.BOLD + "7" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("done");
|
+ Lang.get("clear") + "\n";
|
||||||
|
text += ChatColor.GREEN + "" + ChatColor.BOLD + "7" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("done");
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
@ -322,9 +360,9 @@ public class MobsPrompt extends FixedSetPrompt {
|
|||||||
mobArr.removeAll(toRemove);
|
mobArr.removeAll(toRemove);
|
||||||
for (int i = 0; i < mobArr.size(); i++) {
|
for (int i = 0; i < mobArr.size(); i++) {
|
||||||
if (i < (mobArr.size() - 1)) {
|
if (i < (mobArr.size() - 1)) {
|
||||||
mobs += MiscUtil.getProperMobName(mobArr.get(i)) + ", ";
|
mobs += MiscUtil.snakeCaseToUpperCamelCase(mobArr.get(i).name()) + ", ";
|
||||||
} else {
|
} else {
|
||||||
mobs += MiscUtil.getProperMobName(mobArr.get(i)) + "\n";
|
mobs += MiscUtil.snakeCaseToUpperCamelCase(mobArr.get(i).name()) + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return mobs + ChatColor.YELLOW + Lang.get("stageEditorMobsPrompt");
|
return mobs + ChatColor.YELLOW + Lang.get("stageEditorMobsPrompt");
|
||||||
@ -336,11 +374,12 @@ public class MobsPrompt extends FixedSetPrompt {
|
|||||||
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false) {
|
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false) {
|
||||||
LinkedList<String> mobTypes = new LinkedList<String>();
|
LinkedList<String> mobTypes = new LinkedList<String>();
|
||||||
for (String s : input.split(" ")) {
|
for (String s : input.split(" ")) {
|
||||||
if (Quests.getMobType(s) != null) {
|
if (MiscUtil.getProperMobType(s) != null) {
|
||||||
mobTypes.add(s);
|
mobTypes.add(s);
|
||||||
context.setSessionData(pref + CK.S_MOB_TYPES, mobTypes);
|
context.setSessionData(pref + CK.S_MOB_TYPES, mobTypes);
|
||||||
} else {
|
} else {
|
||||||
player.sendMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED + Lang.get("stageEditorInvalidMob"));
|
player.sendMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED
|
||||||
|
+ Lang.get("stageEditorInvalidMob"));
|
||||||
return new MobTypesPrompt();
|
return new MobTypesPrompt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -365,7 +404,8 @@ public class MobsPrompt extends FixedSetPrompt {
|
|||||||
try {
|
try {
|
||||||
int i = Integer.parseInt(s);
|
int i = Integer.parseInt(s);
|
||||||
if (i < 1) {
|
if (i < 1) {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidMinimum").replace("<number>", "1"));
|
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidMinimum")
|
||||||
|
.replace("<number>", "1"));
|
||||||
return new MobAmountsPrompt();
|
return new MobAmountsPrompt();
|
||||||
}
|
}
|
||||||
mobAmounts.add(i);
|
mobAmounts.add(i);
|
||||||
@ -401,7 +441,7 @@ public class MobsPrompt extends FixedSetPrompt {
|
|||||||
} else {
|
} else {
|
||||||
locs = new LinkedList<String>();
|
locs = new LinkedList<String>();
|
||||||
}
|
}
|
||||||
locs.add(Quests.getLocationInfo(loc));
|
locs.add(ConfigUtil.getLocationInfo(loc));
|
||||||
context.setSessionData(pref + CK.S_MOB_KILL_LOCATIONS, locs);
|
context.setSessionData(pref + CK.S_MOB_KILL_LOCATIONS, locs);
|
||||||
Map<UUID, Block> temp = questFactory.getSelectedKillLocations();
|
Map<UUID, Block> temp = questFactory.getSelectedKillLocations();
|
||||||
temp.remove(player.getUniqueId());
|
temp.remove(player.getUniqueId());
|
||||||
@ -438,12 +478,14 @@ public class MobsPrompt extends FixedSetPrompt {
|
|||||||
try {
|
try {
|
||||||
int i = Integer.parseInt(s);
|
int i = Integer.parseInt(s);
|
||||||
if (i < 1) {
|
if (i < 1) {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidMinimum").replace("<number>", "1"));
|
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidMinimum")
|
||||||
|
.replace("<number>", "1"));
|
||||||
return new MobRadiiPrompt();
|
return new MobRadiiPrompt();
|
||||||
}
|
}
|
||||||
radii.add(i);
|
radii.add(i);
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
player.sendMessage(ChatColor.LIGHT_PURPLE + input + " " + ChatColor.RED + Lang.get("stageEditorInvalidItemName"));
|
player.sendMessage(ChatColor.LIGHT_PURPLE + input + " " + ChatColor.RED
|
||||||
|
+ Lang.get("stageEditorInvalidItemName"));
|
||||||
return new MobRadiiPrompt();
|
return new MobRadiiPrompt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -480,7 +522,8 @@ public class MobsPrompt extends FixedSetPrompt {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Prompt acceptInput(ConversationContext context, String input) {
|
public Prompt acceptInput(ConversationContext context, String input) {
|
||||||
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false && input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false
|
||||||
|
&& input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
||||||
try {
|
try {
|
||||||
int i = Integer.parseInt(input);
|
int i = Integer.parseInt(input);
|
||||||
if (i < 0) {
|
if (i < 0) {
|
||||||
@ -490,7 +533,8 @@ public class MobsPrompt extends FixedSetPrompt {
|
|||||||
context.setSessionData(pref + CK.S_FISH, i);
|
context.setSessionData(pref + CK.S_FISH, i);
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("reqNotANumber").replace("<input>", input));
|
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("reqNotANumber")
|
||||||
|
.replace("<input>", input));
|
||||||
return new FishPrompt();
|
return new FishPrompt();
|
||||||
}
|
}
|
||||||
} else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) {
|
} else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) {
|
||||||
@ -510,25 +554,34 @@ public class MobsPrompt extends FixedSetPrompt {
|
|||||||
public String getPromptText(ConversationContext context) {
|
public String getPromptText(ConversationContext context) {
|
||||||
String text = ChatColor.GOLD + "- " + Lang.get("stageEditorTameMobs") + " -\n";
|
String text = ChatColor.GOLD + "- " + Lang.get("stageEditorTameMobs") + " -\n";
|
||||||
if (context.getSessionData(pref + CK.S_TAME_TYPES) == null) {
|
if (context.getSessionData(pref + CK.S_TAME_TYPES) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetMobTypes") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
text += ChatColor.GRAY + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.GRAY + Lang.get("stageEditorSetTameAmounts") + " (" + Lang.get("noneSet") + ")\n";
|
+ Lang.get("stageEditorSetMobTypes") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
text += ChatColor.RED + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("clear") + "\n";
|
text += ChatColor.GRAY + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.GRAY
|
||||||
text += ChatColor.GREEN + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("done");
|
+ Lang.get("stageEditorSetTameAmounts") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
|
text += ChatColor.RED + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("clear") + "\n";
|
||||||
|
text += ChatColor.GREEN + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("done");
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetMobTypes") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorSetMobTypes") + "\n";
|
||||||
for (String s : getTameTypes(context)) {
|
for (String s : getTameTypes(context)) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.AQUA + s + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.AQUA + s + "\n";
|
||||||
}
|
}
|
||||||
if (context.getSessionData(pref + CK.S_TAME_AMOUNTS) == null) {
|
if (context.getSessionData(pref + CK.S_TAME_AMOUNTS) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetTameAmounts") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorSetTameAmounts") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetTameAmounts") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorSetTameAmounts") + "\n";
|
||||||
for (Integer i : getTameAmounts(context)) {
|
for (Integer i : getTameAmounts(context)) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.AQUA + i + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.AQUA + i + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
text += ChatColor.RED + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("clear") + "\n";
|
text += ChatColor.RED + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
text += ChatColor.GREEN + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("done");
|
+ Lang.get("clear") + "\n";
|
||||||
|
text += ChatColor.GREEN + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("done");
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
@ -595,7 +648,7 @@ public class MobsPrompt extends FixedSetPrompt {
|
|||||||
if (type.isAlive() == false || Tameable.class.isAssignableFrom(type.getEntityClass()) == false) {
|
if (type.isAlive() == false || Tameable.class.isAssignableFrom(type.getEntityClass()) == false) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
mobs += MiscUtil.getProperMobName(mobArr[i]) + ", ";
|
mobs += MiscUtil.snakeCaseToUpperCamelCase(mobArr[i].name()) + ", ";
|
||||||
}
|
}
|
||||||
mobs = mobs.substring(0, mobs.length() - 2) + "\n";
|
mobs = mobs.substring(0, mobs.length() - 2) + "\n";
|
||||||
return mobs + ChatColor.YELLOW + Lang.get("stageEditorMobsPrompt");
|
return mobs + ChatColor.YELLOW + Lang.get("stageEditorMobsPrompt");
|
||||||
@ -607,17 +660,19 @@ public class MobsPrompt extends FixedSetPrompt {
|
|||||||
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false) {
|
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false) {
|
||||||
LinkedList<String> mobTypes = new LinkedList<String>();
|
LinkedList<String> mobTypes = new LinkedList<String>();
|
||||||
for (String s : input.split(" ")) {
|
for (String s : input.split(" ")) {
|
||||||
if (Quests.getMobType(s) != null) {
|
if (MiscUtil.getProperMobType(s) != null) {
|
||||||
final EntityType type = Quests.getMobType(s);
|
final EntityType type = MiscUtil.getProperMobType(s);
|
||||||
if (type.isAlive() || Tameable.class.isAssignableFrom(type.getEntityClass())) {
|
if (type.isAlive() || Tameable.class.isAssignableFrom(type.getEntityClass())) {
|
||||||
mobTypes.add(MiscUtil.getPrettyMobName(type));
|
mobTypes.add(MiscUtil.getPrettyMobName(type));
|
||||||
context.setSessionData(pref + CK.S_TAME_TYPES, mobTypes);
|
context.setSessionData(pref + CK.S_TAME_TYPES, mobTypes);
|
||||||
} else {
|
} else {
|
||||||
player.sendMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED + Lang.get("stageEditorInvalidMob"));
|
player.sendMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED
|
||||||
|
+ Lang.get("stageEditorInvalidMob"));
|
||||||
return new TameTypesPrompt();
|
return new TameTypesPrompt();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
player.sendMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED + Lang.get("stageEditorInvalidMob"));
|
player.sendMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED
|
||||||
|
+ Lang.get("stageEditorInvalidMob"));
|
||||||
return new TameTypesPrompt();
|
return new TameTypesPrompt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -642,12 +697,14 @@ public class MobsPrompt extends FixedSetPrompt {
|
|||||||
try {
|
try {
|
||||||
int i = Integer.parseInt(s);
|
int i = Integer.parseInt(s);
|
||||||
if (i < 1) {
|
if (i < 1) {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidMinimum").replace("<number>", "1"));
|
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidMinimum")
|
||||||
|
.replace("<number>", "1"));
|
||||||
return new TameAmountsPrompt();
|
return new TameAmountsPrompt();
|
||||||
}
|
}
|
||||||
mobAmounts.add(i);
|
mobAmounts.add(i);
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
player.sendMessage(ChatColor.RED + Lang.get("reqNotANumber").replace("<input>", input));
|
player.sendMessage(ChatColor.RED + Lang.get("reqNotANumber")
|
||||||
|
.replace("<input>", input));
|
||||||
return new TameAmountsPrompt();
|
return new TameAmountsPrompt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -667,25 +724,34 @@ public class MobsPrompt extends FixedSetPrompt {
|
|||||||
public String getPromptText(ConversationContext context) {
|
public String getPromptText(ConversationContext context) {
|
||||||
String text = ChatColor.GOLD + "- " + Lang.get("stageEditorShearSheep") + " -\n";
|
String text = ChatColor.GOLD + "- " + Lang.get("stageEditorShearSheep") + " -\n";
|
||||||
if (context.getSessionData(pref + CK.S_SHEAR_COLORS) == null) {
|
if (context.getSessionData(pref + CK.S_SHEAR_COLORS) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetShearColors") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
text += ChatColor.GRAY + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.GRAY + Lang.get("stageEditorSetShearAmounts") + " (" + Lang.get("noneSet") + ")\n";
|
+ Lang.get("stageEditorSetShearColors") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
text += ChatColor.RED + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("clear") + "\n";
|
text += ChatColor.GRAY + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.GRAY
|
||||||
text += ChatColor.GREEN + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("done");
|
+ Lang.get("stageEditorSetShearAmounts") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
|
text += ChatColor.RED + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("clear") + "\n";
|
||||||
|
text += ChatColor.GREEN + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("done");
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetShearColors") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorSetShearColors") + "\n";
|
||||||
for (String s : getShearColors(context)) {
|
for (String s : getShearColors(context)) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.AQUA + s + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.AQUA + s + "\n";
|
||||||
}
|
}
|
||||||
if (context.getSessionData(pref + CK.S_SHEAR_AMOUNTS) == null) {
|
if (context.getSessionData(pref + CK.S_SHEAR_AMOUNTS) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetShearAmounts") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorSetShearAmounts") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetShearAmounts") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorSetShearAmounts") + "\n";
|
||||||
for (Integer i : getShearAmounts(context)) {
|
for (Integer i : getShearAmounts(context)) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.AQUA + i + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.AQUA + i + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
text += ChatColor.RED + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("clear") + "\n";
|
text += ChatColor.RED + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
text += ChatColor.GREEN + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("done");
|
+ Lang.get("clear") + "\n";
|
||||||
|
text += ChatColor.GREEN + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("done");
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
@ -767,7 +833,8 @@ public class MobsPrompt extends FixedSetPrompt {
|
|||||||
colors.add(MiscUtil.getDyeString(MiscUtil.getDyeColor(s)));
|
colors.add(MiscUtil.getDyeString(MiscUtil.getDyeColor(s)));
|
||||||
context.setSessionData(pref + CK.S_SHEAR_COLORS, colors);
|
context.setSessionData(pref + CK.S_SHEAR_COLORS, colors);
|
||||||
} else {
|
} else {
|
||||||
player.sendMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED + Lang.get("stageEditorInvalidDye"));
|
player.sendMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED
|
||||||
|
+ Lang.get("stageEditorInvalidDye"));
|
||||||
return new ShearColorsPrompt();
|
return new ShearColorsPrompt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -792,7 +859,8 @@ public class MobsPrompt extends FixedSetPrompt {
|
|||||||
try {
|
try {
|
||||||
int i = Integer.parseInt(s);
|
int i = Integer.parseInt(s);
|
||||||
if (i < 1) {
|
if (i < 1) {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidMinimum").replace("<number>", "1"));
|
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidMinimum")
|
||||||
|
.replace("<number>", "1"));
|
||||||
return new ShearAmountsPrompt();
|
return new ShearAmountsPrompt();
|
||||||
}
|
}
|
||||||
shearAmounts.add(i);
|
shearAmounts.add(i);
|
||||||
|
@ -52,46 +52,71 @@ public class NPCsPrompt extends FixedSetPrompt {
|
|||||||
String text = ChatColor.AQUA + "- " + Lang.get("stageEditorNPCs") + " -\n";
|
String text = ChatColor.AQUA + "- " + Lang.get("stageEditorNPCs") + " -\n";
|
||||||
if (plugin.getDependencies().getCitizens() != null) {
|
if (plugin.getDependencies().getCitizens() != null) {
|
||||||
if (context.getSessionData(pref + CK.S_DELIVERY_ITEMS) == null) {
|
if (context.getSessionData(pref + CK.S_DELIVERY_ITEMS) == null) {
|
||||||
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "1 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE + "- " + Lang.get("stageEditorDeliverItems") + ChatColor.GRAY + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "1 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE
|
||||||
|
+ "- " + Lang.get("stageEditorDeliverItems") + ChatColor.GRAY + " (" + Lang.get("noneSet")
|
||||||
|
+ ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "1 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE + "- " + Lang.get("stageEditorDeliverItems") + "\n";
|
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "1 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE
|
||||||
|
+ "- " + Lang.get("stageEditorDeliverItems") + "\n";
|
||||||
LinkedList<Integer> npcs = (LinkedList<Integer>) context.getSessionData(pref + CK.S_DELIVERY_NPCS);
|
LinkedList<Integer> npcs = (LinkedList<Integer>) context.getSessionData(pref + CK.S_DELIVERY_NPCS);
|
||||||
LinkedList<ItemStack> items = (LinkedList<ItemStack>) context.getSessionData(pref + CK.S_DELIVERY_ITEMS);
|
LinkedList<ItemStack> items
|
||||||
|
= (LinkedList<ItemStack>) context.getSessionData(pref + CK.S_DELIVERY_ITEMS);
|
||||||
for (int i = 0; i < npcs.size(); i++) {
|
for (int i = 0; i < npcs.size(); i++) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.BLUE + ItemUtil.getName(items.get(i)) + ChatColor.GRAY + " x " + ChatColor.AQUA + items.get(i).getAmount() + ChatColor.GRAY + " " + Lang.get("to") + " " + ChatColor.DARK_AQUA + plugin.getDependencies().getCitizens().getNPCRegistry().getById(npcs.get(i)).getName() + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.BLUE + ItemUtil.getName(items.get(i))
|
||||||
|
+ ChatColor.GRAY + " x " + ChatColor.AQUA + items.get(i).getAmount() + ChatColor.GRAY + " "
|
||||||
|
+ Lang.get("to") + " " + ChatColor.DARK_AQUA
|
||||||
|
+ plugin.getDependencies().getCitizens().getNPCRegistry().getById(npcs.get(i)).getName()
|
||||||
|
+ "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.GRAY + "" + ChatColor.BOLD + "1 " + ChatColor.RESET + ChatColor.GRAY + "- " + Lang.get("stageEditorDeliverItems") + ChatColor.GRAY + " (" + Lang.get("questCitNotInstalled") + ")\n";
|
text += ChatColor.GRAY + "" + ChatColor.BOLD + "1 " + ChatColor.RESET + ChatColor.GRAY + "- "
|
||||||
|
+ Lang.get("stageEditorDeliverItems") + ChatColor.GRAY + " (" + Lang.get("questCitNotInstalled")
|
||||||
|
+ ")\n";
|
||||||
}
|
}
|
||||||
if (plugin.getDependencies().getCitizens() != null) {
|
if (plugin.getDependencies().getCitizens() != null) {
|
||||||
if (context.getSessionData(pref + CK.S_NPCS_TO_TALK_TO) == null) {
|
if (context.getSessionData(pref + CK.S_NPCS_TO_TALK_TO) == null) {
|
||||||
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "2 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE + "- " + Lang.get("stageEditorTalkToNPCs") + ChatColor.GRAY + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "2 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE
|
||||||
|
+ "- " + Lang.get("stageEditorTalkToNPCs") + ChatColor.GRAY + " (" + Lang.get("noneSet")
|
||||||
|
+ ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "2 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE + "- " + Lang.get("stageEditorTalkToNPCs") + "\n";
|
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "2 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE
|
||||||
|
+ "- " + Lang.get("stageEditorTalkToNPCs") + "\n";
|
||||||
LinkedList<Integer> npcs = (LinkedList<Integer>) context.getSessionData(pref + CK.S_NPCS_TO_TALK_TO);
|
LinkedList<Integer> npcs = (LinkedList<Integer>) context.getSessionData(pref + CK.S_NPCS_TO_TALK_TO);
|
||||||
for (int i = 0; i < npcs.size(); i++) {
|
for (int i = 0; i < npcs.size(); i++) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.BLUE + plugin.getDependencies().getCitizens().getNPCRegistry().getById(npcs.get(i)).getName() + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.BLUE
|
||||||
|
+ plugin.getDependencies().getCitizens().getNPCRegistry().getById(npcs.get(i)).getName()
|
||||||
|
+ "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.GRAY + "" + ChatColor.BOLD + "2 " + ChatColor.RESET + ChatColor.GRAY + "- " + Lang.get("stageEditorTalkToNPCs") + ChatColor.GRAY + " (" + Lang.get("questCitNotInstalled") + ")\n";
|
text += ChatColor.GRAY + "" + ChatColor.BOLD + "2 " + ChatColor.RESET + ChatColor.GRAY + "- "
|
||||||
|
+ Lang.get("stageEditorTalkToNPCs") + ChatColor.GRAY + " (" + Lang.get("questCitNotInstalled")
|
||||||
|
+ ")\n";
|
||||||
}
|
}
|
||||||
if (plugin.getDependencies().getCitizens() != null) {
|
if (plugin.getDependencies().getCitizens() != null) {
|
||||||
if (context.getSessionData(pref + CK.S_NPCS_TO_KILL) == null) {
|
if (context.getSessionData(pref + CK.S_NPCS_TO_KILL) == null) {
|
||||||
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "3 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE + "- " + Lang.get("stageEditorKillNPCs") + ChatColor.GRAY + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "3 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE
|
||||||
|
+ "- " + Lang.get("stageEditorKillNPCs") + ChatColor.GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "3 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE + "- " + Lang.get("stageEditorKillNPCs") + "\n";
|
text += ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "3 " + ChatColor.RESET + ChatColor.LIGHT_PURPLE
|
||||||
|
+ "- " + Lang.get("stageEditorKillNPCs") + "\n";
|
||||||
LinkedList<Integer> npcs = (LinkedList<Integer>) context.getSessionData(pref + CK.S_NPCS_TO_KILL);
|
LinkedList<Integer> npcs = (LinkedList<Integer>) context.getSessionData(pref + CK.S_NPCS_TO_KILL);
|
||||||
LinkedList<Integer> amounts = (LinkedList<Integer>) context.getSessionData(pref + CK.S_NPCS_TO_KILL_AMOUNTS);
|
LinkedList<Integer> amounts
|
||||||
|
= (LinkedList<Integer>) context.getSessionData(pref + CK.S_NPCS_TO_KILL_AMOUNTS);
|
||||||
for (int i = 0; i < npcs.size(); i++) {
|
for (int i = 0; i < npcs.size(); i++) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.BLUE + plugin.getDependencies().getCitizens().getNPCRegistry().getById(npcs.get(i)).getName() + ChatColor.GRAY + " x " + ChatColor.AQUA + amounts.get(i) + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.BLUE
|
||||||
|
+ plugin.getDependencies().getCitizens().getNPCRegistry().getById(npcs.get(i)).getName()
|
||||||
|
+ ChatColor.GRAY + " x " + ChatColor.AQUA + amounts.get(i) + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.GRAY + "" + ChatColor.BOLD + "3 " + ChatColor.RESET + ChatColor.GRAY + "- " + Lang.get("stageEditorKillNPCs") + ChatColor.GRAY + " (" + Lang.get("questCitNotInstalled") + ")\n";
|
text += ChatColor.GRAY + "" + ChatColor.BOLD + "3 " + ChatColor.RESET + ChatColor.GRAY + "- "
|
||||||
|
+ Lang.get("stageEditorKillNPCs") + ChatColor.GRAY + " (" + Lang.get("questCitNotInstalled")
|
||||||
|
+ ")\n";
|
||||||
}
|
}
|
||||||
text += ChatColor.GREEN + "" + ChatColor.BOLD + "4 " + ChatColor.RESET + ChatColor.DARK_PURPLE + "- " + Lang.get("done") + "\n";
|
text += ChatColor.GREEN + "" + ChatColor.BOLD + "4 " + ChatColor.RESET + ChatColor.DARK_PURPLE + "- "
|
||||||
|
+ Lang.get("done") + "\n";
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -152,40 +177,52 @@ public class NPCsPrompt extends FixedSetPrompt {
|
|||||||
String text = ChatColor.GOLD + "- " + Lang.get("stageEditorDeliverItems") + " -\n";
|
String text = ChatColor.GOLD + "- " + Lang.get("stageEditorDeliverItems") + " -\n";
|
||||||
if (context.getSessionData(pref + CK.S_DELIVERY_ITEMS) == null) {
|
if (context.getSessionData(pref + CK.S_DELIVERY_ITEMS) == null) {
|
||||||
text += ChatColor.GRAY + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorDeliveryAddItem") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
text += ChatColor.GRAY + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.GRAY + " - " + Lang.get("stageEditorDeliveryNPCs") + " (" + Lang.get("noneSet") + ")\n";
|
+ Lang.get("stageEditorDeliveryAddItem") + "\n";
|
||||||
|
text += ChatColor.GRAY + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.GRAY + " - "
|
||||||
|
+ Lang.get("stageEditorDeliveryNPCs") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
if (context.getSessionData(pref + CK.S_DELIVERY_MESSAGES) == null) {
|
if (context.getSessionData(pref + CK.S_DELIVERY_MESSAGES) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.BLUE + " - " + Lang.get("stageEditorDeliveryMessages") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.BLUE + " - "
|
||||||
|
+ Lang.get("stageEditorDeliveryMessages") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.BLUE + " - " + Lang.get("stageEditorDeliveryMessages") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.BLUE + " - "
|
||||||
|
+ Lang.get("stageEditorDeliveryMessages") + "\n";
|
||||||
for (String s : getDeliveryMessages(context)) {
|
for (String s : getDeliveryMessages(context)) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.AQUA + "\"" + s + "\"";
|
text += ChatColor.GRAY + " - " + ChatColor.AQUA + "\"" + s + "\"";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorDeliveryAddItem") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorDeliveryAddItem") + "\n";
|
||||||
for (ItemStack is : getItems(context)) {
|
for (ItemStack is : getItems(context)) {
|
||||||
text += ChatColor.GRAY + " - " + ItemUtil.getDisplayString(is) + "\n";
|
text += ChatColor.GRAY + " - " + ItemUtil.getDisplayString(is) + "\n";
|
||||||
}
|
}
|
||||||
if (context.getSessionData(pref + CK.S_DELIVERY_NPCS) == null) {
|
if (context.getSessionData(pref + CK.S_DELIVERY_NPCS) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorDeliveryNPCs") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorDeliveryNPCs") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorDeliveryNPCs") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorDeliveryNPCs") + "\n";
|
||||||
for (int i : getDeliveryNPCs(context)) {
|
for (int i : getDeliveryNPCs(context)) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.AQUA + i + " (" + plugin.getDependencies().getCitizens().getNPCRegistry().getById(i).getName() + ")\n";
|
text += ChatColor.GRAY + " - " + ChatColor.AQUA + i + " ("
|
||||||
|
+ plugin.getDependencies().getCitizens().getNPCRegistry().getById(i).getName() + ")\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (context.getSessionData(pref + CK.S_DELIVERY_MESSAGES) == null) {
|
if (context.getSessionData(pref + CK.S_DELIVERY_MESSAGES) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.BLUE + " - " + Lang.get("stageEditorDeliveryMessages") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.BLUE + " - "
|
||||||
|
+ Lang.get("stageEditorDeliveryMessages") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.BLUE + " - " + Lang.get("stageEditorDeliveryMessages") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.BLUE + " - "
|
||||||
|
+ Lang.get("stageEditorDeliveryMessages") + "\n";
|
||||||
for (String s : getDeliveryMessages(context)) {
|
for (String s : getDeliveryMessages(context)) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.AQUA + "\"" + s + "\"\n";
|
text += ChatColor.GRAY + " - " + ChatColor.AQUA + "\"" + s + "\"\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
text += ChatColor.RED + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("clear") + "\n";
|
text += ChatColor.RED + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
text += ChatColor.GREEN + "" + ChatColor.BOLD + "5" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("done");
|
+ Lang.get("clear") + "\n";
|
||||||
|
text += ChatColor.GREEN + "" + ChatColor.BOLD + "5" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("done");
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -274,11 +311,13 @@ public class NPCsPrompt extends FixedSetPrompt {
|
|||||||
if (plugin.getDependencies().getCitizens().getNPCRegistry().getById(i) != null) {
|
if (plugin.getDependencies().getCitizens().getNPCRegistry().getById(i) != null) {
|
||||||
npcs.add(i);
|
npcs.add(i);
|
||||||
} else {
|
} else {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + "" + i + ChatColor.RED + " " + Lang.get("stageEditorInvalidNPC"));
|
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + "" + i + ChatColor.RED + " "
|
||||||
|
+ Lang.get("stageEditorInvalidNPC"));
|
||||||
return new DeliveryNPCsPrompt();
|
return new DeliveryNPCsPrompt();
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED + Lang.get("stageEditorNotListofNumbers"));
|
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED
|
||||||
|
+ Lang.get("stageEditorNotListofNumbers"));
|
||||||
return new DeliveryNPCsPrompt();
|
return new DeliveryNPCsPrompt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -318,12 +357,14 @@ public class NPCsPrompt extends FixedSetPrompt {
|
|||||||
HashSet<Player> temp = questFactory.getSelectingNpcs();
|
HashSet<Player> temp = questFactory.getSelectingNpcs();
|
||||||
temp.add((Player) context.getForWhom());
|
temp.add((Player) context.getForWhom());
|
||||||
questFactory.setSelectingNpcs(temp);
|
questFactory.setSelectingNpcs(temp);
|
||||||
return ChatColor.YELLOW + Lang.get("stageEditorNPCToTalkToPrompt") + "\n" + ChatColor.GOLD + Lang.get("npcHint");
|
return ChatColor.YELLOW + Lang.get("stageEditorNPCToTalkToPrompt") + "\n" + ChatColor.GOLD
|
||||||
|
+ Lang.get("npcHint");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Prompt acceptInput(ConversationContext context, String input) {
|
public Prompt acceptInput(ConversationContext context, String input) {
|
||||||
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false && input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false
|
||||||
|
&& input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
||||||
String[] args = input.split(" ");
|
String[] args = input.split(" ");
|
||||||
LinkedList<Integer> npcs = new LinkedList<Integer>();
|
LinkedList<Integer> npcs = new LinkedList<Integer>();
|
||||||
for (String s : args) {
|
for (String s : args) {
|
||||||
@ -332,11 +373,13 @@ public class NPCsPrompt extends FixedSetPrompt {
|
|||||||
if (plugin.getDependencies().getCitizens().getNPCRegistry().getById(i) != null) {
|
if (plugin.getDependencies().getCitizens().getNPCRegistry().getById(i) != null) {
|
||||||
npcs.add(i);
|
npcs.add(i);
|
||||||
} else {
|
} else {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + "" + i + ChatColor.RED + " " + Lang.get("stageEditorInvalidNPC"));
|
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + "" + i + ChatColor.RED + " "
|
||||||
|
+ Lang.get("stageEditorInvalidNPC"));
|
||||||
return new NPCIDsToTalkToPrompt();
|
return new NPCIDsToTalkToPrompt();
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED + Lang.get("stageEditorNotListofNumbers"));
|
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED
|
||||||
|
+ Lang.get("stageEditorNotListofNumbers"));
|
||||||
return new NPCIDsToTalkToPrompt();
|
return new NPCIDsToTalkToPrompt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -361,25 +404,36 @@ public class NPCsPrompt extends FixedSetPrompt {
|
|||||||
public String getPromptText(ConversationContext context) {
|
public String getPromptText(ConversationContext context) {
|
||||||
String text = ChatColor.GOLD + "- " + Lang.get("stageEditorKillNPCs") + " -\n";
|
String text = ChatColor.GOLD + "- " + Lang.get("stageEditorKillNPCs") + " -\n";
|
||||||
if (context.getSessionData(pref + CK.S_NPCS_TO_KILL) == null) {
|
if (context.getSessionData(pref + CK.S_NPCS_TO_KILL) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetKillIds") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
text += ChatColor.GRAY + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetKillAmounts") + " (" + Lang.get("noIdsSet") + ")\n";
|
+ Lang.get("stageEditorSetKillIds") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("cancel") + "\n";
|
text += ChatColor.GRAY + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("done");
|
+ Lang.get("stageEditorSetKillAmounts") + " (" + Lang.get("noIdsSet") + ")\n";
|
||||||
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("cancel") + "\n";
|
||||||
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("done");
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetKillIds") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorSetKillIds") + "\n";
|
||||||
for (Integer i : getNPCIds(context)) {
|
for (Integer i : getNPCIds(context)) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.AQUA + plugin.getDependencies().getCitizens().getNPCRegistry().getById(i).getName() + ChatColor.DARK_AQUA + " (" + i + ")\n";
|
text += ChatColor.GRAY + " - " + ChatColor.AQUA
|
||||||
|
+ plugin.getDependencies().getCitizens().getNPCRegistry().getById(i).getName()
|
||||||
|
+ ChatColor.DARK_AQUA + " (" + i + ")\n";
|
||||||
}
|
}
|
||||||
if (context.getSessionData(pref + CK.S_NPCS_TO_KILL_AMOUNTS) == null) {
|
if (context.getSessionData(pref + CK.S_NPCS_TO_KILL_AMOUNTS) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.BLUE + " - " + Lang.get("stageEditorSetKillAmounts") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.BLUE + " - "
|
||||||
|
+ Lang.get("stageEditorSetKillAmounts") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorSetKillAmounts") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorSetKillAmounts") + "\n";
|
||||||
for (Integer i : getKillAmounts(context)) {
|
for (Integer i : getKillAmounts(context)) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.BLUE + i + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.BLUE + i + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
text += ChatColor.RED + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("clear") + "\n";
|
text += ChatColor.RED + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
text += ChatColor.GREEN + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("done");
|
+ Lang.get("clear") + "\n";
|
||||||
|
text += ChatColor.GREEN + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("done");
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
@ -456,11 +510,13 @@ public class NPCsPrompt extends FixedSetPrompt {
|
|||||||
if (plugin.getDependencies().getCitizens().getNPCRegistry().getById(i) != null) {
|
if (plugin.getDependencies().getCitizens().getNPCRegistry().getById(i) != null) {
|
||||||
npcs.add(i);
|
npcs.add(i);
|
||||||
} else {
|
} else {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + "" + i + ChatColor.RED + " " + Lang.get("stageEditorInvalidNPC"));
|
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + "" + i + ChatColor.RED + " "
|
||||||
|
+ Lang.get("stageEditorInvalidNPC"));
|
||||||
return new NpcIdsToKillPrompt();
|
return new NpcIdsToKillPrompt();
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED + Lang.get("stageEditorNotListofNumbers"));
|
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED
|
||||||
|
+ Lang.get("stageEditorNotListofNumbers"));
|
||||||
return new NpcIdsToKillPrompt();
|
return new NpcIdsToKillPrompt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -490,11 +546,13 @@ public class NPCsPrompt extends FixedSetPrompt {
|
|||||||
if (Integer.parseInt(s) > 0) {
|
if (Integer.parseInt(s) > 0) {
|
||||||
amounts.add(Integer.parseInt(s));
|
amounts.add(Integer.parseInt(s));
|
||||||
} else {
|
} else {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidMinimum").replace("<number>", "1"));
|
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidMinimum")
|
||||||
|
.replace("<number>", "1"));
|
||||||
return new NpcAmountsToKillPrompt();
|
return new NpcAmountsToKillPrompt();
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED + Lang.get("stageEditorNotListofNumbers"));
|
context.getForWhom().sendRawMessage(ChatColor.LIGHT_PURPLE + s + " " + ChatColor.RED
|
||||||
|
+ Lang.get("stageEditorNotListofNumbers"));
|
||||||
return new NpcAmountsToKillPrompt();
|
return new NpcAmountsToKillPrompt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -82,9 +82,12 @@ public class OptionsPrompt extends NumericPrompt {
|
|||||||
QuestsEditorPostOpenOptionsPromptEvent event = new QuestsEditorPostOpenOptionsPromptEvent(factory, context);
|
QuestsEditorPostOpenOptionsPromptEvent event = new QuestsEditorPostOpenOptionsPromptEvent(factory, context);
|
||||||
plugin.getServer().getPluginManager().callEvent(event);
|
plugin.getServer().getPluginManager().callEvent(event);
|
||||||
|
|
||||||
String text = ChatColor.DARK_GREEN + getTitle(context).replace((String) context.getSessionData(CK.Q_NAME), ChatColor.AQUA + (String) context.getSessionData(CK.Q_NAME) + ChatColor.DARK_GREEN) + "\n";
|
String text = ChatColor.DARK_GREEN + getTitle(context)
|
||||||
|
.replace((String) context.getSessionData(CK.Q_NAME), ChatColor.AQUA
|
||||||
|
+ (String) context.getSessionData(CK.Q_NAME) + ChatColor.DARK_GREEN) + "\n";
|
||||||
for (int i = 1; i <= size; i++) {
|
for (int i = 1; i <= size; i++) {
|
||||||
text += getNumberColor(context, i) + "" + ChatColor.BOLD + i + ChatColor.RESET + " - " + getSelectionText(context, i) + "\n";
|
text += getNumberColor(context, i) + "" + ChatColor.BOLD + i + ChatColor.RESET + " - "
|
||||||
|
+ getSelectionText(context, i) + "\n";
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
@ -135,7 +138,8 @@ public class OptionsPrompt extends NumericPrompt {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getPromptText(ConversationContext context) {
|
public String getPromptText(ConversationContext context) {
|
||||||
QuestsEditorPostOpenOptionsTrueFalsePromptEvent event = new QuestsEditorPostOpenOptionsTrueFalsePromptEvent(factory, context);
|
QuestsEditorPostOpenOptionsTrueFalsePromptEvent event
|
||||||
|
= new QuestsEditorPostOpenOptionsTrueFalsePromptEvent(factory, context);
|
||||||
plugin.getServer().getPluginManager().callEvent(event);
|
plugin.getServer().getPluginManager().callEvent(event);
|
||||||
|
|
||||||
String text = Lang.get("optBooleanPrompt");
|
String text = Lang.get("optBooleanPrompt");
|
||||||
@ -146,10 +150,12 @@ public class OptionsPrompt extends NumericPrompt {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Prompt acceptInput(ConversationContext context, String input) {
|
public Prompt acceptInput(ConversationContext context, String input) {
|
||||||
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false && input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false
|
||||||
|
&& input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
||||||
try {
|
try {
|
||||||
boolean b = Boolean.parseBoolean(input);
|
boolean b = Boolean.parseBoolean(input);
|
||||||
if (input.equalsIgnoreCase("t") || input.equalsIgnoreCase(Lang.get("true")) || input.equalsIgnoreCase(Lang.get("yesWord"))) {
|
if (input.equalsIgnoreCase("t") || input.equalsIgnoreCase(Lang.get("true"))
|
||||||
|
|| input.equalsIgnoreCase(Lang.get("yesWord"))) {
|
||||||
b = true;
|
b = true;
|
||||||
}
|
}
|
||||||
context.setSessionData(tempKey, b);
|
context.setSessionData(tempKey, b);
|
||||||
@ -217,25 +223,32 @@ public class OptionsPrompt extends NumericPrompt {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getPromptText(ConversationContext context) {
|
public String getPromptText(ConversationContext context) {
|
||||||
QuestsEditorPostOpenOptionsLevelPromptEvent event = new QuestsEditorPostOpenOptionsLevelPromptEvent(factory, context);
|
QuestsEditorPostOpenOptionsLevelPromptEvent event
|
||||||
|
= new QuestsEditorPostOpenOptionsLevelPromptEvent(factory, context);
|
||||||
plugin.getServer().getPluginManager().callEvent(event);
|
plugin.getServer().getPluginManager().callEvent(event);
|
||||||
|
|
||||||
String text = Lang.get("optNumberPrompt");
|
String text = Lang.get("optNumberPrompt");
|
||||||
text += "\n" + ChatColor.GRAY + "\u2515 " + ChatColor.GOLD + "1" + ChatColor.RESET + " = " + ChatColor.GRAY + Lang.get("everything");
|
text += "\n" + ChatColor.GRAY + "\u2515 " + ChatColor.GOLD + "1" + ChatColor.RESET + " = " + ChatColor.GRAY
|
||||||
text += "\n" + ChatColor.GRAY + "\u2515 " + ChatColor.GOLD + "2" + ChatColor.RESET + " = " + ChatColor.GRAY + Lang.get("objectives");;
|
+ Lang.get("everything");
|
||||||
text += "\n" + ChatColor.GRAY + "\u2515 " + ChatColor.GOLD + "3" + ChatColor.RESET + " = " + ChatColor.GRAY + Lang.get("stageEditorStages");
|
text += "\n" + ChatColor.GRAY + "\u2515 " + ChatColor.GOLD + "2" + ChatColor.RESET + " = " + ChatColor.GRAY
|
||||||
text += "\n" + ChatColor.GRAY + "\u2515 " + ChatColor.GOLD + "4" + ChatColor.RESET + " = " + ChatColor.GRAY + Lang.get("quests");
|
+ Lang.get("objectives");;
|
||||||
|
text += "\n" + ChatColor.GRAY + "\u2515 " + ChatColor.GOLD + "3" + ChatColor.RESET + " = " + ChatColor.GRAY
|
||||||
|
+ Lang.get("stageEditorStages");
|
||||||
|
text += "\n" + ChatColor.GRAY + "\u2515 " + ChatColor.GOLD + "4" + ChatColor.RESET + " = " + ChatColor.GRAY
|
||||||
|
+ Lang.get("quests");
|
||||||
return ChatColor.YELLOW + text;
|
return ChatColor.YELLOW + text;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Prompt acceptInput(ConversationContext context, String input) {
|
public Prompt acceptInput(ConversationContext context, String input) {
|
||||||
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false && input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false
|
||||||
|
&& input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
||||||
try {
|
try {
|
||||||
int i = Integer.parseInt(input);
|
int i = Integer.parseInt(input);
|
||||||
context.setSessionData(tempKey, i);
|
context.setSessionData(tempKey, i);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("reqNotANumber").replace("<input>", input));
|
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("reqNotANumber")
|
||||||
|
.replace("<input>", input));
|
||||||
}
|
}
|
||||||
} else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) {
|
} else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) {
|
||||||
context.setSessionData(tempKey, null);
|
context.setSessionData(tempKey, null);
|
||||||
@ -275,22 +288,26 @@ public class OptionsPrompt extends NumericPrompt {
|
|||||||
case 1:
|
case 1:
|
||||||
if (context.getSessionData(CK.OPT_ALLOW_COMMANDS) == null) {
|
if (context.getSessionData(CK.OPT_ALLOW_COMMANDS) == null) {
|
||||||
boolean defaultOpt = new Options().getAllowCommands();
|
boolean defaultOpt = new Options().getAllowCommands();
|
||||||
return ChatColor.YELLOW + Lang.get("optAllowCommands") + " ("
|
return ChatColor.YELLOW + Lang.get("optAllowCommands") + " (" + (defaultOpt ? ChatColor.GREEN
|
||||||
+ (defaultOpt ? ChatColor.GREEN + String.valueOf(defaultOpt) : ChatColor.RED + String.valueOf(defaultOpt)) + ChatColor.YELLOW + ")";
|
+ String.valueOf(defaultOpt) : ChatColor.RED + String.valueOf(defaultOpt))
|
||||||
|
+ ChatColor.YELLOW + ")";
|
||||||
} else {
|
} else {
|
||||||
boolean commandsOpt = (Boolean) context.getSessionData(CK.OPT_ALLOW_COMMANDS);
|
boolean commandsOpt = (Boolean) context.getSessionData(CK.OPT_ALLOW_COMMANDS);
|
||||||
return ChatColor.YELLOW + Lang.get("optAllowCommands") + " ("
|
return ChatColor.YELLOW + Lang.get("optAllowCommands") + " (" + (commandsOpt ? ChatColor.GREEN
|
||||||
+ (commandsOpt ? ChatColor.GREEN + String.valueOf(commandsOpt) : ChatColor.RED + String.valueOf(commandsOpt)) + ChatColor.YELLOW + ")";
|
+ String.valueOf(commandsOpt) : ChatColor.RED + String.valueOf(commandsOpt))
|
||||||
|
+ ChatColor.YELLOW + ")";
|
||||||
}
|
}
|
||||||
case 2:
|
case 2:
|
||||||
if (context.getSessionData(CK.OPT_ALLOW_QUITTING) == null) {
|
if (context.getSessionData(CK.OPT_ALLOW_QUITTING) == null) {
|
||||||
boolean defaultOpt = new Options().getAllowQuitting();
|
boolean defaultOpt = new Options().getAllowQuitting();
|
||||||
return ChatColor.YELLOW + Lang.get("optAllowQuitting") + " ("
|
return ChatColor.YELLOW + Lang.get("optAllowQuitting") + " (" + (defaultOpt ? ChatColor.GREEN
|
||||||
+ (defaultOpt ? ChatColor.GREEN + String.valueOf(defaultOpt) : ChatColor.RED + String.valueOf(defaultOpt)) + ChatColor.YELLOW + ")";
|
+ String.valueOf(defaultOpt) : ChatColor.RED + String.valueOf(defaultOpt))
|
||||||
|
+ ChatColor.YELLOW + ")";
|
||||||
} else {
|
} else {
|
||||||
boolean quittingOpt = (Boolean) context.getSessionData(CK.OPT_ALLOW_QUITTING);
|
boolean quittingOpt = (Boolean) context.getSessionData(CK.OPT_ALLOW_QUITTING);
|
||||||
return ChatColor.YELLOW + Lang.get("optAllowQuitting") + " ("
|
return ChatColor.YELLOW + Lang.get("optAllowQuitting") + " (" + (quittingOpt ? ChatColor.GREEN
|
||||||
+ (quittingOpt ? ChatColor.GREEN + String.valueOf(quittingOpt) : ChatColor.RED + String.valueOf(quittingOpt)) + ChatColor.YELLOW + ")";
|
+ String.valueOf(quittingOpt) : ChatColor.RED + String.valueOf(quittingOpt))
|
||||||
|
+ ChatColor.YELLOW + ")";
|
||||||
}
|
}
|
||||||
case 3:
|
case 3:
|
||||||
return ChatColor.YELLOW + Lang.get("done");
|
return ChatColor.YELLOW + Lang.get("done");
|
||||||
@ -301,12 +318,14 @@ public class OptionsPrompt extends NumericPrompt {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getPromptText(ConversationContext context) {
|
public String getPromptText(ConversationContext context) {
|
||||||
QuestsEditorPostOpenOptionsGeneralPromptEvent event = new QuestsEditorPostOpenOptionsGeneralPromptEvent(factory, context);
|
QuestsEditorPostOpenOptionsGeneralPromptEvent event
|
||||||
|
= new QuestsEditorPostOpenOptionsGeneralPromptEvent(factory, context);
|
||||||
plugin.getServer().getPluginManager().callEvent(event);
|
plugin.getServer().getPluginManager().callEvent(event);
|
||||||
|
|
||||||
String text = ChatColor.DARK_GREEN + "- " + getTitle() + " -\n";
|
String text = ChatColor.DARK_GREEN + "- " + getTitle() + " -\n";
|
||||||
for (int i = 1; i <= size; i++) {
|
for (int i = 1; i <= size; i++) {
|
||||||
text += getNumberColor(context, i) + "" + ChatColor.BOLD + i + ChatColor.RESET + " - " + getSelectionText(context, i) + "\n";
|
text += getNumberColor(context, i) + "" + ChatColor.BOLD + i + ChatColor.RESET + " - "
|
||||||
|
+ getSelectionText(context, i) + "\n";
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
@ -372,21 +391,25 @@ public class OptionsPrompt extends NumericPrompt {
|
|||||||
if (context.getSessionData(CK.OPT_USE_DUNGEONSXL_PLUGIN) == null) {
|
if (context.getSessionData(CK.OPT_USE_DUNGEONSXL_PLUGIN) == null) {
|
||||||
boolean defaultOpt = new Options().getUseDungeonsXLPlugin();
|
boolean defaultOpt = new Options().getUseDungeonsXLPlugin();
|
||||||
return ChatColor.YELLOW + Lang.get("optUseDungeonsXLPlugin") + " ("
|
return ChatColor.YELLOW + Lang.get("optUseDungeonsXLPlugin") + " ("
|
||||||
+ (defaultOpt ? ChatColor.GREEN + String.valueOf(defaultOpt) : ChatColor.RED + String.valueOf(defaultOpt)) + ChatColor.YELLOW + ")";
|
+ (defaultOpt ? ChatColor.GREEN + String.valueOf(defaultOpt) : ChatColor.RED
|
||||||
|
+ String.valueOf(defaultOpt)) + ChatColor.YELLOW + ")";
|
||||||
} else {
|
} else {
|
||||||
boolean dungeonsOpt = (Boolean) context.getSessionData(CK.OPT_USE_DUNGEONSXL_PLUGIN);
|
boolean dungeonsOpt = (Boolean) context.getSessionData(CK.OPT_USE_DUNGEONSXL_PLUGIN);
|
||||||
return ChatColor.YELLOW + Lang.get("optUseDungeonsXLPlugin") + " ("
|
return ChatColor.YELLOW + Lang.get("optUseDungeonsXLPlugin") + " ("
|
||||||
+ (dungeonsOpt ? ChatColor.GREEN + String.valueOf(dungeonsOpt) : ChatColor.RED + String.valueOf(dungeonsOpt)) + ChatColor.YELLOW + ")";
|
+ (dungeonsOpt ? ChatColor.GREEN + String.valueOf(dungeonsOpt) : ChatColor.RED
|
||||||
|
+ String.valueOf(dungeonsOpt)) + ChatColor.YELLOW + ")";
|
||||||
}
|
}
|
||||||
case 2:
|
case 2:
|
||||||
if (context.getSessionData(CK.OPT_USE_PARTIES_PLUGIN) == null) {
|
if (context.getSessionData(CK.OPT_USE_PARTIES_PLUGIN) == null) {
|
||||||
boolean defaultOpt = new Options().getUsePartiesPlugin();
|
boolean defaultOpt = new Options().getUsePartiesPlugin();
|
||||||
return ChatColor.YELLOW + Lang.get("optUsePartiesPlugin") + " ("
|
return ChatColor.YELLOW + Lang.get("optUsePartiesPlugin") + " ("
|
||||||
+ (defaultOpt ? ChatColor.GREEN + String.valueOf(defaultOpt) : ChatColor.RED + String.valueOf(defaultOpt)) + ChatColor.YELLOW + ")";
|
+ (defaultOpt ? ChatColor.GREEN + String.valueOf(defaultOpt) : ChatColor.RED
|
||||||
|
+ String.valueOf(defaultOpt)) + ChatColor.YELLOW + ")";
|
||||||
} else {
|
} else {
|
||||||
boolean partiesOpt = (Boolean) context.getSessionData(CK.OPT_USE_PARTIES_PLUGIN);
|
boolean partiesOpt = (Boolean) context.getSessionData(CK.OPT_USE_PARTIES_PLUGIN);
|
||||||
return ChatColor.YELLOW + Lang.get("optUsePartiesPlugin") + " ("
|
return ChatColor.YELLOW + Lang.get("optUsePartiesPlugin") + " ("
|
||||||
+ (partiesOpt ? ChatColor.GREEN + String.valueOf(partiesOpt) : ChatColor.RED + String.valueOf(partiesOpt)) + ChatColor.YELLOW + ")";
|
+ (partiesOpt ? ChatColor.GREEN + String.valueOf(partiesOpt) : ChatColor.RED
|
||||||
|
+ String.valueOf(partiesOpt)) + ChatColor.YELLOW + ")";
|
||||||
}
|
}
|
||||||
case 3:
|
case 3:
|
||||||
if (context.getSessionData(CK.OPT_SHARE_PROGRESS_LEVEL) == null) {
|
if (context.getSessionData(CK.OPT_SHARE_PROGRESS_LEVEL) == null) {
|
||||||
@ -402,11 +425,13 @@ public class OptionsPrompt extends NumericPrompt {
|
|||||||
if (context.getSessionData(CK.OPT_REQUIRE_SAME_QUEST) == null) {
|
if (context.getSessionData(CK.OPT_REQUIRE_SAME_QUEST) == null) {
|
||||||
boolean defaultOpt = new Options().getRequireSameQuest();
|
boolean defaultOpt = new Options().getRequireSameQuest();
|
||||||
return ChatColor.YELLOW + Lang.get("optRequireSameQuest") + " ("
|
return ChatColor.YELLOW + Lang.get("optRequireSameQuest") + " ("
|
||||||
+ (defaultOpt ? ChatColor.GREEN + String.valueOf(defaultOpt) : ChatColor.RED + String.valueOf(defaultOpt)) + ChatColor.YELLOW + ")";
|
+ (defaultOpt ? ChatColor.GREEN + String.valueOf(defaultOpt) : ChatColor.RED
|
||||||
|
+ String.valueOf(defaultOpt)) + ChatColor.YELLOW + ")";
|
||||||
} else {
|
} else {
|
||||||
boolean requireOpt = (Boolean) context.getSessionData(CK.OPT_REQUIRE_SAME_QUEST);
|
boolean requireOpt = (Boolean) context.getSessionData(CK.OPT_REQUIRE_SAME_QUEST);
|
||||||
return ChatColor.YELLOW + Lang.get("optRequireSameQuest") + " ("
|
return ChatColor.YELLOW + Lang.get("optRequireSameQuest") + " ("
|
||||||
+ (requireOpt ? ChatColor.GREEN + String.valueOf(requireOpt) : ChatColor.RED + String.valueOf(requireOpt)) + ChatColor.YELLOW + ")";
|
+ (requireOpt ? ChatColor.GREEN + String.valueOf(requireOpt) : ChatColor.RED
|
||||||
|
+ String.valueOf(requireOpt)) + ChatColor.YELLOW + ")";
|
||||||
}
|
}
|
||||||
case 5:
|
case 5:
|
||||||
return ChatColor.YELLOW + Lang.get("done");
|
return ChatColor.YELLOW + Lang.get("done");
|
||||||
@ -417,12 +442,14 @@ public class OptionsPrompt extends NumericPrompt {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getPromptText(ConversationContext context) {
|
public String getPromptText(ConversationContext context) {
|
||||||
QuestsEditorPostOpenOptionsMultiplayerPromptEvent event = new QuestsEditorPostOpenOptionsMultiplayerPromptEvent(factory, context);
|
QuestsEditorPostOpenOptionsMultiplayerPromptEvent event
|
||||||
|
= new QuestsEditorPostOpenOptionsMultiplayerPromptEvent(factory, context);
|
||||||
plugin.getServer().getPluginManager().callEvent(event);
|
plugin.getServer().getPluginManager().callEvent(event);
|
||||||
|
|
||||||
String text = ChatColor.DARK_GREEN + "- " + getTitle() + " -\n";
|
String text = ChatColor.DARK_GREEN + "- " + getTitle() + " -\n";
|
||||||
for (int i = 1; i <= size; i++) {
|
for (int i = 1; i <= size; i++) {
|
||||||
text += getNumberColor(context, i) + "" + ChatColor.BOLD + i + ChatColor.RESET + " - " + getSelectionText(context, i) + "\n";
|
text += getNumberColor(context, i) + "" + ChatColor.BOLD + i + ChatColor.RESET + " - "
|
||||||
|
+ getSelectionText(context, i) + "\n";
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,7 @@ import me.blackvein.quests.Quests;
|
|||||||
import me.blackvein.quests.events.editor.quests.QuestsEditorPostOpenPlannerPromptEvent;
|
import me.blackvein.quests.events.editor.quests.QuestsEditorPostOpenPlannerPromptEvent;
|
||||||
import me.blackvein.quests.util.CK;
|
import me.blackvein.quests.util.CK;
|
||||||
import me.blackvein.quests.util.Lang;
|
import me.blackvein.quests.util.Lang;
|
||||||
|
import me.blackvein.quests.util.MiscUtil;
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.conversations.ConversationContext;
|
import org.bukkit.conversations.ConversationContext;
|
||||||
@ -57,7 +58,8 @@ public class PlannerPrompt extends NumericPrompt {
|
|||||||
case 2:
|
case 2:
|
||||||
return ChatColor.BLUE;
|
return ChatColor.BLUE;
|
||||||
case 3:
|
case 3:
|
||||||
if (context.getSessionData(CK.PLN_START_DATE) == null || context.getSessionData(CK.PLN_END_DATE) == null) {
|
if (context.getSessionData(CK.PLN_START_DATE) == null
|
||||||
|
|| context.getSessionData(CK.PLN_END_DATE) == null) {
|
||||||
return ChatColor.GRAY;
|
return ChatColor.GRAY;
|
||||||
} else {
|
} else {
|
||||||
return ChatColor.BLUE;
|
return ChatColor.BLUE;
|
||||||
@ -78,7 +80,8 @@ public class PlannerPrompt extends NumericPrompt {
|
|||||||
case 2:
|
case 2:
|
||||||
return ChatColor.YELLOW + Lang.get("plnEnd");
|
return ChatColor.YELLOW + Lang.get("plnEnd");
|
||||||
case 3:
|
case 3:
|
||||||
if (context.getSessionData(CK.PLN_START_DATE) == null || context.getSessionData(CK.PLN_END_DATE) == null) {
|
if (context.getSessionData(CK.PLN_START_DATE) == null
|
||||||
|
|| context.getSessionData(CK.PLN_END_DATE) == null) {
|
||||||
return ChatColor.GRAY + Lang.get("plnRepeat");
|
return ChatColor.GRAY + Lang.get("plnRepeat");
|
||||||
} else {
|
} else {
|
||||||
return ChatColor.YELLOW + Lang.get("plnRepeat");
|
return ChatColor.YELLOW + Lang.get("plnRepeat");
|
||||||
@ -98,29 +101,35 @@ public class PlannerPrompt extends NumericPrompt {
|
|||||||
if (context.getSessionData(CK.PLN_START_DATE) == null) {
|
if (context.getSessionData(CK.PLN_START_DATE) == null) {
|
||||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||||
} else {
|
} else {
|
||||||
return ChatColor.YELLOW + " - " + getPrettyDate((String) context.getSessionData(CK.PLN_START_DATE));
|
return ChatColor.YELLOW + " - "
|
||||||
|
+ getPrettyDate((String) context.getSessionData(CK.PLN_START_DATE));
|
||||||
}
|
}
|
||||||
case 2:
|
case 2:
|
||||||
if (context.getSessionData(CK.PLN_END_DATE) == null) {
|
if (context.getSessionData(CK.PLN_END_DATE) == null) {
|
||||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||||
} else {
|
} else {
|
||||||
return ChatColor.YELLOW + " - " + getPrettyDate((String) context.getSessionData(CK.PLN_END_DATE));
|
return ChatColor.YELLOW + " - "
|
||||||
|
+ getPrettyDate((String) context.getSessionData(CK.PLN_END_DATE));
|
||||||
}
|
}
|
||||||
case 3:
|
case 3:
|
||||||
if (context.getSessionData(CK.PLN_START_DATE) == null || context.getSessionData(CK.PLN_END_DATE) == null) {
|
if (context.getSessionData(CK.PLN_START_DATE) == null
|
||||||
|
|| context.getSessionData(CK.PLN_END_DATE) == null) {
|
||||||
return ChatColor.GRAY + "(" + Lang.get("stageEditorOptional") + ")";
|
return ChatColor.GRAY + "(" + Lang.get("stageEditorOptional") + ")";
|
||||||
} else {
|
} else {
|
||||||
if (context.getSessionData(CK.PLN_REPEAT_CYCLE) == null) {
|
if (context.getSessionData(CK.PLN_REPEAT_CYCLE) == null) {
|
||||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||||
} else {
|
} else {
|
||||||
return ChatColor.YELLOW + "(" + Quests.getTime((Long) context.getSessionData(CK.PLN_REPEAT_CYCLE)) + ChatColor.RESET + ChatColor.YELLOW + ")";
|
return ChatColor.YELLOW + "("
|
||||||
|
+ MiscUtil.getTime((Long) context.getSessionData(CK.PLN_REPEAT_CYCLE))
|
||||||
|
+ ChatColor.RESET + ChatColor.YELLOW + ")";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case 4:
|
case 4:
|
||||||
if (context.getSessionData(CK.PLN_COOLDOWN) == null) {
|
if (context.getSessionData(CK.PLN_COOLDOWN) == null) {
|
||||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||||
} else {
|
} else {
|
||||||
return ChatColor.YELLOW + "(" + Quests.getTime((Long) context.getSessionData(CK.PLN_COOLDOWN)) + ChatColor.RESET + ChatColor.YELLOW + ")";
|
return ChatColor.YELLOW + "(" + MiscUtil.getTime((Long) context.getSessionData(CK.PLN_COOLDOWN))
|
||||||
|
+ ChatColor.RESET + ChatColor.YELLOW + ")";
|
||||||
}
|
}
|
||||||
case 5:
|
case 5:
|
||||||
return "";
|
return "";
|
||||||
@ -134,9 +143,12 @@ public class PlannerPrompt extends NumericPrompt {
|
|||||||
QuestsEditorPostOpenPlannerPromptEvent event = new QuestsEditorPostOpenPlannerPromptEvent(factory, context);
|
QuestsEditorPostOpenPlannerPromptEvent event = new QuestsEditorPostOpenPlannerPromptEvent(factory, context);
|
||||||
plugin.getServer().getPluginManager().callEvent(event);
|
plugin.getServer().getPluginManager().callEvent(event);
|
||||||
|
|
||||||
String text = ChatColor.DARK_AQUA + getTitle(context).replace((String) context.getSessionData(CK.Q_NAME), ChatColor.AQUA + (String) context.getSessionData(CK.Q_NAME) + ChatColor.DARK_AQUA) + "\n";
|
String text = ChatColor.DARK_AQUA + getTitle(context).replace((String) context
|
||||||
|
.getSessionData(CK.Q_NAME), ChatColor.AQUA + (String) context.getSessionData(CK.Q_NAME)
|
||||||
|
+ ChatColor.DARK_AQUA) + "\n";
|
||||||
for (int i = 1; i <= size; i++) {
|
for (int i = 1; i <= size; i++) {
|
||||||
text += getNumberColor(context, i) + "" + ChatColor.BOLD + i + ChatColor.RESET + " - " + getSelectionText(context, i) + " " + getAdditionalText(context, i) + "\n";
|
text += getNumberColor(context, i) + "" + ChatColor.BOLD + i + ChatColor.RESET + " - "
|
||||||
|
+ getSelectionText(context, i) + " " + getAdditionalText(context, i) + "\n";
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
@ -190,7 +202,8 @@ public class PlannerPrompt extends NumericPrompt {
|
|||||||
context.setSessionData(CK.PLN_REPEAT_CYCLE, delay);
|
context.setSessionData(CK.PLN_REPEAT_CYCLE, delay);
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("reqNotANumber").replace("<input>", input));
|
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("reqNotANumber")
|
||||||
|
.replace("<input>", input));
|
||||||
return new RepeatPrompt();
|
return new RepeatPrompt();
|
||||||
}
|
}
|
||||||
return new PlannerPrompt(plugin, factory);
|
return new PlannerPrompt(plugin, factory);
|
||||||
@ -223,7 +236,8 @@ public class PlannerPrompt extends NumericPrompt {
|
|||||||
context.setSessionData(CK.PLN_COOLDOWN, delay);
|
context.setSessionData(CK.PLN_COOLDOWN, delay);
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("reqNotANumber").replace("<input>", input));
|
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("reqNotANumber")
|
||||||
|
.replace("<input>", input));
|
||||||
return new CooldownPrompt();
|
return new CooldownPrompt();
|
||||||
}
|
}
|
||||||
return new PlannerPrompt(plugin, factory);
|
return new PlannerPrompt(plugin, factory);
|
||||||
@ -253,8 +267,9 @@ public class PlannerPrompt extends NumericPrompt {
|
|||||||
Double zhour = (double) (cal.getTimeZone().getRawOffset() / 60 / 60 / 1000);
|
Double zhour = (double) (cal.getTimeZone().getRawOffset() / 60 / 60 / 1000);
|
||||||
String[] sep = String.valueOf(zhour).replace("-", "").split("\\.");
|
String[] sep = String.valueOf(zhour).replace("-", "").split("\\.");
|
||||||
DecimalFormat zoneFormat = new DecimalFormat("00");
|
DecimalFormat zoneFormat = new DecimalFormat("00");
|
||||||
output += ChatColor.LIGHT_PURPLE + " UTC" + (zhour < 0 ? "-":"+") + zoneFormat.format(Integer.valueOf(sep[0])) + ":"
|
output += ChatColor.LIGHT_PURPLE + " UTC" + (zhour < 0 ? "-":"+") + zoneFormat.format(Integer.valueOf(sep[0]))
|
||||||
+ zoneFormat.format(Integer.valueOf(sep[1])) + ChatColor.GREEN + " (" + cal.getTimeZone().getDisplayName(loc) + ")";
|
+ ":" + zoneFormat.format(Integer.valueOf(sep[1])) + ChatColor.GREEN + " ("
|
||||||
|
+ cal.getTimeZone().getDisplayName(loc) + ")";
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,9 @@
|
|||||||
package me.blackvein.quests.prompts;
|
package me.blackvein.quests.prompts;
|
||||||
|
|
||||||
import java.text.MessageFormat;
|
import java.text.MessageFormat;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
@ -27,12 +29,13 @@ import me.blackvein.quests.Quest;
|
|||||||
import me.blackvein.quests.Quester;
|
import me.blackvein.quests.Quester;
|
||||||
import me.blackvein.quests.Quests;
|
import me.blackvein.quests.Quests;
|
||||||
import me.blackvein.quests.util.Lang;
|
import me.blackvein.quests.util.Lang;
|
||||||
|
import me.blackvein.quests.util.MiscUtil;
|
||||||
|
|
||||||
public class QuestOfferPrompt extends StringPrompt {
|
public class QuestOfferPrompt extends StringPrompt {
|
||||||
|
|
||||||
private final Quests plugin;
|
private final Quests plugin;
|
||||||
private Quester quester;
|
private HashMap<UUID, Quester> questerHashMap = new HashMap<>();
|
||||||
private LinkedList<Quest> quests;
|
private HashMap<UUID, LinkedList<Quest>> questsHashMap = new HashMap<>();
|
||||||
|
|
||||||
public QuestOfferPrompt(Quests plugin) {
|
public QuestOfferPrompt(Quests plugin) {
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
@ -41,6 +44,8 @@ public class QuestOfferPrompt extends StringPrompt {
|
|||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public String getPromptText(ConversationContext cc) {
|
public String getPromptText(ConversationContext cc) {
|
||||||
|
Quester quester;
|
||||||
|
LinkedList<Quest> quests;
|
||||||
quests = (LinkedList<Quest>) cc.getSessionData("quests");
|
quests = (LinkedList<Quest>) cc.getSessionData("quests");
|
||||||
quester = plugin.getQuester(((Player) cc.getForWhom()).getUniqueId());
|
quester = plugin.getQuester(((Player) cc.getForWhom()).getUniqueId());
|
||||||
String npc = (String) cc.getSessionData("npc");
|
String npc = (String) cc.getSessionData("npc");
|
||||||
@ -49,18 +54,26 @@ public class QuestOfferPrompt extends StringPrompt {
|
|||||||
for (int i = 1; i <= quests.size(); i++) {
|
for (int i = 1; i <= quests.size(); i++) {
|
||||||
Quest quest = quests.get(i - 1);
|
Quest quest = quests.get(i - 1);
|
||||||
if (quester.getCompletedQuests().contains(quest.getName())) {
|
if (quester.getCompletedQuests().contains(quest.getName())) {
|
||||||
menu += ChatColor.DARK_GREEN + "" + ChatColor.BOLD + "" + i + ". " + ChatColor.RESET + "" + ChatColor.GREEN + "" + ChatColor.ITALIC + quest.getName() + ChatColor.RESET + "" + ChatColor.GREEN + " " + Lang.get("redoCompleted") + "\n";
|
menu += ChatColor.DARK_GREEN + "" + ChatColor.BOLD + "" + i + ". " + ChatColor.RESET + ""
|
||||||
|
+ ChatColor.GREEN + "" + ChatColor.ITALIC + quest.getName() + ChatColor.RESET + ""
|
||||||
|
+ ChatColor.GREEN + " " + Lang.get("redoCompleted") + "\n";
|
||||||
} else {
|
} else {
|
||||||
menu += ChatColor.GOLD + "" + ChatColor.BOLD + "" + i + ". " + ChatColor.RESET + "" + ChatColor.YELLOW + "" + ChatColor.ITALIC + quest.getName() + "\n";
|
menu += ChatColor.GOLD + "" + ChatColor.BOLD + "" + i + ". " + ChatColor.RESET + "" + ChatColor.YELLOW
|
||||||
|
+ "" + ChatColor.ITALIC + quest.getName() + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
menu += ChatColor.GOLD + "" + ChatColor.BOLD + "" + (quests.size() + 1) + ". " + ChatColor.RESET + "" + ChatColor.GRAY + Lang.get("cancel") + "\n";
|
menu += ChatColor.GOLD + "" + ChatColor.BOLD + "" + (quests.size() + 1) + ". " + ChatColor.RESET + ""
|
||||||
|
+ ChatColor.GRAY + Lang.get("cancel") + "\n";
|
||||||
menu += ChatColor.WHITE + Lang.get("enterAnOption");
|
menu += ChatColor.WHITE + Lang.get("enterAnOption");
|
||||||
|
questerHashMap.put(((Player) cc.getForWhom()).getUniqueId(), quester);
|
||||||
|
questsHashMap.put(((Player) cc.getForWhom()).getUniqueId(), quests);
|
||||||
return menu;
|
return menu;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Prompt acceptInput(ConversationContext cc, String input) {
|
public Prompt acceptInput(ConversationContext cc, String input) {
|
||||||
|
Quester quester = questerHashMap.get(((Player) cc.getForWhom()).getUniqueId());
|
||||||
|
LinkedList<Quest> quests = questsHashMap.get(((Player) cc.getForWhom()).getUniqueId());
|
||||||
int numInput = -1;
|
int numInput = -1;
|
||||||
try {
|
try {
|
||||||
numInput = Integer.parseInt(input);
|
numInput = Integer.parseInt(input);
|
||||||
@ -100,7 +113,8 @@ public class QuestOfferPrompt extends StringPrompt {
|
|||||||
} else {
|
} else {
|
||||||
Player player = quester.getPlayer();
|
Player player = quester.getPlayer();
|
||||||
if (!quester.getCompletedQuests().contains(q.getName())) {
|
if (!quester.getCompletedQuests().contains(q.getName())) {
|
||||||
if (quester.getCurrentQuests().size() < plugin.getSettings().getMaxQuests() || plugin.getSettings().getMaxQuests() < 1) {
|
if (quester.getCurrentQuests().size() < plugin.getSettings().getMaxQuests()
|
||||||
|
|| plugin.getSettings().getMaxQuests() < 1) {
|
||||||
if (q.testRequirements(quester)) {
|
if (q.testRequirements(quester)) {
|
||||||
quester.setQuestToTake(q.getName());
|
quester.setQuestToTake(q.getName());
|
||||||
String s = extracted(quester);
|
String s = extracted(quester);
|
||||||
@ -121,11 +135,13 @@ public class QuestOfferPrompt extends StringPrompt {
|
|||||||
player.sendMessage(ChatColor.YELLOW + msg);
|
player.sendMessage(ChatColor.YELLOW + msg);
|
||||||
}
|
}
|
||||||
} else if (quester.getCompletedQuests().contains(q.getName())) {
|
} else if (quester.getCompletedQuests().contains(q.getName())) {
|
||||||
if (quester.getCurrentQuests().size() < plugin.getSettings().getMaxQuests() || plugin.getSettings().getMaxQuests() < 1) {
|
if (quester.getCurrentQuests().size() < plugin.getSettings().getMaxQuests()
|
||||||
|
|| plugin.getSettings().getMaxQuests() < 1) {
|
||||||
if (quester.getCooldownDifference(q) > 0) {
|
if (quester.getCooldownDifference(q) > 0) {
|
||||||
String early = Lang.get("questTooEarly");
|
String early = Lang.get("questTooEarly");
|
||||||
early = early.replace("<quest>", ChatColor.AQUA + q.getName() + ChatColor.YELLOW);
|
early = early.replace("<quest>", ChatColor.AQUA + q.getName() + ChatColor.YELLOW);
|
||||||
early = early.replace("<time>", ChatColor.DARK_PURPLE + Quests.getTime(quester.getCooldownDifference(q)) + ChatColor.YELLOW);
|
early = early.replace("<time>", ChatColor.DARK_PURPLE
|
||||||
|
+ MiscUtil.getTime(quester.getCooldownDifference(q)) + ChatColor.YELLOW);
|
||||||
player.sendMessage(ChatColor.YELLOW + early);
|
player.sendMessage(ChatColor.YELLOW + early);
|
||||||
} else if (q.getPlanner().getCooldown() < 0) {
|
} else if (q.getPlanner().getCooldown() < 0) {
|
||||||
String completed = Lang.get("questAlreadyCompleted");
|
String completed = Lang.get("questAlreadyCompleted");
|
||||||
@ -155,6 +171,8 @@ public class QuestOfferPrompt extends StringPrompt {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private String extracted(final Quester quester) {
|
private String extracted(final Quester quester) {
|
||||||
return MessageFormat.format("{0}- {1}{2}{3} -\n\n{4}{5}\n", ChatColor.GOLD, ChatColor.DARK_PURPLE, quester.getQuestToTake(), ChatColor.GOLD, ChatColor.RESET, plugin.getQuest(quester.getQuestToTake()).getDescription());
|
return MessageFormat.format("{0}- {1}{2}{3} -\n\n{4}{5}\n", ChatColor.GOLD, ChatColor.DARK_PURPLE,
|
||||||
|
quester.getQuestToTake(), ChatColor.GOLD, ChatColor.RESET, plugin.getQuest(quester.getQuestToTake())
|
||||||
|
.getDescription());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -83,10 +83,16 @@ public class RequirementsPrompt extends NumericPrompt {
|
|||||||
case 9:
|
case 9:
|
||||||
return ChatColor.BLUE;
|
return ChatColor.BLUE;
|
||||||
case 10:
|
case 10:
|
||||||
if (context.getSessionData(CK.REQ_MONEY) == null && context.getSessionData(CK.REQ_QUEST_POINTS) == null && context.getSessionData(CK.REQ_QUEST_BLOCK) == null
|
if (context.getSessionData(CK.REQ_MONEY) == null && context.getSessionData(CK.REQ_QUEST_POINTS) == null
|
||||||
&& context.getSessionData(CK.REQ_ITEMS) == null && context.getSessionData(CK.REQ_PERMISSION) == null && context.getSessionData(CK.REQ_QUEST) == null
|
&& context.getSessionData(CK.REQ_QUEST_BLOCK) == null
|
||||||
&& context.getSessionData(CK.REQ_QUEST_BLOCK) == null && context.getSessionData(CK.REQ_MCMMO_SKILLS) == null && context.getSessionData(CK.REQ_HEROES_PRIMARY_CLASS) == null
|
&& context.getSessionData(CK.REQ_ITEMS) == null
|
||||||
&& context.getSessionData(CK.REQ_HEROES_SECONDARY_CLASS) == null && context.getSessionData(CK.REQ_CUSTOM) == null) {
|
&& context.getSessionData(CK.REQ_PERMISSION) == null
|
||||||
|
&& context.getSessionData(CK.REQ_QUEST) == null
|
||||||
|
&& context.getSessionData(CK.REQ_QUEST_BLOCK) == null
|
||||||
|
&& context.getSessionData(CK.REQ_MCMMO_SKILLS) == null
|
||||||
|
&& context.getSessionData(CK.REQ_HEROES_PRIMARY_CLASS) == null
|
||||||
|
&& context.getSessionData(CK.REQ_HEROES_SECONDARY_CLASS) == null
|
||||||
|
&& context.getSessionData(CK.REQ_CUSTOM) == null) {
|
||||||
return ChatColor.GRAY;
|
return ChatColor.GRAY;
|
||||||
} else if (context.getSessionData(CK.Q_FAIL_MESSAGE) == null) {
|
} else if (context.getSessionData(CK.Q_FAIL_MESSAGE) == null) {
|
||||||
return ChatColor.RED;
|
return ChatColor.RED;
|
||||||
@ -121,10 +127,16 @@ public class RequirementsPrompt extends NumericPrompt {
|
|||||||
case 9:
|
case 9:
|
||||||
return ChatColor.DARK_PURPLE + Lang.get("reqSetCustom");
|
return ChatColor.DARK_PURPLE + Lang.get("reqSetCustom");
|
||||||
case 10:
|
case 10:
|
||||||
if (context.getSessionData(CK.REQ_MONEY) == null && context.getSessionData(CK.REQ_QUEST_POINTS) == null && context.getSessionData(CK.REQ_QUEST_BLOCK) == null
|
if (context.getSessionData(CK.REQ_MONEY) == null && context.getSessionData(CK.REQ_QUEST_POINTS) == null
|
||||||
&& context.getSessionData(CK.REQ_ITEMS) == null && context.getSessionData(CK.REQ_PERMISSION) == null && context.getSessionData(CK.REQ_QUEST) == null
|
&& context.getSessionData(CK.REQ_QUEST_BLOCK) == null
|
||||||
&& context.getSessionData(CK.REQ_QUEST_BLOCK) == null && context.getSessionData(CK.REQ_MCMMO_SKILLS) == null && context.getSessionData(CK.REQ_HEROES_PRIMARY_CLASS) == null
|
&& context.getSessionData(CK.REQ_ITEMS) == null
|
||||||
&& context.getSessionData(CK.REQ_HEROES_SECONDARY_CLASS) == null && context.getSessionData(CK.REQ_CUSTOM) == null) {
|
&& context.getSessionData(CK.REQ_PERMISSION) == null
|
||||||
|
&& context.getSessionData(CK.REQ_QUEST) == null
|
||||||
|
&& context.getSessionData(CK.REQ_QUEST_BLOCK) == null
|
||||||
|
&& context.getSessionData(CK.REQ_MCMMO_SKILLS) == null
|
||||||
|
&& context.getSessionData(CK.REQ_HEROES_PRIMARY_CLASS) == null
|
||||||
|
&& context.getSessionData(CK.REQ_HEROES_SECONDARY_CLASS) == null
|
||||||
|
&& context.getSessionData(CK.REQ_CUSTOM) == null) {
|
||||||
return ChatColor.GRAY + Lang.get("reqSetFail");
|
return ChatColor.GRAY + Lang.get("reqSetFail");
|
||||||
} else if (context.getSessionData(CK.Q_FAIL_MESSAGE) == null) {
|
} else if (context.getSessionData(CK.Q_FAIL_MESSAGE) == null) {
|
||||||
return ChatColor.RED + Lang.get("reqSetFail");
|
return ChatColor.RED + Lang.get("reqSetFail");
|
||||||
@ -146,13 +158,16 @@ public class RequirementsPrompt extends NumericPrompt {
|
|||||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||||
} else {
|
} else {
|
||||||
int moneyReq = (Integer) context.getSessionData(CK.REQ_MONEY);
|
int moneyReq = (Integer) context.getSessionData(CK.REQ_MONEY);
|
||||||
return ChatColor.GRAY + "(" + ChatColor.AQUA + moneyReq + " " + (moneyReq > 1 ? plugin.getCurrency(true) : plugin.getCurrency(false)) + ChatColor.GRAY + ")";
|
return ChatColor.GRAY + "(" + ChatColor.AQUA + moneyReq + " "
|
||||||
|
+ (moneyReq > 1 ? plugin.getDependencies().getCurrency(true)
|
||||||
|
: plugin.getDependencies().getCurrency(false)) + ChatColor.GRAY + ")";
|
||||||
}
|
}
|
||||||
case 2:
|
case 2:
|
||||||
if (context.getSessionData(CK.REQ_QUEST_POINTS) == null) {
|
if (context.getSessionData(CK.REQ_QUEST_POINTS) == null) {
|
||||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||||
} else {
|
} else {
|
||||||
return ChatColor.GRAY + "(" + ChatColor.AQUA + context.getSessionData(CK.REQ_QUEST_POINTS) + " " + Lang.get("questPoints") + ChatColor.GRAY + ")";
|
return ChatColor.GRAY + "(" + ChatColor.AQUA + context.getSessionData(CK.REQ_QUEST_POINTS) + " "
|
||||||
|
+ Lang.get("questPoints") + ChatColor.GRAY + ")";
|
||||||
}
|
}
|
||||||
case 3:
|
case 3:
|
||||||
if (context.getSessionData(CK.REQ_ITEMS) == null) {
|
if (context.getSessionData(CK.REQ_ITEMS) == null) {
|
||||||
@ -161,7 +176,8 @@ public class RequirementsPrompt extends NumericPrompt {
|
|||||||
String text = "";
|
String text = "";
|
||||||
LinkedList<ItemStack> items = (LinkedList<ItemStack>) context.getSessionData(CK.REQ_ITEMS);
|
LinkedList<ItemStack> items = (LinkedList<ItemStack>) context.getSessionData(CK.REQ_ITEMS);
|
||||||
for (int i = 0; i < items.size(); i++) {
|
for (int i = 0; i < items.size(); i++) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.BLUE + ItemUtil.getName(items.get(i)) + ChatColor.GRAY + " x " + ChatColor.AQUA + items.get(i).getAmount() + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.BLUE + ItemUtil.getName(items.get(i))
|
||||||
|
+ ChatColor.GRAY + " x " + ChatColor.AQUA + items.get(i).getAmount() + "\n";
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
@ -207,7 +223,9 @@ public class RequirementsPrompt extends NumericPrompt {
|
|||||||
List<String> skills = (List<String>) context.getSessionData(CK.REQ_MCMMO_SKILLS);
|
List<String> skills = (List<String>) context.getSessionData(CK.REQ_MCMMO_SKILLS);
|
||||||
List<Integer> amounts = (List<Integer>) context.getSessionData(CK.REQ_MCMMO_SKILL_AMOUNTS);
|
List<Integer> amounts = (List<Integer>) context.getSessionData(CK.REQ_MCMMO_SKILL_AMOUNTS);
|
||||||
for (String s : skills) {
|
for (String s : skills) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.DARK_GREEN + s + ChatColor.RESET + ChatColor.YELLOW + " " + Lang.get("mcMMOLevel") + " " + ChatColor.GREEN + amounts.get(skills.indexOf(s)) + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.DARK_GREEN + s + ChatColor.RESET
|
||||||
|
+ ChatColor.YELLOW + " " + Lang.get("mcMMOLevel") + " " + ChatColor.GREEN
|
||||||
|
+ amounts.get(skills.indexOf(s)) + "\n";
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
@ -216,15 +234,18 @@ public class RequirementsPrompt extends NumericPrompt {
|
|||||||
}
|
}
|
||||||
case 8:
|
case 8:
|
||||||
if (plugin.getDependencies().getHeroes() != null) {
|
if (plugin.getDependencies().getHeroes() != null) {
|
||||||
if (context.getSessionData(CK.REQ_HEROES_PRIMARY_CLASS) == null && context.getSessionData(CK.REQ_HEROES_SECONDARY_CLASS) == null) {
|
if (context.getSessionData(CK.REQ_HEROES_PRIMARY_CLASS) == null
|
||||||
|
&& context.getSessionData(CK.REQ_HEROES_SECONDARY_CLASS) == null) {
|
||||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")\n";
|
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
String text = "";
|
String text = "";
|
||||||
if (context.getSessionData(CK.REQ_HEROES_PRIMARY_CLASS) != null) {
|
if (context.getSessionData(CK.REQ_HEROES_PRIMARY_CLASS) != null) {
|
||||||
text += ChatColor.AQUA + " " + Lang.get("reqHeroesPrimaryDisplay") + " " + ChatColor.BLUE + (String) context.getSessionData(CK.REQ_HEROES_PRIMARY_CLASS);
|
text += ChatColor.AQUA + " " + Lang.get("reqHeroesPrimaryDisplay") + " "
|
||||||
|
+ ChatColor.BLUE + (String) context.getSessionData(CK.REQ_HEROES_PRIMARY_CLASS);
|
||||||
}
|
}
|
||||||
if (context.getSessionData(CK.REQ_HEROES_SECONDARY_CLASS) != null) {
|
if (context.getSessionData(CK.REQ_HEROES_SECONDARY_CLASS) != null) {
|
||||||
text += ChatColor.AQUA + " " + Lang.get("reqHeroesSecondaryDisplay") + " " + ChatColor.BLUE + (String) context.getSessionData(CK.REQ_HEROES_SECONDARY_CLASS);
|
text += ChatColor.AQUA + " " + Lang.get("reqHeroesSecondaryDisplay") + " "
|
||||||
|
+ ChatColor.BLUE + (String) context.getSessionData(CK.REQ_HEROES_SECONDARY_CLASS);
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
@ -238,20 +259,28 @@ public class RequirementsPrompt extends NumericPrompt {
|
|||||||
String text = "";
|
String text = "";
|
||||||
LinkedList<String> customReqs = (LinkedList<String>) context.getSessionData(CK.REQ_CUSTOM);
|
LinkedList<String> customReqs = (LinkedList<String>) context.getSessionData(CK.REQ_CUSTOM);
|
||||||
for (String s : customReqs) {
|
for (String s : customReqs) {
|
||||||
text += ChatColor.RESET + "" + ChatColor.DARK_PURPLE + " - " + ChatColor.LIGHT_PURPLE + s + "\n";
|
text += ChatColor.RESET + "" + ChatColor.DARK_PURPLE + " - " + ChatColor.LIGHT_PURPLE + s
|
||||||
|
+ "\n";
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
case 10:
|
case 10:
|
||||||
if (context.getSessionData(CK.REQ_MONEY) == null && context.getSessionData(CK.REQ_QUEST_POINTS) == null && context.getSessionData(CK.REQ_QUEST_BLOCK) == null
|
if (context.getSessionData(CK.REQ_MONEY) == null && context.getSessionData(CK.REQ_QUEST_POINTS) == null
|
||||||
&& context.getSessionData(CK.REQ_ITEMS) == null && context.getSessionData(CK.REQ_PERMISSION) == null && context.getSessionData(CK.REQ_QUEST) == null
|
&& context.getSessionData(CK.REQ_QUEST_BLOCK) == null
|
||||||
&& context.getSessionData(CK.REQ_QUEST_BLOCK) == null && context.getSessionData(CK.REQ_MCMMO_SKILLS) == null && context.getSessionData(CK.REQ_HEROES_PRIMARY_CLASS) == null
|
&& context.getSessionData(CK.REQ_ITEMS) == null
|
||||||
&& context.getSessionData(CK.REQ_HEROES_SECONDARY_CLASS) == null && context.getSessionData(CK.REQ_CUSTOM) == null) {
|
&& context.getSessionData(CK.REQ_PERMISSION) == null
|
||||||
|
&& context.getSessionData(CK.REQ_QUEST) == null
|
||||||
|
&& context.getSessionData(CK.REQ_QUEST_BLOCK) == null
|
||||||
|
&& context.getSessionData(CK.REQ_MCMMO_SKILLS) == null
|
||||||
|
&& context.getSessionData(CK.REQ_HEROES_PRIMARY_CLASS) == null
|
||||||
|
&& context.getSessionData(CK.REQ_HEROES_SECONDARY_CLASS) == null
|
||||||
|
&& context.getSessionData(CK.REQ_CUSTOM) == null) {
|
||||||
return ChatColor.GRAY + "(" + Lang.get("reqNone") + ")";
|
return ChatColor.GRAY + "(" + Lang.get("reqNone") + ")";
|
||||||
} else if (context.getSessionData(CK.Q_FAIL_MESSAGE) == null) {
|
} else if (context.getSessionData(CK.Q_FAIL_MESSAGE) == null) {
|
||||||
return ChatColor.RED + "(" + Lang.get("questRequiredNoneSet") + ")";
|
return ChatColor.RED + "(" + Lang.get("questRequiredNoneSet") + ")";
|
||||||
} else {
|
} else {
|
||||||
return ChatColor.GRAY + "(" + ChatColor.AQUA + "\"" + context.getSessionData(CK.Q_FAIL_MESSAGE) + "\"" + ChatColor.GRAY + ")";
|
return ChatColor.GRAY + "(" + ChatColor.AQUA + "\"" + context.getSessionData(CK.Q_FAIL_MESSAGE)
|
||||||
|
+ "\"" + ChatColor.GRAY + ")";
|
||||||
}
|
}
|
||||||
case 11:
|
case 11:
|
||||||
case 12:
|
case 12:
|
||||||
@ -266,12 +295,16 @@ public class RequirementsPrompt extends NumericPrompt {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getPromptText(ConversationContext context) {
|
public String getPromptText(ConversationContext context) {
|
||||||
QuestsEditorPostOpenRequirementsPromptEvent event = new QuestsEditorPostOpenRequirementsPromptEvent(factory, context);
|
QuestsEditorPostOpenRequirementsPromptEvent event
|
||||||
|
= new QuestsEditorPostOpenRequirementsPromptEvent(factory, context);
|
||||||
plugin.getServer().getPluginManager().callEvent(event);
|
plugin.getServer().getPluginManager().callEvent(event);
|
||||||
|
|
||||||
String text = ChatColor.DARK_AQUA + getTitle(context).replace((String) context.getSessionData(CK.Q_NAME), ChatColor.AQUA + (String) context.getSessionData(CK.Q_NAME) + ChatColor.DARK_AQUA) + "\n";
|
String text = ChatColor.DARK_AQUA + getTitle(context).replace((String) context
|
||||||
|
.getSessionData(CK.Q_NAME), ChatColor.AQUA + (String) context.getSessionData(CK.Q_NAME)
|
||||||
|
+ ChatColor.DARK_AQUA) + "\n";
|
||||||
for (int i = 1; i <= size; i++) {
|
for (int i = 1; i <= size; i++) {
|
||||||
text += getNumberColor(context, i) + "" + ChatColor.BOLD + i + ChatColor.RESET + " - " + getSelectionText(context, i) + " " + getAdditionalText(context, i) + "\n";
|
text += getNumberColor(context, i) + "" + ChatColor.BOLD + i + ChatColor.RESET + " - "
|
||||||
|
+ getSelectionText(context, i) + " " + getAdditionalText(context, i) + "\n";
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
@ -308,7 +341,15 @@ public class RequirementsPrompt extends NumericPrompt {
|
|||||||
case 10:
|
case 10:
|
||||||
return new FailMessagePrompt();
|
return new FailMessagePrompt();
|
||||||
case 11:
|
case 11:
|
||||||
if (context.getSessionData(CK.REQ_MONEY) != null || context.getSessionData(CK.REQ_QUEST_POINTS) != null || context.getSessionData(CK.REQ_ITEMS) != null || context.getSessionData(CK.REQ_PERMISSION) != null || context.getSessionData(CK.REQ_QUEST) != null || context.getSessionData(CK.REQ_QUEST_BLOCK) != null || context.getSessionData(CK.REQ_MCMMO_SKILLS) != null || context.getSessionData(CK.REQ_HEROES_PRIMARY_CLASS) != null || context.getSessionData(CK.REQ_HEROES_SECONDARY_CLASS) != null || context.getSessionData(CK.REQ_CUSTOM) != null) {
|
if (context.getSessionData(CK.REQ_MONEY) != null || context.getSessionData(CK.REQ_QUEST_POINTS) != null
|
||||||
|
|| context.getSessionData(CK.REQ_ITEMS) != null
|
||||||
|
|| context.getSessionData(CK.REQ_PERMISSION) != null
|
||||||
|
|| context.getSessionData(CK.REQ_QUEST) != null
|
||||||
|
|| context.getSessionData(CK.REQ_QUEST_BLOCK) != null
|
||||||
|
|| context.getSessionData(CK.REQ_MCMMO_SKILLS) != null
|
||||||
|
|| context.getSessionData(CK.REQ_HEROES_PRIMARY_CLASS) != null
|
||||||
|
|| context.getSessionData(CK.REQ_HEROES_SECONDARY_CLASS) != null
|
||||||
|
|| context.getSessionData(CK.REQ_CUSTOM) != null) {
|
||||||
if (context.getSessionData(CK.Q_FAIL_MESSAGE) == null) {
|
if (context.getSessionData(CK.Q_FAIL_MESSAGE) == null) {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("reqNoMessage"));
|
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("reqNoMessage"));
|
||||||
return new RequirementsPrompt(plugin, factory);
|
return new RequirementsPrompt(plugin, factory);
|
||||||
@ -326,7 +367,9 @@ public class RequirementsPrompt extends NumericPrompt {
|
|||||||
public String getPromptText(ConversationContext context) {
|
public String getPromptText(ConversationContext context) {
|
||||||
String text = Lang.get("reqMoneyPrompt");
|
String text = Lang.get("reqMoneyPrompt");
|
||||||
if (plugin.getDependencies().getVaultEconomy() != null) {
|
if (plugin.getDependencies().getVaultEconomy() != null) {
|
||||||
text = text.replaceAll("<money>", ChatColor.DARK_PURPLE + ((plugin.getDependencies().getVaultEconomy().currencyNamePlural().isEmpty() ? Lang.get("money") : plugin.getDependencies().getVaultEconomy().currencyNamePlural())) + ChatColor.YELLOW);
|
text = text.replaceAll("<money>", ChatColor.DARK_PURPLE+ ((plugin.getDependencies().getVaultEconomy()
|
||||||
|
.currencyNamePlural().isEmpty() ? Lang.get("money") : plugin.getDependencies().getVaultEconomy()
|
||||||
|
.currencyNamePlural())) + ChatColor.YELLOW);
|
||||||
} else {
|
} else {
|
||||||
text = text.replaceAll("<money>", ChatColor.DARK_PURPLE + Lang.get("money") + ChatColor.YELLOW);
|
text = text.replaceAll("<money>", ChatColor.DARK_PURPLE + Lang.get("money") + ChatColor.YELLOW);
|
||||||
}
|
}
|
||||||
@ -335,7 +378,8 @@ public class RequirementsPrompt extends NumericPrompt {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Prompt acceptInput(ConversationContext context, String input) {
|
public Prompt acceptInput(ConversationContext context, String input) {
|
||||||
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false && input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false
|
||||||
|
&& input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
||||||
try {
|
try {
|
||||||
int i = Integer.parseInt(input);
|
int i = Integer.parseInt(input);
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
@ -345,7 +389,8 @@ public class RequirementsPrompt extends NumericPrompt {
|
|||||||
return new MoneyPrompt();
|
return new MoneyPrompt();
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("reqNotANumber").replace("<input>", input));
|
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("reqNotANumber")
|
||||||
|
.replace("<input>", input));
|
||||||
return new MoneyPrompt();
|
return new MoneyPrompt();
|
||||||
}
|
}
|
||||||
} else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) {
|
} else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) {
|
||||||
@ -365,7 +410,8 @@ public class RequirementsPrompt extends NumericPrompt {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Prompt acceptInput(ConversationContext context, String input) {
|
public Prompt acceptInput(ConversationContext context, String input) {
|
||||||
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false && input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false
|
||||||
|
&& input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
||||||
try {
|
try {
|
||||||
int i = Integer.parseInt(input);
|
int i = Integer.parseInt(input);
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
@ -375,7 +421,8 @@ public class RequirementsPrompt extends NumericPrompt {
|
|||||||
return new QuestPointsPrompt();
|
return new QuestPointsPrompt();
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("reqNotANumber").replace("<input>", input));
|
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("reqNotANumber")
|
||||||
|
.replace("<input>", input));
|
||||||
return new QuestPointsPrompt();
|
return new QuestPointsPrompt();
|
||||||
}
|
}
|
||||||
} else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) {
|
} else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) {
|
||||||
@ -414,7 +461,8 @@ public class RequirementsPrompt extends NumericPrompt {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Prompt acceptInput(ConversationContext context, String input) {
|
public Prompt acceptInput(ConversationContext context, String input) {
|
||||||
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false && input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false
|
||||||
|
&& input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
||||||
String[] args = input.split(Lang.get("charSemi"));
|
String[] args = input.split(Lang.get("charSemi"));
|
||||||
LinkedList<String> questNames = new LinkedList<String>();
|
LinkedList<String> questNames = new LinkedList<String>();
|
||||||
for (String s : args) {
|
for (String s : args) {
|
||||||
@ -477,25 +525,35 @@ public class RequirementsPrompt extends NumericPrompt {
|
|||||||
}
|
}
|
||||||
String text = ChatColor.GOLD + Lang.get("itemRequirementsTitle") + "\n";
|
String text = ChatColor.GOLD + Lang.get("itemRequirementsTitle") + "\n";
|
||||||
if (context.getSessionData(CK.REQ_ITEMS) == null) {
|
if (context.getSessionData(CK.REQ_ITEMS) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorDeliveryAddItem") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
text += ChatColor.GRAY + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.GRAY + " - " + Lang.get("reqSetRemoveItems") + " (" + Lang.get("reqNoItemsSet") + ")\n";
|
+ Lang.get("stageEditorDeliveryAddItem") + "\n";
|
||||||
text += ChatColor.RED + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("clear") + "\n";
|
text += ChatColor.GRAY + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.GRAY + " - "
|
||||||
text += ChatColor.GREEN + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("done");
|
+ Lang.get("reqSetRemoveItems") + " (" + Lang.get("reqNoItemsSet") + ")\n";
|
||||||
|
text += ChatColor.RED + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("clear") + "\n";
|
||||||
|
text += ChatColor.GREEN + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("done");
|
||||||
} else {
|
} else {
|
||||||
for (ItemStack is : getItems(context)) {
|
for (ItemStack is : getItems(context)) {
|
||||||
text += ChatColor.GRAY + " - " + ItemUtil.getDisplayString(is) + "\n";
|
text += ChatColor.GRAY + " - " + ItemUtil.getDisplayString(is) + "\n";
|
||||||
}
|
}
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorDeliveryAddItem") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("stageEditorDeliveryAddItem") + "\n";
|
||||||
if (context.getSessionData(CK.REQ_ITEMS_REMOVE) == null) {
|
if (context.getSessionData(CK.REQ_ITEMS_REMOVE) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("reqSetRemoveItems") + " (" + Lang.get("reqNoValuesSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("reqSetRemoveItems") + " (" + Lang.get("reqNoValuesSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("reqSetRemoveItems") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("reqSetRemoveItems") + "\n";
|
||||||
for (Boolean b : getRemoveItems(context)) {
|
for (Boolean b : getRemoveItems(context)) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.AQUA + (b.equals(Boolean.TRUE) ? Lang.get("yesWord") : Lang.get("noWord")) + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.AQUA
|
||||||
|
+ (b.equals(Boolean.TRUE) ? Lang.get("yesWord") : Lang.get("noWord")) + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
text += ChatColor.RED + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("clear") + "\n";
|
text += ChatColor.RED + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
text += ChatColor.GREEN + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("done");
|
+ Lang.get("clear") + "\n";
|
||||||
|
text += ChatColor.GREEN + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("done");
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
@ -590,7 +648,8 @@ public class RequirementsPrompt extends NumericPrompt {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Prompt acceptInput(ConversationContext context, String input) {
|
public Prompt acceptInput(ConversationContext context, String input) {
|
||||||
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false && input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false
|
||||||
|
&& input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
||||||
String[] args = input.split(" ");
|
String[] args = input.split(" ");
|
||||||
LinkedList<String> permissions = new LinkedList<String>();
|
LinkedList<String> permissions = new LinkedList<String>();
|
||||||
permissions.addAll(Arrays.asList(args));
|
permissions.addAll(Arrays.asList(args));
|
||||||
@ -620,7 +679,8 @@ public class RequirementsPrompt extends NumericPrompt {
|
|||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public Prompt acceptInput(ConversationContext context, String input) {
|
public Prompt acceptInput(ConversationContext context, String input) {
|
||||||
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false && input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false
|
||||||
|
&& input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
||||||
CustomRequirement found = null;
|
CustomRequirement found = null;
|
||||||
// Check if we have a custom requirement with the specified name
|
// Check if we have a custom requirement with the specified name
|
||||||
for (CustomRequirement cr : plugin.getCustomRequirements()) {
|
for (CustomRequirement cr : plugin.getCustomRequirements()) {
|
||||||
@ -642,7 +702,8 @@ public class RequirementsPrompt extends NumericPrompt {
|
|||||||
if (context.getSessionData(CK.REQ_CUSTOM) != null) {
|
if (context.getSessionData(CK.REQ_CUSTOM) != null) {
|
||||||
// The custom requirement may already have been added, so let's check that
|
// The custom requirement may already have been added, so let's check that
|
||||||
LinkedList<String> list = (LinkedList<String>) context.getSessionData(CK.REQ_CUSTOM);
|
LinkedList<String> list = (LinkedList<String>) context.getSessionData(CK.REQ_CUSTOM);
|
||||||
LinkedList<Map<String, Object>> datamapList = (LinkedList<Map<String, Object>>) context.getSessionData(CK.REQ_CUSTOM_DATA);
|
LinkedList<Map<String, Object>> datamapList
|
||||||
|
= (LinkedList<Map<String, Object>>) context.getSessionData(CK.REQ_CUSTOM_DATA);
|
||||||
if (list.contains(found.getName()) == false) {
|
if (list.contains(found.getName()) == false) {
|
||||||
// Hasn't been added yet, so let's do it
|
// Hasn't been added yet, so let's do it
|
||||||
list.add(found.getName());
|
list.add(found.getName());
|
||||||
@ -689,7 +750,8 @@ public class RequirementsPrompt extends NumericPrompt {
|
|||||||
public String getPromptText(ConversationContext context) {
|
public String getPromptText(ConversationContext context) {
|
||||||
String text = ChatColor.AQUA + "- ";
|
String text = ChatColor.AQUA + "- ";
|
||||||
LinkedList<String> list = (LinkedList<String>) context.getSessionData(CK.REQ_CUSTOM);
|
LinkedList<String> list = (LinkedList<String>) context.getSessionData(CK.REQ_CUSTOM);
|
||||||
LinkedList<Map<String, Object>> datamapList = (LinkedList<Map<String, Object>>) context.getSessionData(CK.REQ_CUSTOM_DATA);
|
LinkedList<Map<String, Object>> datamapList
|
||||||
|
= (LinkedList<Map<String, Object>>) context.getSessionData(CK.REQ_CUSTOM_DATA);
|
||||||
String reqName = list.getLast();
|
String reqName = list.getLast();
|
||||||
Map<String, Object> datamap = datamapList.getLast();
|
Map<String, Object> datamap = datamapList.getLast();
|
||||||
text += reqName + " -\n";
|
text += reqName + " -\n";
|
||||||
@ -700,7 +762,8 @@ public class RequirementsPrompt extends NumericPrompt {
|
|||||||
}
|
}
|
||||||
Collections.sort(datamapKeys);
|
Collections.sort(datamapKeys);
|
||||||
for (String dataKey : datamapKeys) {
|
for (String dataKey : datamapKeys) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + index + ChatColor.RESET + ChatColor.YELLOW + " - " + dataKey;
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + index + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ dataKey;
|
||||||
if (datamap.get(dataKey) != null) {
|
if (datamap.get(dataKey) != null) {
|
||||||
text += ChatColor.GREEN + " (" + datamap.get(dataKey).toString() + ")\n";
|
text += ChatColor.GREEN + " (" + datamap.get(dataKey).toString() + ")\n";
|
||||||
} else {
|
} else {
|
||||||
@ -715,7 +778,8 @@ public class RequirementsPrompt extends NumericPrompt {
|
|||||||
@Override
|
@Override
|
||||||
public Prompt acceptInput(ConversationContext context, String input) {
|
public Prompt acceptInput(ConversationContext context, String input) {
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
LinkedList<Map<String, Object>> datamapList = (LinkedList<Map<String, Object>>) context.getSessionData(CK.REQ_CUSTOM_DATA);
|
LinkedList<Map<String, Object>> datamapList
|
||||||
|
= (LinkedList<Map<String, Object>>) context.getSessionData(CK.REQ_CUSTOM_DATA);
|
||||||
Map<String, Object> datamap = datamapList.getLast();
|
Map<String, Object> datamap = datamapList.getLast();
|
||||||
int numInput;
|
int numInput;
|
||||||
try {
|
try {
|
||||||
@ -753,7 +817,8 @@ public class RequirementsPrompt extends NumericPrompt {
|
|||||||
String text = "";
|
String text = "";
|
||||||
String temp = (String) context.getSessionData(CK.REQ_CUSTOM_DATA_TEMP);
|
String temp = (String) context.getSessionData(CK.REQ_CUSTOM_DATA_TEMP);
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
Map<String, String> descriptions = (Map<String, String>) context.getSessionData(CK.REQ_CUSTOM_DATA_DESCRIPTIONS);
|
Map<String, String> descriptions
|
||||||
|
= (Map<String, String>) context.getSessionData(CK.REQ_CUSTOM_DATA_DESCRIPTIONS);
|
||||||
if (descriptions.get(temp) != null) {
|
if (descriptions.get(temp) != null) {
|
||||||
text += ChatColor.GOLD + descriptions.get(temp) + "\n";
|
text += ChatColor.GOLD + descriptions.get(temp) + "\n";
|
||||||
}
|
}
|
||||||
@ -766,7 +831,8 @@ public class RequirementsPrompt extends NumericPrompt {
|
|||||||
@Override
|
@Override
|
||||||
public Prompt acceptInput(ConversationContext context, String input) {
|
public Prompt acceptInput(ConversationContext context, String input) {
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
LinkedList<Map<String, Object>> datamapList = (LinkedList<Map<String, Object>>) context.getSessionData(CK.REQ_CUSTOM_DATA);
|
LinkedList<Map<String, Object>> datamapList
|
||||||
|
= (LinkedList<Map<String, Object>>) context.getSessionData(CK.REQ_CUSTOM_DATA);
|
||||||
Map<String, Object> datamap = datamapList.getLast();
|
Map<String, Object> datamap = datamapList.getLast();
|
||||||
datamap.put((String) context.getSessionData(CK.REQ_CUSTOM_DATA_TEMP), input);
|
datamap.put((String) context.getSessionData(CK.REQ_CUSTOM_DATA_TEMP), input);
|
||||||
context.setSessionData(CK.REQ_CUSTOM_DATA_TEMP, null);
|
context.setSessionData(CK.REQ_CUSTOM_DATA_TEMP, null);
|
||||||
@ -784,9 +850,11 @@ public class RequirementsPrompt extends NumericPrompt {
|
|||||||
public String getPromptText(ConversationContext cc) {
|
public String getPromptText(ConversationContext cc) {
|
||||||
String text = ChatColor.DARK_GREEN + Lang.get("mcMMORequirementsTitle") + "\n";
|
String text = ChatColor.DARK_GREEN + Lang.get("mcMMORequirementsTitle") + "\n";
|
||||||
if (cc.getSessionData(CK.REQ_MCMMO_SKILLS) == null) {
|
if (cc.getSessionData(CK.REQ_MCMMO_SKILLS) == null) {
|
||||||
text += ChatColor.BOLD + "" + ChatColor.GREEN + "1" + ChatColor.RESET + ChatColor.GREEN + " - " + Lang.get("reqSetSkills") + "(" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.BOLD + "" + ChatColor.GREEN + "1" + ChatColor.RESET + ChatColor.GREEN + " - "
|
||||||
|
+ Lang.get("reqSetSkills") + "(" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BOLD + "" + ChatColor.GREEN + "1" + ChatColor.RESET + ChatColor.GREEN + " - " + Lang.get("reqSetSkills") + "\n";
|
text += ChatColor.BOLD + "" + ChatColor.GREEN + "1" + ChatColor.RESET + ChatColor.GREEN + " - "
|
||||||
|
+ Lang.get("reqSetSkills") + "\n";
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
LinkedList<String> skills = (LinkedList<String>) cc.getSessionData(CK.REQ_MCMMO_SKILLS);
|
LinkedList<String> skills = (LinkedList<String>) cc.getSessionData(CK.REQ_MCMMO_SKILLS);
|
||||||
for (String skill : skills) {
|
for (String skill : skills) {
|
||||||
@ -794,16 +862,19 @@ public class RequirementsPrompt extends NumericPrompt {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (cc.getSessionData(CK.REQ_MCMMO_SKILL_AMOUNTS) == null) {
|
if (cc.getSessionData(CK.REQ_MCMMO_SKILL_AMOUNTS) == null) {
|
||||||
text += ChatColor.BOLD + "" + ChatColor.GREEN + "2" + ChatColor.RESET + ChatColor.GREEN + " - " + Lang.get("reqSetSkillAmounts") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.BOLD + "" + ChatColor.GREEN + "2" + ChatColor.RESET + ChatColor.GREEN + " - "
|
||||||
|
+ Lang.get("reqSetSkillAmounts") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BOLD + "" + ChatColor.GREEN + "2" + ChatColor.RESET + ChatColor.GREEN + " - " + Lang.get("reqSetSkillAmounts") + "\n";
|
text += ChatColor.BOLD + "" + ChatColor.GREEN + "2" + ChatColor.RESET + ChatColor.GREEN + " - "
|
||||||
|
+ Lang.get("reqSetSkillAmounts") + "\n";
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
LinkedList<Integer> amounts = (LinkedList<Integer>) cc.getSessionData(CK.REQ_MCMMO_SKILL_AMOUNTS);
|
LinkedList<Integer> amounts = (LinkedList<Integer>) cc.getSessionData(CK.REQ_MCMMO_SKILL_AMOUNTS);
|
||||||
for (int i : amounts) {
|
for (int i : amounts) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.AQUA + i + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.AQUA + i + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
text += ChatColor.BOLD + "" + ChatColor.GREEN + "3" + ChatColor.RESET + ChatColor.GREEN + " - " + Lang.get("done");
|
text += ChatColor.BOLD + "" + ChatColor.GREEN + "3" + ChatColor.RESET + ChatColor.GREEN + " - "
|
||||||
|
+ Lang.get("done");
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -838,7 +909,8 @@ public class RequirementsPrompt extends NumericPrompt {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Prompt acceptInput(ConversationContext cc, String input) {
|
public Prompt acceptInput(ConversationContext cc, String input) {
|
||||||
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false && input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false
|
||||||
|
&& input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
||||||
LinkedList<String> skills = new LinkedList<String>();
|
LinkedList<String> skills = new LinkedList<String>();
|
||||||
for (String s : input.split(" ")) {
|
for (String s : input.split(" ")) {
|
||||||
String formatted = MiscUtil.getCapitalized(s);
|
String formatted = MiscUtil.getCapitalized(s);
|
||||||
@ -876,7 +948,8 @@ public class RequirementsPrompt extends NumericPrompt {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Prompt acceptInput(ConversationContext cc, String input) {
|
public Prompt acceptInput(ConversationContext cc, String input) {
|
||||||
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false && input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false
|
||||||
|
&& input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
||||||
LinkedList<Integer> amounts = new LinkedList<Integer>();
|
LinkedList<Integer> amounts = new LinkedList<Integer>();
|
||||||
for (String s : input.split(" ")) {
|
for (String s : input.split(" ")) {
|
||||||
try {
|
try {
|
||||||
@ -912,16 +985,23 @@ public class RequirementsPrompt extends NumericPrompt {
|
|||||||
public String getPromptText(ConversationContext cc) {
|
public String getPromptText(ConversationContext cc) {
|
||||||
String text = ChatColor.DARK_GREEN + Lang.get("heroesRequirementsTitle") + "\n";
|
String text = ChatColor.DARK_GREEN + Lang.get("heroesRequirementsTitle") + "\n";
|
||||||
if (cc.getSessionData(CK.REQ_HEROES_PRIMARY_CLASS) == null) {
|
if (cc.getSessionData(CK.REQ_HEROES_PRIMARY_CLASS) == null) {
|
||||||
text += ChatColor.BOLD + "" + ChatColor.GREEN + "1" + ChatColor.RESET + ChatColor.GREEN + " - " + Lang.get("reqHeroesSetPrimary") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.BOLD + "" + ChatColor.GREEN + "1" + ChatColor.RESET + ChatColor.GREEN + " - "
|
||||||
|
+ Lang.get("reqHeroesSetPrimary") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BOLD + "" + ChatColor.GREEN + "1" + ChatColor.RESET + ChatColor.GREEN + " - " + Lang.get("reqHeroesSetPrimary") + " (" + ChatColor.AQUA + (String) cc.getSessionData(CK.REQ_HEROES_PRIMARY_CLASS) + ChatColor.GREEN + ")\n";
|
text += ChatColor.BOLD + "" + ChatColor.GREEN + "1" + ChatColor.RESET + ChatColor.GREEN + " - "
|
||||||
|
+ Lang.get("reqHeroesSetPrimary") + " (" + ChatColor.AQUA
|
||||||
|
+ (String) cc.getSessionData(CK.REQ_HEROES_PRIMARY_CLASS) + ChatColor.GREEN + ")\n";
|
||||||
}
|
}
|
||||||
if (cc.getSessionData(CK.REQ_HEROES_SECONDARY_CLASS) == null) {
|
if (cc.getSessionData(CK.REQ_HEROES_SECONDARY_CLASS) == null) {
|
||||||
text += ChatColor.BOLD + "" + ChatColor.GREEN + "2" + ChatColor.RESET + ChatColor.GREEN + " - " + Lang.get("reqHeroesSetSecondary") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.BOLD + "" + ChatColor.GREEN + "2" + ChatColor.RESET + ChatColor.GREEN + " - "
|
||||||
|
+ Lang.get("reqHeroesSetSecondary") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BOLD + "" + ChatColor.GREEN + "2" + ChatColor.RESET + ChatColor.GREEN + " - " + Lang.get("reqHeroesSetSecondary") + " (" + ChatColor.AQUA + (String) cc.getSessionData(CK.REQ_HEROES_SECONDARY_CLASS) + ChatColor.GREEN + ")\n";
|
text += ChatColor.BOLD + "" + ChatColor.GREEN + "2" + ChatColor.RESET + ChatColor.GREEN + " - "
|
||||||
|
+ Lang.get("reqHeroesSetSecondary") + " (" + ChatColor.AQUA
|
||||||
|
+ (String) cc.getSessionData(CK.REQ_HEROES_SECONDARY_CLASS) + ChatColor.GREEN + ")\n";
|
||||||
}
|
}
|
||||||
text += ChatColor.BOLD + "" + ChatColor.GREEN + "3" + ChatColor.RESET + ChatColor.GREEN + " - " + Lang.get("done");
|
text += ChatColor.BOLD + "" + ChatColor.GREEN + "3" + ChatColor.RESET + ChatColor.GREEN + " - "
|
||||||
|
+ Lang.get("done");
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -963,7 +1043,8 @@ public class RequirementsPrompt extends NumericPrompt {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Prompt acceptInput(ConversationContext cc, String input) {
|
public Prompt acceptInput(ConversationContext cc, String input) {
|
||||||
if (input.equalsIgnoreCase(Lang.get("cmdClear")) == false && input.equalsIgnoreCase(Lang.get("cmdCancel")) == false) {
|
if (input.equalsIgnoreCase(Lang.get("cmdClear")) == false
|
||||||
|
&& input.equalsIgnoreCase(Lang.get("cmdCancel")) == false) {
|
||||||
HeroClass hc = plugin.getDependencies().getHeroes().getClassManager().getClass(input);
|
HeroClass hc = plugin.getDependencies().getHeroes().getClassManager().getClass(input);
|
||||||
if (hc != null) {
|
if (hc != null) {
|
||||||
if (hc.isPrimary()) {
|
if (hc.isPrimary()) {
|
||||||
@ -1014,7 +1095,8 @@ public class RequirementsPrompt extends NumericPrompt {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Prompt acceptInput(ConversationContext cc, String input) {
|
public Prompt acceptInput(ConversationContext cc, String input) {
|
||||||
if (input.equalsIgnoreCase(Lang.get("cmdClear")) == false && input.equalsIgnoreCase(Lang.get("cmdCancel")) == false) {
|
if (input.equalsIgnoreCase(Lang.get("cmdClear")) == false
|
||||||
|
&& input.equalsIgnoreCase(Lang.get("cmdCancel")) == false) {
|
||||||
HeroClass hc = plugin.getDependencies().getHeroes().getClassManager().getClass(input);
|
HeroClass hc = plugin.getDependencies().getHeroes().getClassManager().getClass(input);
|
||||||
if (hc != null) {
|
if (hc != null) {
|
||||||
if (hc.isSecondary()) {
|
if (hc.isSecondary()) {
|
||||||
|
@ -102,7 +102,7 @@ public class RewardsPrompt extends NumericPrompt {
|
|||||||
case 2:
|
case 2:
|
||||||
return ChatColor.YELLOW + Lang.get("rewSetQuestPoints");
|
return ChatColor.YELLOW + Lang.get("rewSetQuestPoints");
|
||||||
case 3:
|
case 3:
|
||||||
return ChatColor.YELLOW + Lang.get("rewSetItem");
|
return ChatColor.YELLOW + Lang.get("rewSetItems");
|
||||||
case 4:
|
case 4:
|
||||||
return ChatColor.YELLOW + Lang.get("rewSetExperience");
|
return ChatColor.YELLOW + Lang.get("rewSetExperience");
|
||||||
case 5:
|
case 5:
|
||||||
@ -132,13 +132,16 @@ public class RewardsPrompt extends NumericPrompt {
|
|||||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||||
} else {
|
} else {
|
||||||
int moneyRew = (Integer) context.getSessionData(CK.REW_MONEY);
|
int moneyRew = (Integer) context.getSessionData(CK.REW_MONEY);
|
||||||
return ChatColor.GRAY + "(" + ChatColor.AQUA + moneyRew + " " + (moneyRew > 1 ? plugin.getCurrency(true) : plugin.getCurrency(false)) + ChatColor.GRAY + ")";
|
return ChatColor.GRAY + "(" + ChatColor.AQUA + moneyRew + " "
|
||||||
|
+ (moneyRew > 1 ? plugin.getDependencies().getCurrency(true)
|
||||||
|
: plugin.getDependencies().getCurrency(false)) + ChatColor.GRAY + ")";
|
||||||
}
|
}
|
||||||
case 2:
|
case 2:
|
||||||
if (context.getSessionData(CK.REW_QUEST_POINTS) == null) {
|
if (context.getSessionData(CK.REW_QUEST_POINTS) == null) {
|
||||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||||
} else {
|
} else {
|
||||||
return ChatColor.GRAY + "(" + ChatColor.AQUA + context.getSessionData(CK.REW_QUEST_POINTS) + " " + Lang.get("questPoints") + ChatColor.GRAY + ")";
|
return ChatColor.GRAY + "(" + ChatColor.AQUA + context.getSessionData(CK.REW_QUEST_POINTS) + " "
|
||||||
|
+ Lang.get("questPoints") + ChatColor.GRAY + ")";
|
||||||
}
|
}
|
||||||
case 3:
|
case 3:
|
||||||
if (context.getSessionData(CK.REW_ITEMS) == null) {
|
if (context.getSessionData(CK.REW_ITEMS) == null) {
|
||||||
@ -147,7 +150,8 @@ public class RewardsPrompt extends NumericPrompt {
|
|||||||
String text = "";
|
String text = "";
|
||||||
LinkedList<ItemStack> items = (LinkedList<ItemStack>) context.getSessionData(CK.REW_ITEMS);
|
LinkedList<ItemStack> items = (LinkedList<ItemStack>) context.getSessionData(CK.REW_ITEMS);
|
||||||
for (int i = 0; i < items.size(); i++) {
|
for (int i = 0; i < items.size(); i++) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.BLUE + ItemUtil.getName(items.get(i)) + ChatColor.GRAY + " x " + ChatColor.AQUA + items.get(i).getAmount() + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.BLUE + ItemUtil.getName(items.get(i))
|
||||||
|
+ ChatColor.GRAY + " x " + ChatColor.AQUA + items.get(i).getAmount() + "\n";
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
@ -155,7 +159,8 @@ public class RewardsPrompt extends NumericPrompt {
|
|||||||
if (context.getSessionData(CK.REW_EXP) == null) {
|
if (context.getSessionData(CK.REW_EXP) == null) {
|
||||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||||
} else {
|
} else {
|
||||||
return ChatColor.GRAY + "(" + ChatColor.AQUA + context.getSessionData(CK.REW_EXP) + " " + Lang.get("points") + ChatColor.DARK_GRAY + ")";
|
return ChatColor.GRAY + "(" + ChatColor.AQUA + context.getSessionData(CK.REW_EXP) + " "
|
||||||
|
+ Lang.get("points") + ChatColor.DARK_GRAY + ")";
|
||||||
}
|
}
|
||||||
case 5:
|
case 5:
|
||||||
if (context.getSessionData(CK.REW_COMMAND) == null) {
|
if (context.getSessionData(CK.REW_COMMAND) == null) {
|
||||||
@ -166,7 +171,14 @@ public class RewardsPrompt extends NumericPrompt {
|
|||||||
List<String> overrides = (List<String>) context.getSessionData(CK.REW_COMMAND_OVERRIDE_DISPLAY);
|
List<String> overrides = (List<String>) context.getSessionData(CK.REW_COMMAND_OVERRIDE_DISPLAY);
|
||||||
int index = 0;
|
int index = 0;
|
||||||
for (String cmd : commands) {
|
for (String cmd : commands) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.AQUA + cmd + (overrides != null ? ChatColor.GRAY + " (\"" + ChatColor.AQUA + overrides.get(index) + ChatColor.GRAY + "\")" : "") + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.AQUA + cmd;
|
||||||
|
if (overrides != null) {
|
||||||
|
if (index < overrides.size()) {
|
||||||
|
text += ChatColor.GRAY + " (\"" + ChatColor.AQUA + overrides.get(index)
|
||||||
|
+ ChatColor.GRAY + "\")";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
text += "\n";
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
@ -191,7 +203,8 @@ public class RewardsPrompt extends NumericPrompt {
|
|||||||
List<String> skills = (List<String>) context.getSessionData(CK.REW_MCMMO_SKILLS);
|
List<String> skills = (List<String>) context.getSessionData(CK.REW_MCMMO_SKILLS);
|
||||||
List<Integer> amounts = (List<Integer>) context.getSessionData(CK.REW_MCMMO_AMOUNTS);
|
List<Integer> amounts = (List<Integer>) context.getSessionData(CK.REW_MCMMO_AMOUNTS);
|
||||||
for (String skill : skills) {
|
for (String skill : skills) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.AQUA + skill + ChatColor.GRAY + " x " + ChatColor.DARK_AQUA + amounts.get(skills.indexOf(skill)) + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.AQUA + skill + ChatColor.GRAY + " x "
|
||||||
|
+ ChatColor.DARK_AQUA + amounts.get(skills.indexOf(skill)) + "\n";
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
@ -207,7 +220,9 @@ public class RewardsPrompt extends NumericPrompt {
|
|||||||
List<String> heroClasses = (List<String>) context.getSessionData(CK.REW_HEROES_CLASSES);
|
List<String> heroClasses = (List<String>) context.getSessionData(CK.REW_HEROES_CLASSES);
|
||||||
List<Double> amounts = (List<Double>) context.getSessionData(CK.REW_HEROES_AMOUNTS);
|
List<Double> amounts = (List<Double>) context.getSessionData(CK.REW_HEROES_AMOUNTS);
|
||||||
for (String heroClass : heroClasses) {
|
for (String heroClass : heroClasses) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.AQUA + amounts.get(heroClasses.indexOf(heroClass)) + " " + ChatColor.DARK_AQUA + heroClass + " " + Lang.get("experience") + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.AQUA
|
||||||
|
+ amounts.get(heroClasses.indexOf(heroClass)) + " " + ChatColor.DARK_AQUA
|
||||||
|
+ heroClass + " " + Lang.get("experience") + "\n";
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
@ -236,7 +251,8 @@ public class RewardsPrompt extends NumericPrompt {
|
|||||||
String text = "";
|
String text = "";
|
||||||
LinkedList<String> customRews = (LinkedList<String>) context.getSessionData(CK.REW_CUSTOM);
|
LinkedList<String> customRews = (LinkedList<String>) context.getSessionData(CK.REW_CUSTOM);
|
||||||
for (String s : customRews) {
|
for (String s : customRews) {
|
||||||
text += ChatColor.RESET + "" + ChatColor.DARK_PURPLE + " - " + ChatColor.LIGHT_PURPLE + s + "\n";
|
text += ChatColor.RESET + "" + ChatColor.DARK_PURPLE + " - " + ChatColor.LIGHT_PURPLE + s
|
||||||
|
+ "\n";
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
@ -256,9 +272,12 @@ public class RewardsPrompt extends NumericPrompt {
|
|||||||
QuestsEditorPostOpenRewardsPromptEvent event = new QuestsEditorPostOpenRewardsPromptEvent(factory, context);
|
QuestsEditorPostOpenRewardsPromptEvent event = new QuestsEditorPostOpenRewardsPromptEvent(factory, context);
|
||||||
plugin.getServer().getPluginManager().callEvent(event);
|
plugin.getServer().getPluginManager().callEvent(event);
|
||||||
|
|
||||||
String text = ChatColor.LIGHT_PURPLE + getTitle(context).replace((String) context.getSessionData(CK.Q_NAME), ChatColor.AQUA + (String) context.getSessionData(CK.Q_NAME) + ChatColor.LIGHT_PURPLE) + "\n";
|
String text = ChatColor.LIGHT_PURPLE + getTitle(context).replace((String) context
|
||||||
|
.getSessionData(CK.Q_NAME), ChatColor.AQUA + (String) context.getSessionData(CK.Q_NAME)
|
||||||
|
+ ChatColor.LIGHT_PURPLE) + "\n";
|
||||||
for (int i = 1; i <= size; i++) {
|
for (int i = 1; i <= size; i++) {
|
||||||
text += getNumberColor(context, i) + "" + ChatColor.BOLD + i + ChatColor.RESET + " - " + getSelectionText(context, i) + " " + getAdditionalText(context, i) + "\n";
|
text += getNumberColor(context, i) + "" + ChatColor.BOLD + i + ChatColor.RESET + " - "
|
||||||
|
+ getSelectionText(context, i) + " " + getAdditionalText(context, i) + "\n";
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
@ -311,7 +330,9 @@ public class RewardsPrompt extends NumericPrompt {
|
|||||||
public String getPromptText(ConversationContext context) {
|
public String getPromptText(ConversationContext context) {
|
||||||
String text = Lang.get("rewMoneyPrompt");
|
String text = Lang.get("rewMoneyPrompt");
|
||||||
if (plugin.getDependencies().getVaultEconomy() != null) {
|
if (plugin.getDependencies().getVaultEconomy() != null) {
|
||||||
text = text.replace("<money>", ChatColor.AQUA + (plugin.getDependencies().getVaultEconomy().currencyNamePlural().isEmpty() ? Lang.get("money") : plugin.getDependencies().getVaultEconomy().currencyNamePlural()) + ChatColor.YELLOW);
|
text = text.replace("<money>", ChatColor.AQUA + (plugin.getDependencies().getVaultEconomy()
|
||||||
|
.currencyNamePlural().isEmpty() ? Lang.get("money") : plugin.getDependencies().getVaultEconomy()
|
||||||
|
.currencyNamePlural()) + ChatColor.YELLOW);
|
||||||
} else {
|
} else {
|
||||||
text = text.replace("<money>", ChatColor.AQUA + Lang.get("money") + ChatColor.YELLOW);
|
text = text.replace("<money>", ChatColor.AQUA + Lang.get("money") + ChatColor.YELLOW);
|
||||||
}
|
}
|
||||||
@ -320,7 +341,8 @@ public class RewardsPrompt extends NumericPrompt {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Prompt acceptInput(ConversationContext context, String input) {
|
public Prompt acceptInput(ConversationContext context, String input) {
|
||||||
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false && input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false
|
||||||
|
&& input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
||||||
try {
|
try {
|
||||||
int i = Integer.parseInt(input);
|
int i = Integer.parseInt(input);
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
@ -330,7 +352,8 @@ public class RewardsPrompt extends NumericPrompt {
|
|||||||
return new MoneyPrompt();
|
return new MoneyPrompt();
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("reqNotANumber").replace("<input>", input));
|
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("reqNotANumber")
|
||||||
|
.replace("<input>", input));
|
||||||
return new MoneyPrompt();
|
return new MoneyPrompt();
|
||||||
}
|
}
|
||||||
} else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) {
|
} else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) {
|
||||||
@ -350,7 +373,8 @@ public class RewardsPrompt extends NumericPrompt {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Prompt acceptInput(ConversationContext context, String input) {
|
public Prompt acceptInput(ConversationContext context, String input) {
|
||||||
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false && input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false
|
||||||
|
&& input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
||||||
try {
|
try {
|
||||||
int i = Integer.parseInt(input);
|
int i = Integer.parseInt(input);
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
@ -360,7 +384,8 @@ public class RewardsPrompt extends NumericPrompt {
|
|||||||
return new ExperiencePrompt();
|
return new ExperiencePrompt();
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("reqNotANumber").replace("<input>", input));
|
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("reqNotANumber")
|
||||||
|
.replace("<input>", input));
|
||||||
return new ExperiencePrompt();
|
return new ExperiencePrompt();
|
||||||
}
|
}
|
||||||
} else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) {
|
} else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) {
|
||||||
@ -380,7 +405,8 @@ public class RewardsPrompt extends NumericPrompt {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Prompt acceptInput(ConversationContext context, String input) {
|
public Prompt acceptInput(ConversationContext context, String input) {
|
||||||
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false && input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false
|
||||||
|
&& input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
||||||
try {
|
try {
|
||||||
int i = Integer.parseInt(input);
|
int i = Integer.parseInt(input);
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
@ -390,7 +416,8 @@ public class RewardsPrompt extends NumericPrompt {
|
|||||||
return new QuestPointsPrompt();
|
return new QuestPointsPrompt();
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("reqNotANumber").replace("<input>", input));
|
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("reqNotANumber")
|
||||||
|
.replace("<input>", input));
|
||||||
return new QuestPointsPrompt();
|
return new QuestPointsPrompt();
|
||||||
}
|
}
|
||||||
} else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) {
|
} else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) {
|
||||||
@ -426,16 +453,22 @@ public class RewardsPrompt extends NumericPrompt {
|
|||||||
String text = ChatColor.GOLD + Lang.get("itemRewardsTitle") + "\n";
|
String text = ChatColor.GOLD + Lang.get("itemRewardsTitle") + "\n";
|
||||||
if (context.getSessionData(CK.REW_ITEMS) == null) {
|
if (context.getSessionData(CK.REW_ITEMS) == null) {
|
||||||
text += ChatColor.GRAY + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorDeliveryAddItem") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("clear") + "\n";
|
+ Lang.get("stageEditorDeliveryAddItem") + "\n";
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("done");
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("clear") + "\n";
|
||||||
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("done");
|
||||||
} else {
|
} else {
|
||||||
for (ItemStack is : getItems(context)) {
|
for (ItemStack is : getItems(context)) {
|
||||||
text += ChatColor.GRAY + "- " + ItemUtil.getDisplayString(is) + "\n";
|
text += ChatColor.GRAY + "- " + ItemUtil.getDisplayString(is) + "\n";
|
||||||
}
|
}
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorDeliveryAddItem") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("clear") + "\n";
|
+ Lang.get("stageEditorDeliveryAddItem") + "\n";
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("done");
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("clear") + "\n";
|
||||||
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("done");
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
@ -470,25 +503,34 @@ public class RewardsPrompt extends NumericPrompt {
|
|||||||
public String getPromptText(ConversationContext context) {
|
public String getPromptText(ConversationContext context) {
|
||||||
String text = ChatColor.GOLD + "- " + Lang.get("rewCommands") + " -\n";
|
String text = ChatColor.GOLD + "- " + Lang.get("rewCommands") + " -\n";
|
||||||
if (context.getSessionData(CK.REW_COMMAND) == null) {
|
if (context.getSessionData(CK.REW_COMMAND) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("rewSetCommands") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
text += ChatColor.GRAY + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.GRAY + " - " + Lang.get("rewSetCommandsOverrides") + " (" + Lang.get("noneSet") + ")\n";
|
+ Lang.get("rewSetCommands") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
text += ChatColor.RED + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("clear") + "\n";
|
text += ChatColor.GRAY + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.GRAY + " - "
|
||||||
text += ChatColor.GREEN + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("done");
|
+ Lang.get("rewSetCommandsOverrides") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
|
text += ChatColor.RED + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("clear") + "\n";
|
||||||
|
text += ChatColor.GREEN + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("done");
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("rewSetCommands") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("rewSetCommands") + "\n";
|
||||||
for (String s : getCommand(context)) {
|
for (String s : getCommand(context)) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.AQUA + s + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.AQUA + s + "\n";
|
||||||
}
|
}
|
||||||
if (context.getSessionData(CK.REW_COMMAND_OVERRIDE_DISPLAY) == null) {
|
if (context.getSessionData(CK.REW_COMMAND_OVERRIDE_DISPLAY) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("rewSetCommandsOverrides") + " (" + Lang.get("stageEditorOptional") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("rewSetCommandsOverrides") + " (" + Lang.get("stageEditorOptional") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("rewSetCommandsOverrides") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("rewSetCommandsOverrides") + "\n";
|
||||||
for (String s : getCommandOverrideDisplay(context)) {
|
for (String s : getCommandOverrideDisplay(context)) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.AQUA + s + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.AQUA + s + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
text += ChatColor.RED + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("clear") + "\n";
|
text += ChatColor.RED + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
text += ChatColor.GREEN + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("done");
|
+ Lang.get("clear") + "\n";
|
||||||
|
text += ChatColor.GREEN + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("done");
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
@ -531,14 +573,16 @@ public class RewardsPrompt extends NumericPrompt {
|
|||||||
@Override
|
@Override
|
||||||
public String getPromptText(ConversationContext context) {
|
public String getPromptText(ConversationContext context) {
|
||||||
String lang1 = Lang.get("rewCommandPrompt");
|
String lang1 = Lang.get("rewCommandPrompt");
|
||||||
lang1 = lang1.replace("<comma>", ChatColor.BOLD + "" + ChatColor.RED + "comma" + ChatColor.RESET + ChatColor.YELLOW);
|
lang1 = lang1.replace("<comma>", ChatColor.BOLD + "" + ChatColor.RED + "comma" + ChatColor.RESET
|
||||||
|
+ ChatColor.YELLOW);
|
||||||
String lang2 = Lang.get("rewCommandPromptHint");
|
String lang2 = Lang.get("rewCommandPromptHint");
|
||||||
return ChatColor.YELLOW + lang1 + "\n" + ChatColor.GOLD + lang2;
|
return ChatColor.YELLOW + lang1 + "\n" + ChatColor.GOLD + lang2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Prompt acceptInput(ConversationContext context, String input) {
|
public Prompt acceptInput(ConversationContext context, String input) {
|
||||||
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false && input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false
|
||||||
|
&& input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
||||||
String[] args = input.split(Lang.get("charSemi"));
|
String[] args = input.split(Lang.get("charSemi"));
|
||||||
List<String> commands = new LinkedList<String>();
|
List<String> commands = new LinkedList<String>();
|
||||||
for (String s : args) {
|
for (String s : args) {
|
||||||
@ -566,7 +610,8 @@ public class RewardsPrompt extends NumericPrompt {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Prompt acceptInput(ConversationContext context, String input) {
|
public Prompt acceptInput(ConversationContext context, String input) {
|
||||||
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false && input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false
|
||||||
|
&& input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
||||||
String[] args = input.split(Lang.get("charSemi"));
|
String[] args = input.split(Lang.get("charSemi"));
|
||||||
List<String> overrides = new LinkedList<String>();
|
List<String> overrides = new LinkedList<String>();
|
||||||
for (String s : args) {
|
for (String s : args) {
|
||||||
@ -592,7 +637,8 @@ public class RewardsPrompt extends NumericPrompt {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Prompt acceptInput(ConversationContext context, String input) {
|
public Prompt acceptInput(ConversationContext context, String input) {
|
||||||
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false && input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false
|
||||||
|
&& input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
||||||
String[] args = input.split(" ");
|
String[] args = input.split(" ");
|
||||||
List<String> permissions = new LinkedList<String>();
|
List<String> permissions = new LinkedList<String>();
|
||||||
permissions.addAll(Arrays.asList(args));
|
permissions.addAll(Arrays.asList(args));
|
||||||
@ -614,25 +660,34 @@ public class RewardsPrompt extends NumericPrompt {
|
|||||||
public String getPromptText(ConversationContext context) {
|
public String getPromptText(ConversationContext context) {
|
||||||
String text = ChatColor.GOLD + Lang.get("mcMMORewardsTitle") + "\n";
|
String text = ChatColor.GOLD + Lang.get("mcMMORewardsTitle") + "\n";
|
||||||
if (context.getSessionData(CK.REW_MCMMO_SKILLS) == null) {
|
if (context.getSessionData(CK.REW_MCMMO_SKILLS) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("reqSetSkills") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
text += ChatColor.GRAY + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.GRAY + " - " + Lang.get("reqSetSkillAmounts") + " (" + Lang.get("rewNoMcMMOSkills") + ")\n";
|
+ Lang.get("reqSetSkills") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("clear") + "\n";
|
text += ChatColor.GRAY + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.GRAY + " - "
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("done");
|
+ Lang.get("reqSetSkillAmounts") + " (" + Lang.get("rewNoMcMMOSkills") + ")\n";
|
||||||
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("clear") + "\n";
|
||||||
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("done");
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("reqSetSkills") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("reqSetSkills") + "\n";
|
||||||
for (String s : getSkills(context)) {
|
for (String s : getSkills(context)) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.AQUA + s + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.AQUA + s + "\n";
|
||||||
}
|
}
|
||||||
if (context.getSessionData(CK.REW_MCMMO_AMOUNTS) == null) {
|
if (context.getSessionData(CK.REW_MCMMO_AMOUNTS) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("reqSetSkillAmounts") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("reqSetSkillAmounts") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("reqSetSkillAmounts") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("reqSetSkillAmounts") + "\n";
|
||||||
for (Integer i : getSkillAmounts(context)) {
|
for (Integer i : getSkillAmounts(context)) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.AQUA + i + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.AQUA + i + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("clear") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("done");
|
+ Lang.get("clear") + "\n";
|
||||||
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("done");
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
@ -768,25 +823,34 @@ public class RewardsPrompt extends NumericPrompt {
|
|||||||
public String getPromptText(ConversationContext context) {
|
public String getPromptText(ConversationContext context) {
|
||||||
String text = ChatColor.GOLD + Lang.get("heroesRewardsTitle") + "\n";
|
String text = ChatColor.GOLD + Lang.get("heroesRewardsTitle") + "\n";
|
||||||
if (context.getSessionData(CK.REW_HEROES_CLASSES) == null) {
|
if (context.getSessionData(CK.REW_HEROES_CLASSES) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("rewSetHeroesClasses") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
text += ChatColor.GRAY + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.GRAY + " - " + Lang.get("rewSetHeroesAmounts") + "(" + Lang.get("rewNoHeroesClasses") + ")\n";
|
+ Lang.get("rewSetHeroesClasses") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("clear") + "\n";
|
text += ChatColor.GRAY + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.GRAY + " - "
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("done");
|
+ Lang.get("rewSetHeroesAmounts") + "(" + Lang.get("rewNoHeroesClasses") + ")\n";
|
||||||
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("clear") + "\n";
|
||||||
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("done");
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("rewSetHeroesClasses") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "1" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("rewSetHeroesClasses") + "\n";
|
||||||
for (String s : getClasses(context)) {
|
for (String s : getClasses(context)) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.AQUA + s + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.AQUA + s + "\n";
|
||||||
}
|
}
|
||||||
if (context.getSessionData(CK.REW_HEROES_AMOUNTS) == null) {
|
if (context.getSessionData(CK.REW_HEROES_AMOUNTS) == null) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("rewSetHeroesAmounts") + " (" + Lang.get("noneSet") + ")\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("rewSetHeroesAmounts") + " (" + Lang.get("noneSet") + ")\n";
|
||||||
} else {
|
} else {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("rewSetHeroesAmounts") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "2" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("rewSetHeroesAmounts") + "\n";
|
||||||
for (Double d : getClassAmounts(context)) {
|
for (Double d : getClassAmounts(context)) {
|
||||||
text += ChatColor.GRAY + " - " + ChatColor.AQUA + d + "\n";
|
text += ChatColor.GRAY + " - " + ChatColor.AQUA + d + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("clear") + "\n";
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "3" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("done");
|
+ Lang.get("clear") + "\n";
|
||||||
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + "4" + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ Lang.get("done");
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
@ -935,7 +999,8 @@ public class RewardsPrompt extends NumericPrompt {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Prompt acceptInput(ConversationContext cc, String input) {
|
public Prompt acceptInput(ConversationContext cc, String input) {
|
||||||
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false && input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false
|
||||||
|
&& input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
||||||
String[] arr = input.split(" ");
|
String[] arr = input.split(" ");
|
||||||
List<String> loots = new LinkedList<String>();
|
List<String> loots = new LinkedList<String>();
|
||||||
for (String s : arr) {
|
for (String s : arr) {
|
||||||
@ -977,7 +1042,8 @@ public class RewardsPrompt extends NumericPrompt {
|
|||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public Prompt acceptInput(ConversationContext context, String input) {
|
public Prompt acceptInput(ConversationContext context, String input) {
|
||||||
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false && input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false
|
||||||
|
&& input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
||||||
CustomReward found = null;
|
CustomReward found = null;
|
||||||
// Check if we have a custom reward with the specified name
|
// Check if we have a custom reward with the specified name
|
||||||
for (CustomReward cr : plugin.getCustomRewards()) {
|
for (CustomReward cr : plugin.getCustomRewards()) {
|
||||||
@ -999,7 +1065,8 @@ public class RewardsPrompt extends NumericPrompt {
|
|||||||
if (context.getSessionData(CK.REW_CUSTOM) != null) {
|
if (context.getSessionData(CK.REW_CUSTOM) != null) {
|
||||||
// The custom reward may already have been added, so let's check that
|
// The custom reward may already have been added, so let's check that
|
||||||
LinkedList<String> list = (LinkedList<String>) context.getSessionData(CK.REW_CUSTOM);
|
LinkedList<String> list = (LinkedList<String>) context.getSessionData(CK.REW_CUSTOM);
|
||||||
LinkedList<Map<String, Object>> datamapList = (LinkedList<Map<String, Object>>) context.getSessionData(CK.REW_CUSTOM_DATA);
|
LinkedList<Map<String, Object>> datamapList
|
||||||
|
= (LinkedList<Map<String, Object>>) context.getSessionData(CK.REW_CUSTOM_DATA);
|
||||||
if (list.contains(found.getName()) == false) {
|
if (list.contains(found.getName()) == false) {
|
||||||
// Hasn't been added yet, so let's do it
|
// Hasn't been added yet, so let's do it
|
||||||
list.add(found.getName());
|
list.add(found.getName());
|
||||||
@ -1046,7 +1113,8 @@ public class RewardsPrompt extends NumericPrompt {
|
|||||||
public String getPromptText(ConversationContext context) {
|
public String getPromptText(ConversationContext context) {
|
||||||
String text = ChatColor.AQUA + "- ";
|
String text = ChatColor.AQUA + "- ";
|
||||||
LinkedList<String> list = (LinkedList<String>) context.getSessionData(CK.REW_CUSTOM);
|
LinkedList<String> list = (LinkedList<String>) context.getSessionData(CK.REW_CUSTOM);
|
||||||
LinkedList<Map<String, Object>> datamapList = (LinkedList<Map<String, Object>>) context.getSessionData(CK.REW_CUSTOM_DATA);
|
LinkedList<Map<String, Object>> datamapList
|
||||||
|
= (LinkedList<Map<String, Object>>) context.getSessionData(CK.REW_CUSTOM_DATA);
|
||||||
String rewName = list.getLast();
|
String rewName = list.getLast();
|
||||||
Map<String, Object> datamap = datamapList.getLast();
|
Map<String, Object> datamap = datamapList.getLast();
|
||||||
text += rewName + " -\n";
|
text += rewName + " -\n";
|
||||||
@ -1057,7 +1125,8 @@ public class RewardsPrompt extends NumericPrompt {
|
|||||||
}
|
}
|
||||||
Collections.sort(datamapKeys);
|
Collections.sort(datamapKeys);
|
||||||
for (String dataKey : datamapKeys) {
|
for (String dataKey : datamapKeys) {
|
||||||
text += ChatColor.BLUE + "" + ChatColor.BOLD + index + ChatColor.RESET + ChatColor.YELLOW + " - " + dataKey;
|
text += ChatColor.BLUE + "" + ChatColor.BOLD + index + ChatColor.RESET + ChatColor.YELLOW + " - "
|
||||||
|
+ dataKey;
|
||||||
if (datamap.get(dataKey) != null) {
|
if (datamap.get(dataKey) != null) {
|
||||||
text += ChatColor.GREEN + " (" + datamap.get(dataKey).toString() + ")\n";
|
text += ChatColor.GREEN + " (" + datamap.get(dataKey).toString() + ")\n";
|
||||||
} else {
|
} else {
|
||||||
@ -1072,7 +1141,8 @@ public class RewardsPrompt extends NumericPrompt {
|
|||||||
@Override
|
@Override
|
||||||
public Prompt acceptInput(ConversationContext context, String input) {
|
public Prompt acceptInput(ConversationContext context, String input) {
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
LinkedList<Map<String, Object>> datamapList = (LinkedList<Map<String, Object>>) context.getSessionData(CK.REW_CUSTOM_DATA);
|
LinkedList<Map<String, Object>> datamapList
|
||||||
|
= (LinkedList<Map<String, Object>>) context.getSessionData(CK.REW_CUSTOM_DATA);
|
||||||
Map<String, Object> datamap = datamapList.getLast();
|
Map<String, Object> datamap = datamapList.getLast();
|
||||||
int numInput;
|
int numInput;
|
||||||
try {
|
try {
|
||||||
@ -1110,7 +1180,8 @@ public class RewardsPrompt extends NumericPrompt {
|
|||||||
String text = "";
|
String text = "";
|
||||||
String temp = (String) context.getSessionData(CK.REW_CUSTOM_DATA_TEMP);
|
String temp = (String) context.getSessionData(CK.REW_CUSTOM_DATA_TEMP);
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
Map<String, String> descriptions = (Map<String, String>) context.getSessionData(CK.REW_CUSTOM_DATA_DESCRIPTIONS);
|
Map<String, String> descriptions
|
||||||
|
= (Map<String, String>) context.getSessionData(CK.REW_CUSTOM_DATA_DESCRIPTIONS);
|
||||||
if (descriptions.get(temp) != null) {
|
if (descriptions.get(temp) != null) {
|
||||||
text += ChatColor.GOLD + descriptions.get(temp) + "\n";
|
text += ChatColor.GOLD + descriptions.get(temp) + "\n";
|
||||||
}
|
}
|
||||||
@ -1123,7 +1194,8 @@ public class RewardsPrompt extends NumericPrompt {
|
|||||||
@Override
|
@Override
|
||||||
public Prompt acceptInput(ConversationContext context, String input) {
|
public Prompt acceptInput(ConversationContext context, String input) {
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
LinkedList<Map<String, Object>> datamapList = (LinkedList<Map<String, Object>>) context.getSessionData(CK.REW_CUSTOM_DATA);
|
LinkedList<Map<String, Object>> datamapList
|
||||||
|
= (LinkedList<Map<String, Object>>) context.getSessionData(CK.REW_CUSTOM_DATA);
|
||||||
Map<String, Object> datamap = datamapList.getLast();
|
Map<String, Object> datamap = datamapList.getLast();
|
||||||
datamap.put((String) context.getSessionData(CK.REW_CUSTOM_DATA_TEMP), input);
|
datamap.put((String) context.getSessionData(CK.REW_CUSTOM_DATA_TEMP), input);
|
||||||
context.setSessionData(CK.REW_CUSTOM_DATA_TEMP, null);
|
context.setSessionData(CK.REW_CUSTOM_DATA_TEMP, null);
|
||||||
|
@ -77,7 +77,8 @@ public class StagesPrompt extends NumericPrompt {
|
|||||||
|
|
||||||
String text = ChatColor.LIGHT_PURPLE + "- " + getTitle() + " -\n";
|
String text = ChatColor.LIGHT_PURPLE + "- " + getTitle() + " -\n";
|
||||||
for (int i = 1; i <= (getStages(context) + size); i++) {
|
for (int i = 1; i <= (getStages(context) + size); i++) {
|
||||||
text += getNumberColor(context, i) + "" + ChatColor.BOLD + i + ChatColor.RESET + " - " + getSelectionText(context, i) + "\n";
|
text += getNumberColor(context, i) + "" + ChatColor.BOLD + i + ChatColor.RESET + " - "
|
||||||
|
+ getSelectionText(context, i) + "\n";
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
@ -129,63 +130,92 @@ public class StagesPrompt extends NumericPrompt {
|
|||||||
newPref = "stage" + (current - 1);
|
newPref = "stage" + (current - 1);
|
||||||
context.setSessionData(newPref + CK.S_BREAK_NAMES, context.getSessionData(pref + CK.S_BREAK_NAMES));
|
context.setSessionData(newPref + CK.S_BREAK_NAMES, context.getSessionData(pref + CK.S_BREAK_NAMES));
|
||||||
context.setSessionData(newPref + CK.S_BREAK_AMOUNTS, context.getSessionData(pref + CK.S_BREAK_AMOUNTS));
|
context.setSessionData(newPref + CK.S_BREAK_AMOUNTS, context.getSessionData(pref + CK.S_BREAK_AMOUNTS));
|
||||||
context.setSessionData(newPref + CK.S_BREAK_DURABILITY, context.getSessionData(pref + CK.S_BREAK_DURABILITY));
|
context.setSessionData(newPref + CK.S_BREAK_DURABILITY, context.getSessionData(pref
|
||||||
|
+ CK.S_BREAK_DURABILITY));
|
||||||
context.setSessionData(newPref + CK.S_DAMAGE_NAMES, context.getSessionData(pref + CK.S_DAMAGE_NAMES));
|
context.setSessionData(newPref + CK.S_DAMAGE_NAMES, context.getSessionData(pref + CK.S_DAMAGE_NAMES));
|
||||||
context.setSessionData(newPref + CK.S_DAMAGE_AMOUNTS, context.getSessionData(pref + CK.S_DAMAGE_AMOUNTS));
|
context.setSessionData(newPref + CK.S_DAMAGE_AMOUNTS, context.getSessionData(pref
|
||||||
context.setSessionData(newPref + CK.S_DAMAGE_DURABILITY, context.getSessionData(pref + CK.S_DAMAGE_DURABILITY));
|
+ CK.S_DAMAGE_AMOUNTS));
|
||||||
|
context.setSessionData(newPref + CK.S_DAMAGE_DURABILITY, context.getSessionData(pref
|
||||||
|
+ CK.S_DAMAGE_DURABILITY));
|
||||||
context.setSessionData(newPref + CK.S_PLACE_NAMES, context.getSessionData(pref + CK.S_PLACE_NAMES));
|
context.setSessionData(newPref + CK.S_PLACE_NAMES, context.getSessionData(pref + CK.S_PLACE_NAMES));
|
||||||
context.setSessionData(newPref + CK.S_PLACE_NAMES, context.getSessionData(pref + CK.S_PLACE_AMOUNTS));
|
context.setSessionData(newPref + CK.S_PLACE_NAMES, context.getSessionData(pref + CK.S_PLACE_AMOUNTS));
|
||||||
context.setSessionData(newPref + CK.S_PLACE_DURABILITY, context.getSessionData(pref + CK.S_PLACE_DURABILITY));
|
context.setSessionData(newPref + CK.S_PLACE_DURABILITY, context.getSessionData(pref
|
||||||
|
+ CK.S_PLACE_DURABILITY));
|
||||||
context.setSessionData(newPref + CK.S_USE_NAMES, context.getSessionData(pref + CK.S_USE_NAMES));
|
context.setSessionData(newPref + CK.S_USE_NAMES, context.getSessionData(pref + CK.S_USE_NAMES));
|
||||||
context.setSessionData(newPref + CK.S_USE_AMOUNTS, context.getSessionData(pref + CK.S_USE_AMOUNTS));
|
context.setSessionData(newPref + CK.S_USE_AMOUNTS, context.getSessionData(pref + CK.S_USE_AMOUNTS));
|
||||||
context.setSessionData(newPref + CK.S_USE_DURABILITY, context.getSessionData(pref + CK.S_USE_DURABILITY));
|
context.setSessionData(newPref + CK.S_USE_DURABILITY, context.getSessionData(pref
|
||||||
|
+ CK.S_USE_DURABILITY));
|
||||||
context.setSessionData(newPref + CK.S_CUT_NAMES, context.getSessionData(pref + CK.S_CUT_NAMES));
|
context.setSessionData(newPref + CK.S_CUT_NAMES, context.getSessionData(pref + CK.S_CUT_NAMES));
|
||||||
context.setSessionData(newPref + CK.S_CUT_AMOUNTS, context.getSessionData(pref + CK.S_CUT_AMOUNTS));
|
context.setSessionData(newPref + CK.S_CUT_AMOUNTS, context.getSessionData(pref + CK.S_CUT_AMOUNTS));
|
||||||
context.setSessionData(newPref + CK.S_CUT_DURABILITY, context.getSessionData(pref + CK.S_CUT_DURABILITY));
|
context.setSessionData(newPref + CK.S_CUT_DURABILITY, context.getSessionData(pref
|
||||||
|
+ CK.S_CUT_DURABILITY));
|
||||||
context.setSessionData(newPref + CK.S_CRAFT_ITEMS, context.getSessionData(pref + CK.S_CRAFT_ITEMS));
|
context.setSessionData(newPref + CK.S_CRAFT_ITEMS, context.getSessionData(pref + CK.S_CRAFT_ITEMS));
|
||||||
context.setSessionData(newPref + CK.S_SMELT_ITEMS, context.getSessionData(pref + CK.S_SMELT_ITEMS));
|
context.setSessionData(newPref + CK.S_SMELT_ITEMS, context.getSessionData(pref + CK.S_SMELT_ITEMS));
|
||||||
context.setSessionData(newPref + CK.S_ENCHANT_TYPES, context.getSessionData(pref + CK.S_ENCHANT_TYPES));
|
context.setSessionData(newPref + CK.S_ENCHANT_TYPES, context.getSessionData(pref + CK.S_ENCHANT_TYPES));
|
||||||
context.setSessionData(newPref + CK.S_ENCHANT_NAMES, context.getSessionData(pref + CK.S_ENCHANT_NAMES));
|
context.setSessionData(newPref + CK.S_ENCHANT_NAMES, context.getSessionData(pref + CK.S_ENCHANT_NAMES));
|
||||||
context.setSessionData(newPref + CK.S_ENCHANT_AMOUNTS, context.getSessionData(pref + CK.S_ENCHANT_AMOUNTS));
|
context.setSessionData(newPref + CK.S_ENCHANT_AMOUNTS, context.getSessionData(pref
|
||||||
|
+ CK.S_ENCHANT_AMOUNTS));
|
||||||
context.setSessionData(newPref + CK.S_BREW_ITEMS, context.getSessionData(pref + CK.S_BREW_ITEMS));
|
context.setSessionData(newPref + CK.S_BREW_ITEMS, context.getSessionData(pref + CK.S_BREW_ITEMS));
|
||||||
context.setSessionData(newPref + CK.S_FISH, context.getSessionData(pref + CK.S_FISH));
|
context.setSessionData(newPref + CK.S_FISH, context.getSessionData(pref + CK.S_FISH));
|
||||||
context.setSessionData(newPref + CK.S_PLAYER_KILL, context.getSessionData(pref + CK.S_PLAYER_KILL));
|
context.setSessionData(newPref + CK.S_PLAYER_KILL, context.getSessionData(pref + CK.S_PLAYER_KILL));
|
||||||
context.setSessionData(newPref + CK.S_DELIVERY_ITEMS, context.getSessionData(pref + CK.S_DELIVERY_ITEMS));
|
context.setSessionData(newPref + CK.S_DELIVERY_ITEMS, context.getSessionData(pref
|
||||||
|
+ CK.S_DELIVERY_ITEMS));
|
||||||
context.setSessionData(newPref + CK.S_DELIVERY_NPCS, context.getSessionData(pref + CK.S_DELIVERY_NPCS));
|
context.setSessionData(newPref + CK.S_DELIVERY_NPCS, context.getSessionData(pref + CK.S_DELIVERY_NPCS));
|
||||||
context.setSessionData(newPref + CK.S_DELIVERY_MESSAGES, context.getSessionData(pref + CK.S_DELIVERY_MESSAGES));
|
context.setSessionData(newPref + CK.S_DELIVERY_MESSAGES, context.getSessionData(pref
|
||||||
context.setSessionData(newPref + CK.S_NPCS_TO_TALK_TO, context.getSessionData(pref + CK.S_NPCS_TO_TALK_TO));
|
+ CK.S_DELIVERY_MESSAGES));
|
||||||
|
context.setSessionData(newPref + CK.S_NPCS_TO_TALK_TO, context.getSessionData(pref
|
||||||
|
+ CK.S_NPCS_TO_TALK_TO));
|
||||||
context.setSessionData(newPref + CK.S_NPCS_TO_KILL, context.getSessionData(pref + CK.S_NPCS_TO_KILL));
|
context.setSessionData(newPref + CK.S_NPCS_TO_KILL, context.getSessionData(pref + CK.S_NPCS_TO_KILL));
|
||||||
context.setSessionData(newPref + CK.S_NPCS_TO_KILL_AMOUNTS, context.getSessionData(pref + CK.S_NPCS_TO_KILL_AMOUNTS));
|
context.setSessionData(newPref + CK.S_NPCS_TO_KILL_AMOUNTS, context.getSessionData(pref
|
||||||
|
+ CK.S_NPCS_TO_KILL_AMOUNTS));
|
||||||
context.setSessionData(newPref + CK.S_MOB_TYPES, context.getSessionData(pref + CK.S_MOB_TYPES));
|
context.setSessionData(newPref + CK.S_MOB_TYPES, context.getSessionData(pref + CK.S_MOB_TYPES));
|
||||||
context.setSessionData(newPref + CK.S_MOB_AMOUNTS, context.getSessionData(pref + CK.S_MOB_AMOUNTS));
|
context.setSessionData(newPref + CK.S_MOB_AMOUNTS, context.getSessionData(pref + CK.S_MOB_AMOUNTS));
|
||||||
context.setSessionData(newPref + CK.S_MOB_KILL_LOCATIONS, context.getSessionData(pref + CK.S_MOB_KILL_LOCATIONS));
|
context.setSessionData(newPref + CK.S_MOB_KILL_LOCATIONS, context.getSessionData(pref
|
||||||
context.setSessionData(newPref + CK.S_MOB_KILL_LOCATIONS_RADIUS, context.getSessionData(pref + CK.S_MOB_KILL_LOCATIONS_RADIUS));
|
+ CK.S_MOB_KILL_LOCATIONS));
|
||||||
context.setSessionData(newPref + CK.S_MOB_KILL_LOCATIONS_NAMES, context.getSessionData(pref + CK.S_MOB_KILL_LOCATIONS_NAMES));
|
context.setSessionData(newPref + CK.S_MOB_KILL_LOCATIONS_RADIUS, context.getSessionData(pref
|
||||||
context.setSessionData(newPref + CK.S_REACH_LOCATIONS, context.getSessionData(pref + CK.S_REACH_LOCATIONS));
|
+ CK.S_MOB_KILL_LOCATIONS_RADIUS));
|
||||||
context.setSessionData(newPref + CK.S_REACH_LOCATIONS_RADIUS, context.getSessionData(pref + CK.S_REACH_LOCATIONS_RADIUS));
|
context.setSessionData(newPref + CK.S_MOB_KILL_LOCATIONS_NAMES, context.getSessionData(pref
|
||||||
context.setSessionData(newPref + CK.S_REACH_LOCATIONS_NAMES, context.getSessionData(pref + CK.S_REACH_LOCATIONS_NAMES));
|
+ CK.S_MOB_KILL_LOCATIONS_NAMES));
|
||||||
|
context.setSessionData(newPref + CK.S_REACH_LOCATIONS, context.getSessionData(pref
|
||||||
|
+ CK.S_REACH_LOCATIONS));
|
||||||
|
context.setSessionData(newPref + CK.S_REACH_LOCATIONS_RADIUS, context.getSessionData(pref
|
||||||
|
+ CK.S_REACH_LOCATIONS_RADIUS));
|
||||||
|
context.setSessionData(newPref + CK.S_REACH_LOCATIONS_NAMES, context.getSessionData(pref
|
||||||
|
+ CK.S_REACH_LOCATIONS_NAMES));
|
||||||
context.setSessionData(newPref + CK.S_TAME_TYPES, context.getSessionData(pref + CK.S_TAME_TYPES));
|
context.setSessionData(newPref + CK.S_TAME_TYPES, context.getSessionData(pref + CK.S_TAME_TYPES));
|
||||||
context.setSessionData(newPref + CK.S_TAME_AMOUNTS, context.getSessionData(pref + CK.S_TAME_AMOUNTS));
|
context.setSessionData(newPref + CK.S_TAME_AMOUNTS, context.getSessionData(pref + CK.S_TAME_AMOUNTS));
|
||||||
context.setSessionData(newPref + CK.S_SHEAR_COLORS, context.getSessionData(pref + CK.S_SHEAR_COLORS));
|
context.setSessionData(newPref + CK.S_SHEAR_COLORS, context.getSessionData(pref + CK.S_SHEAR_COLORS));
|
||||||
context.setSessionData(newPref + CK.S_SHEAR_AMOUNTS, context.getSessionData(pref + CK.S_SHEAR_AMOUNTS));
|
context.setSessionData(newPref + CK.S_SHEAR_AMOUNTS, context.getSessionData(pref + CK.S_SHEAR_AMOUNTS));
|
||||||
context.setSessionData(newPref + CK.S_START_EVENT, context.getSessionData(pref + CK.S_START_EVENT));
|
context.setSessionData(newPref + CK.S_START_EVENT, context.getSessionData(pref + CK.S_START_EVENT));
|
||||||
context.setSessionData(newPref + CK.S_DISCONNECT_EVENT, context.getSessionData(pref + CK.S_DISCONNECT_EVENT));
|
context.setSessionData(newPref + CK.S_DISCONNECT_EVENT, context.getSessionData(pref
|
||||||
|
+ CK.S_DISCONNECT_EVENT));
|
||||||
context.setSessionData(newPref + CK.S_DEATH_EVENT, context.getSessionData(pref + CK.S_DEATH_EVENT));
|
context.setSessionData(newPref + CK.S_DEATH_EVENT, context.getSessionData(pref + CK.S_DEATH_EVENT));
|
||||||
context.setSessionData(newPref + CK.S_CHAT_EVENTS, context.getSessionData(pref + CK.S_CHAT_EVENTS));
|
context.setSessionData(newPref + CK.S_CHAT_EVENTS, context.getSessionData(pref + CK.S_CHAT_EVENTS));
|
||||||
context.setSessionData(newPref + CK.S_CHAT_EVENT_TRIGGERS, context.getSessionData(pref + CK.S_CHAT_EVENT_TRIGGERS));
|
context.setSessionData(newPref + CK.S_CHAT_EVENT_TRIGGERS, context.getSessionData(pref
|
||||||
|
+ CK.S_CHAT_EVENT_TRIGGERS));
|
||||||
context.setSessionData(newPref + CK.S_FINISH_EVENT, context.getSessionData(pref + CK.S_FINISH_EVENT));
|
context.setSessionData(newPref + CK.S_FINISH_EVENT, context.getSessionData(pref + CK.S_FINISH_EVENT));
|
||||||
context.setSessionData(newPref + CK.S_CUSTOM_OBJECTIVES, context.getSessionData(pref + CK.S_CUSTOM_OBJECTIVES));
|
context.setSessionData(newPref + CK.S_CUSTOM_OBJECTIVES, context.getSessionData(pref
|
||||||
context.setSessionData(newPref + CK.S_CUSTOM_OBJECTIVES_DATA, context.getSessionData(pref + CK.S_CUSTOM_OBJECTIVES_DATA));
|
+ CK.S_CUSTOM_OBJECTIVES));
|
||||||
context.setSessionData(newPref + CK.S_CUSTOM_OBJECTIVES_COUNT, context.getSessionData(pref + CK.S_CUSTOM_OBJECTIVES_COUNT));
|
context.setSessionData(newPref + CK.S_CUSTOM_OBJECTIVES_DATA, context.getSessionData(pref
|
||||||
context.setSessionData(newPref + CK.S_CUSTOM_OBJECTIVES_DATA_DESCRIPTIONS, context.getSessionData(pref + CK.S_CUSTOM_OBJECTIVES_DATA_DESCRIPTIONS));
|
+ CK.S_CUSTOM_OBJECTIVES_DATA));
|
||||||
context.setSessionData(newPref + CK.S_CUSTOM_OBJECTIVES_DATA_TEMP, context.getSessionData(pref + CK.S_CUSTOM_OBJECTIVES_DATA_TEMP));
|
context.setSessionData(newPref + CK.S_CUSTOM_OBJECTIVES_COUNT, context.getSessionData(pref
|
||||||
context.setSessionData(newPref + CK.S_PASSWORD_DISPLAYS, context.getSessionData(pref + CK.S_PASSWORD_DISPLAYS));
|
+ CK.S_CUSTOM_OBJECTIVES_COUNT));
|
||||||
context.setSessionData(newPref + CK.S_PASSWORD_PHRASES, context.getSessionData(pref + CK.S_PASSWORD_PHRASES));
|
context.setSessionData(newPref + CK.S_CUSTOM_OBJECTIVES_DATA_DESCRIPTIONS, context.getSessionData(pref
|
||||||
context.setSessionData(newPref + CK.S_OVERRIDE_DISPLAY, context.getSessionData(pref + CK.S_OVERRIDE_DISPLAY));
|
+ CK.S_CUSTOM_OBJECTIVES_DATA_DESCRIPTIONS));
|
||||||
|
context.setSessionData(newPref + CK.S_CUSTOM_OBJECTIVES_DATA_TEMP, context.getSessionData(pref
|
||||||
|
+ CK.S_CUSTOM_OBJECTIVES_DATA_TEMP));
|
||||||
|
context.setSessionData(newPref + CK.S_PASSWORD_DISPLAYS, context.getSessionData(pref
|
||||||
|
+ CK.S_PASSWORD_DISPLAYS));
|
||||||
|
context.setSessionData(newPref + CK.S_PASSWORD_PHRASES, context.getSessionData(pref
|
||||||
|
+ CK.S_PASSWORD_PHRASES));
|
||||||
|
context.setSessionData(newPref + CK.S_OVERRIDE_DISPLAY, context.getSessionData(pref
|
||||||
|
+ CK.S_OVERRIDE_DISPLAY));
|
||||||
context.setSessionData(newPref + CK.S_DELAY, context.getSessionData(pref + CK.S_DELAY));
|
context.setSessionData(newPref + CK.S_DELAY, context.getSessionData(pref + CK.S_DELAY));
|
||||||
context.setSessionData(newPref + CK.S_DELAY_MESSAGE, context.getSessionData(pref + CK.S_DELAY_MESSAGE));
|
context.setSessionData(newPref + CK.S_DELAY_MESSAGE, context.getSessionData(pref
|
||||||
|
+ CK.S_DELAY_MESSAGE));
|
||||||
context.setSessionData(newPref + CK.S_DENIZEN, context.getSessionData(pref + CK.S_DENIZEN));
|
context.setSessionData(newPref + CK.S_DENIZEN, context.getSessionData(pref + CK.S_DENIZEN));
|
||||||
context.setSessionData(newPref + CK.S_COMPLETE_MESSAGE, context.getSessionData(pref + CK.S_COMPLETE_MESSAGE));
|
context.setSessionData(newPref + CK.S_COMPLETE_MESSAGE, context.getSessionData(pref
|
||||||
|
+ CK.S_COMPLETE_MESSAGE));
|
||||||
context.setSessionData(newPref + CK.S_START_MESSAGE, context.getSessionData(pref + CK.S_START_MESSAGE));
|
context.setSessionData(newPref + CK.S_START_MESSAGE, context.getSessionData(pref + CK.S_START_MESSAGE));
|
||||||
}
|
}
|
||||||
context.setSessionData(pref + CK.S_BREAK_NAMES, null);
|
context.setSessionData(pref + CK.S_BREAK_NAMES, null);
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*******************************************************************************************************/
|
*******************************************************************************************************/
|
||||||
|
|
||||||
package me.blackvein.quests.timers;
|
package me.blackvein.quests.tasks;
|
||||||
|
|
||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
|
|
||||||
@ -39,7 +39,8 @@ public class ActionTimer extends BukkitRunnable {
|
|||||||
quest.failQuest(quester);
|
quest.failQuest(quester);
|
||||||
quester.updateJournal();
|
quester.updateJournal();
|
||||||
} else {
|
} else {
|
||||||
quester.getPlayer().sendMessage(Lang.get(quester.getPlayer(), "timerMessage").replace("<time>", String.valueOf(time)));
|
quester.getPlayer().sendMessage(Lang.get(quester.getPlayer(), "timerMessage")
|
||||||
|
.replace("<time>", String.valueOf(time)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -10,7 +10,7 @@
|
|||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*******************************************************************************************************/
|
*******************************************************************************************************/
|
||||||
|
|
||||||
package me.blackvein.quests;
|
package me.blackvein.quests.tasks;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -18,6 +18,8 @@ import org.bukkit.Location;
|
|||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import me.blackvein.quests.Quester;
|
||||||
|
import me.blackvein.quests.Quests;
|
||||||
import me.blackvein.quests.particle.ParticleProvider;
|
import me.blackvein.quests.particle.ParticleProvider;
|
||||||
import net.citizensnpcs.api.npc.NPC;
|
import net.citizensnpcs.api.npc.NPC;
|
||||||
|
|
||||||
@ -53,14 +55,16 @@ public class NpcEffectThread implements Runnable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Display a particle effect above an NPC one time
|
* Display a particle effect above a Citizens NPC one time
|
||||||
* @param player Target player to let view the effect
|
* @param player Target player to let view the effect
|
||||||
* @param npc Target NPC to place the effect above
|
* @param npc Target NPC to place the effect above
|
||||||
* @param effectType Value of EnumParticle such as NOTE or SMOKE
|
* @param effectType Value of EnumParticle such as NOTE or SMOKE
|
||||||
*/
|
*/
|
||||||
public void showEffect(Player player, NPC npc, String effectType) {
|
public void showEffect(Player player, NPC npc, String effectType) {
|
||||||
|
if (plugin.getDependencies().getCitizens() != null) {
|
||||||
Location eyeLoc = npc.getEntity().getLocation();
|
Location eyeLoc = npc.getEntity().getLocation();
|
||||||
eyeLoc.setY(eyeLoc.getY() + 1.5);
|
eyeLoc.setY(eyeLoc.getY() + 1.5);
|
||||||
ParticleProvider.sendToPlayer(player, eyeLoc, effectType);
|
ParticleProvider.sendToPlayer(player, eyeLoc, effectType);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
package me.blackvein.quests.tasks;
|
||||||
|
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import me.blackvein.quests.Quests;
|
||||||
|
import net.citizensnpcs.api.CitizensAPI;
|
||||||
|
|
||||||
|
public class PlayerMoveThread implements Runnable {
|
||||||
|
|
||||||
|
final Quests plugin;
|
||||||
|
|
||||||
|
public PlayerMoveThread(Quests quests) {
|
||||||
|
plugin = quests;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
for (Player player : plugin.getServer().getOnlinePlayers()) {
|
||||||
|
if (plugin.getDependencies().getCitizens() != null) {
|
||||||
|
if (CitizensAPI.getNPCRegistry().isNPC(player)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
plugin.getPlayerListener().playerMove(player.getUniqueId(), player.getLocation());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -10,7 +10,7 @@
|
|||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*******************************************************************************************************/
|
*******************************************************************************************************/
|
||||||
|
|
||||||
package me.blackvein.quests.timers;
|
package me.blackvein.quests.tasks;
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@ -20,6 +20,7 @@ import me.blackvein.quests.Quester;
|
|||||||
import me.blackvein.quests.Quests;
|
import me.blackvein.quests.Quests;
|
||||||
import me.blackvein.quests.Stage;
|
import me.blackvein.quests.Stage;
|
||||||
import me.blackvein.quests.actions.Action;
|
import me.blackvein.quests.actions.Action;
|
||||||
|
import me.blackvein.quests.util.ConfigUtil;
|
||||||
import me.blackvein.quests.util.Lang;
|
import me.blackvein.quests.util.Lang;
|
||||||
|
|
||||||
public class StageTimer implements Runnable {
|
public class StageTimer implements Runnable {
|
||||||
@ -78,7 +79,8 @@ public class StageTimer implements Runnable {
|
|||||||
plugin.showObjectives(quest, quester, false);
|
plugin.showObjectives(quest, quester, false);
|
||||||
String stageStartMessage = quester.getCurrentStage(quest).getStartMessage();
|
String stageStartMessage = quester.getCurrentStage(quest).getStartMessage();
|
||||||
if (stageStartMessage != null) {
|
if (stageStartMessage != null) {
|
||||||
quester.getPlayer().sendMessage(Quests.parseStringWithPossibleLineBreaks(stageStartMessage, quest));
|
quester.getPlayer().sendMessage(ConfigUtil
|
||||||
|
.parseStringWithPossibleLineBreaks(stageStartMessage, quest));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (quester.getQuestData(quest) != null) {
|
if (quester.getQuestData(quest) != null) {
|
193
main/src/main/java/me/blackvein/quests/util/ConfigUtil.java
Normal file
193
main/src/main/java/me/blackvein/quests/util/ConfigUtil.java
Normal file
@ -0,0 +1,193 @@
|
|||||||
|
/*******************************************************************************************************
|
||||||
|
|
||||||
|
* Continued by PikaMug (formerly HappyPikachu) with permission from _Blackvein_. All rights reserved.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||||
|
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
|
||||||
|
* NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||||
|
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*******************************************************************************************************/
|
||||||
|
|
||||||
|
package me.blackvein.quests.util;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
|
import org.bukkit.ChatColor;
|
||||||
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import me.blackvein.quests.Dependencies;
|
||||||
|
import me.blackvein.quests.Quest;
|
||||||
|
import me.clip.placeholderapi.PlaceholderAPI;
|
||||||
|
import net.citizensnpcs.api.npc.NPC;
|
||||||
|
|
||||||
|
public class ConfigUtil {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks whether items in a list are instances of a class<p>
|
||||||
|
*
|
||||||
|
* Does NOT check whether list objects are null
|
||||||
|
*
|
||||||
|
* @param list The list to check objects of
|
||||||
|
* @param clazz The class to compare against
|
||||||
|
* @return false if list is null or list object does not match
|
||||||
|
*/
|
||||||
|
public static boolean checkList(List<?> list, Class<?> clazz) {
|
||||||
|
if (list == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
for (Object o : list) {
|
||||||
|
if (clazz.isAssignableFrom(o.getClass()) == false) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Location getLocation(String arg) {
|
||||||
|
String[] info = arg.split(" ");
|
||||||
|
|
||||||
|
if (info.length < 4) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
int index = 0;
|
||||||
|
int xIndex = info.length -3;
|
||||||
|
int yIndex = info.length -2;
|
||||||
|
int zIndex = info.length -1;
|
||||||
|
|
||||||
|
while (index < xIndex) {
|
||||||
|
String s = info[index];
|
||||||
|
if (index == 0) {
|
||||||
|
sb.append(s);
|
||||||
|
} else {
|
||||||
|
sb.append(" " + s);
|
||||||
|
}
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
|
||||||
|
String world = sb.toString();
|
||||||
|
|
||||||
|
double x;
|
||||||
|
double y;
|
||||||
|
double z;
|
||||||
|
try {
|
||||||
|
x = Double.parseDouble(info[xIndex]);
|
||||||
|
y = Double.parseDouble(info[yIndex]);
|
||||||
|
z = Double.parseDouble(info[zIndex]);
|
||||||
|
} catch (Exception e) {
|
||||||
|
Bukkit.getLogger().severe("Please inform Quests developer location was wrong for "
|
||||||
|
+ world + " " + info[xIndex] + " " + info[yIndex] + " " + info[zIndex] + " ");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
if (Bukkit.getServer().getWorld(world) == null) {
|
||||||
|
Bukkit.getLogger().severe("Quests could not locate world " + world + ", is it loaded?");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
Location finalLocation = new Location(Bukkit.getServer().getWorld(world), x, y, z);
|
||||||
|
return finalLocation;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getLocationInfo(Location loc) {
|
||||||
|
return loc.getWorld().getName() + " " + loc.getX() + " " + loc.getY() + " " + loc.getZ();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String[] parseStringWithPossibleLineBreaks(String s, Quest quest, Player player) {
|
||||||
|
String parsed = parseString(s);
|
||||||
|
if (parsed.contains("<npc>")) {
|
||||||
|
if (quest.getNpcStart() != null) {
|
||||||
|
parsed = parsed.replace("<npc>", quest.getNpcStart().getName());
|
||||||
|
} else {
|
||||||
|
Bukkit.getLogger().warning(quest.getName() + " quest uses <npc> tag but doesn't have an NPC start set");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (Dependencies.placeholder != null && player != null) {
|
||||||
|
parsed = PlaceholderAPI.setPlaceholders(player, parsed);
|
||||||
|
}
|
||||||
|
return parsed.split("\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String[] parseStringWithPossibleLineBreaks(String s, Quest quest) {
|
||||||
|
String parsed = parseString(s);
|
||||||
|
if (parsed.contains("<npc>")) {
|
||||||
|
if (quest.getNpcStart() != null) {
|
||||||
|
parsed = parsed.replace("<npc>", quest.getNpcStart().getName());
|
||||||
|
} else {
|
||||||
|
Bukkit.getLogger().warning(quest.getName() + " quest uses <npc> tag but doesn't have an NPC start set");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return parsed.split("\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String[] parseStringWithPossibleLineBreaks(String s, NPC npc) {
|
||||||
|
String parsed = parseString(s);
|
||||||
|
if (parsed.contains("<npc>")) {
|
||||||
|
parsed = parsed.replace("<npc>", npc.getName());
|
||||||
|
}
|
||||||
|
return parsed.split("\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String parseString(String s, Quest quest) {
|
||||||
|
String parsed = parseString(s);
|
||||||
|
if (parsed.contains("<npc>")) {
|
||||||
|
if (quest.getNpcStart() != null) {
|
||||||
|
parsed = parsed.replace("<npc>", quest.getNpcStart().getName());
|
||||||
|
} else {
|
||||||
|
Bukkit.getLogger().warning(quest.getName() + " quest uses <npc> tag but doesn't have an NPC start set");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return parsed;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String parseString(String s, Quest quest, Player player) {
|
||||||
|
String parsed = parseString(s, quest);
|
||||||
|
if (Dependencies.placeholder != null && player != null) {
|
||||||
|
parsed = PlaceholderAPI.setPlaceholders(player, parsed);
|
||||||
|
}
|
||||||
|
return parsed;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String parseString(String s, NPC npc) {
|
||||||
|
String parsed = parseString(s);
|
||||||
|
if (parsed.contains("<npc>")) {
|
||||||
|
parsed = parsed.replace("<npc>", npc.getName());
|
||||||
|
}
|
||||||
|
return parsed;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String parseString(String s) {
|
||||||
|
String parsed = s;
|
||||||
|
parsed = parsed.replace("<black>", ChatColor.BLACK.toString());
|
||||||
|
parsed = parsed.replace("<darkblue>", ChatColor.DARK_BLUE.toString());
|
||||||
|
parsed = parsed.replace("<darkgreen>", ChatColor.DARK_GREEN.toString());
|
||||||
|
parsed = parsed.replace("<darkaqua>", ChatColor.DARK_AQUA.toString());
|
||||||
|
parsed = parsed.replace("<darkred>", ChatColor.DARK_RED.toString());
|
||||||
|
parsed = parsed.replace("<purple>", ChatColor.DARK_PURPLE.toString());
|
||||||
|
parsed = parsed.replace("<gold>", ChatColor.GOLD.toString());
|
||||||
|
parsed = parsed.replace("<grey>", ChatColor.GRAY.toString());
|
||||||
|
parsed = parsed.replace("<gray>", ChatColor.GRAY.toString());
|
||||||
|
parsed = parsed.replace("<darkgrey>", ChatColor.DARK_GRAY.toString());
|
||||||
|
parsed = parsed.replace("<darkgray>", ChatColor.DARK_GRAY.toString());
|
||||||
|
parsed = parsed.replace("<blue>", ChatColor.BLUE.toString());
|
||||||
|
parsed = parsed.replace("<green>", ChatColor.GREEN.toString());
|
||||||
|
parsed = parsed.replace("<aqua>", ChatColor.AQUA.toString());
|
||||||
|
parsed = parsed.replace("<red>", ChatColor.RED.toString());
|
||||||
|
parsed = parsed.replace("<pink>", ChatColor.LIGHT_PURPLE.toString());
|
||||||
|
parsed = parsed.replace("<yellow>", ChatColor.YELLOW.toString());
|
||||||
|
parsed = parsed.replace("<white>", ChatColor.WHITE.toString());
|
||||||
|
parsed = parsed.replace("<random>", ChatColor.MAGIC.toString());
|
||||||
|
parsed = parsed.replace("<italic>", ChatColor.ITALIC.toString());
|
||||||
|
parsed = parsed.replace("<bold>", ChatColor.BOLD.toString());
|
||||||
|
parsed = parsed.replace("<underline>", ChatColor.UNDERLINE.toString());
|
||||||
|
parsed = parsed.replace("<strike>", ChatColor.STRIKETHROUGH.toString());
|
||||||
|
parsed = parsed.replace("<reset>", ChatColor.RESET.toString());
|
||||||
|
parsed = parsed.replace("<br>", "\n");
|
||||||
|
parsed = ChatColor.translateAlternateColorCodes('&', parsed);
|
||||||
|
return parsed;
|
||||||
|
}
|
||||||
|
}
|
@ -56,7 +56,8 @@ public class DenizenAPI {
|
|||||||
denizen = Class.forName("net.aufdemrand.denizen.Denizen");
|
denizen = Class.forName("net.aufdemrand.denizen.Denizen");
|
||||||
scriptRegistry = Class.forName("net.aufdemrand.denizencore.scripts.ScriptRegistry");
|
scriptRegistry = Class.forName("net.aufdemrand.denizencore.scripts.ScriptRegistry");
|
||||||
scriptContainer = Class.forName("net.aufdemrand.denizencore.scripts.containers.ScriptContainer");
|
scriptContainer = Class.forName("net.aufdemrand.denizencore.scripts.containers.ScriptContainer");
|
||||||
taskScriptContainer = Class.forName("net.aufdemrand.denizencore.scripts.containers.core.TaskScriptContainer");
|
taskScriptContainer
|
||||||
|
= Class.forName("net.aufdemrand.denizencore.scripts.containers.core.TaskScriptContainer");
|
||||||
dPlayer = Class.forName("net.aufdemrand.denizen.objects.dPlayer");
|
dPlayer = Class.forName("net.aufdemrand.denizen.objects.dPlayer");
|
||||||
dNPC = Class.forName("net.aufdemrand.denizen.objects.dNPC");
|
dNPC = Class.forName("net.aufdemrand.denizen.objects.dNPC");
|
||||||
scriptEntryData = Class.forName("net.aufdemrand.denizencore.scripts.ScriptEntryData");
|
scriptEntryData = Class.forName("net.aufdemrand.denizencore.scripts.ScriptEntryData");
|
||||||
@ -78,11 +79,13 @@ public class DenizenAPI {
|
|||||||
try {
|
try {
|
||||||
containsScriptMethod = scriptRegistry.getMethod("containsScript", String.class);
|
containsScriptMethod = scriptRegistry.getMethod("containsScript", String.class);
|
||||||
getScriptNamesMethod = scriptRegistry.getMethod("_getScriptNames");
|
getScriptNamesMethod = scriptRegistry.getMethod("_getScriptNames");
|
||||||
getScriptContainerAsMethod = scriptRegistry.getMethod("getScriptContainerAs", String.class, taskScriptContainer.getClass());
|
getScriptContainerAsMethod = scriptRegistry
|
||||||
|
.getMethod("getScriptContainerAs", String.class, taskScriptContainer.getClass());
|
||||||
mirrorBukkitPlayerMethod = dPlayer.getMethod("mirrorBukkitPlayer", OfflinePlayer.class);
|
mirrorBukkitPlayerMethod = dPlayer.getMethod("mirrorBukkitPlayer", OfflinePlayer.class);
|
||||||
mirrorCitizensNPCMethod = dNPC.getMethod("mirrorCitizensNPC", NPC.class);
|
mirrorCitizensNPCMethod = dNPC.getMethod("mirrorCitizensNPC", NPC.class);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Bukkit.getLogger().log(Level.WARNING, "Quests failed to bind to Denizen, integration will not work!", e);
|
Bukkit.getLogger().log(Level.WARNING,
|
||||||
|
"Quests failed to bind to Denizen, integration will not work!", e);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -103,7 +106,8 @@ public class DenizenAPI {
|
|||||||
try {
|
try {
|
||||||
script = (boolean)containsScriptMethod.invoke(scriptRegistry, input);
|
script = (boolean)containsScriptMethod.invoke(scriptRegistry, input);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Bukkit.getLogger().log(Level.WARNING, "Quests encountered an error invoking Denizen ScriptRegistry#containsScript", e);
|
Bukkit.getLogger().log(Level.WARNING,
|
||||||
|
"Quests encountered an error invoking Denizen ScriptRegistry#containsScript", e);
|
||||||
}
|
}
|
||||||
return script;
|
return script;
|
||||||
}
|
}
|
||||||
@ -123,7 +127,8 @@ public class DenizenAPI {
|
|||||||
instance = constructor.newInstance(null, input);
|
instance = constructor.newInstance(null, input);
|
||||||
name = (String)instance.getClass().getMethod("getName").invoke(scriptContainer);
|
name = (String)instance.getClass().getMethod("getName").invoke(scriptContainer);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Bukkit.getLogger().log(Level.WARNING, "Quests encountered an error invoking Denizen ScriptContainer#getName", e);
|
Bukkit.getLogger().log(Level.WARNING,
|
||||||
|
"Quests encountered an error invoking Denizen ScriptContainer#getName", e);
|
||||||
}
|
}
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
@ -141,7 +146,8 @@ public class DenizenAPI {
|
|||||||
try {
|
try {
|
||||||
names = (Set<String>)getScriptNamesMethod.invoke(scriptRegistry);
|
names = (Set<String>)getScriptNamesMethod.invoke(scriptRegistry);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Bukkit.getLogger().log(Level.WARNING, "Quests encountered an error invoking Denizen ScriptRegistry#_getScriptNames", e);
|
Bukkit.getLogger().log(Level.WARNING,
|
||||||
|
"Quests encountered an error invoking Denizen ScriptRegistry#_getScriptNames", e);
|
||||||
}
|
}
|
||||||
return names;
|
return names;
|
||||||
}
|
}
|
||||||
@ -158,7 +164,8 @@ public class DenizenAPI {
|
|||||||
try {
|
try {
|
||||||
container = getScriptContainerAsMethod.invoke(scriptRegistry, scriptName, taskScriptContainer);
|
container = getScriptContainerAsMethod.invoke(scriptRegistry, scriptName, taskScriptContainer);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Bukkit.getLogger().log(Level.WARNING, "Quests encountered an error invoking Denizen #getScriptContainerAs", e);
|
Bukkit.getLogger().log(Level.WARNING,
|
||||||
|
"Quests encountered an error invoking Denizen #getScriptContainerAs", e);
|
||||||
}
|
}
|
||||||
return container;
|
return container;
|
||||||
}
|
}
|
||||||
@ -175,7 +182,8 @@ public class DenizenAPI {
|
|||||||
try {
|
try {
|
||||||
dp = mirrorBukkitPlayerMethod.invoke(dPlayer, player);
|
dp = mirrorBukkitPlayerMethod.invoke(dPlayer, player);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Bukkit.getLogger().log(Level.WARNING, "Quests encountered an error invoking Denizen dPlayer#mirrorBukkitPlayer", e);
|
Bukkit.getLogger().log(Level.WARNING,
|
||||||
|
"Quests encountered an error invoking Denizen dPlayer#mirrorBukkitPlayer", e);
|
||||||
}
|
}
|
||||||
return dp;
|
return dp;
|
||||||
}
|
}
|
||||||
@ -192,7 +200,8 @@ public class DenizenAPI {
|
|||||||
try {
|
try {
|
||||||
dp = mirrorCitizensNPCMethod.invoke(dNPC, npc);
|
dp = mirrorCitizensNPCMethod.invoke(dNPC, npc);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Bukkit.getLogger().log(Level.WARNING, "Quests encountered an error invoking Denizen dNPC#mirrorCitizensNPC", e);
|
Bukkit.getLogger().log(Level.WARNING,
|
||||||
|
"Quests encountered an error invoking Denizen dNPC#mirrorCitizensNPC", e);
|
||||||
}
|
}
|
||||||
return dp;
|
return dp;
|
||||||
}
|
}
|
||||||
@ -211,7 +220,8 @@ public class DenizenAPI {
|
|||||||
Method runTaskScript = tsc.getClass().getMethod("runTaskScript", scriptEntryData, Map.class);
|
Method runTaskScript = tsc.getClass().getMethod("runTaskScript", scriptEntryData, Map.class);
|
||||||
runTaskScript.invoke(tsc, constructor.newInstance(mirrorBukkitPlayer(player), null), null);
|
runTaskScript.invoke(tsc, constructor.newInstance(mirrorBukkitPlayer(player), null), null);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Bukkit.getLogger().log(Level.WARNING, "Quests encountered an error invoking Denizen TaskScriptContainer#runTaskScript", e);
|
Bukkit.getLogger().log(Level.WARNING,
|
||||||
|
"Quests encountered an error invoking Denizen TaskScriptContainer#runTaskScript", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,8 @@ import com.denizenscript.denizencore.scripts.containers.core.TaskScriptContainer
|
|||||||
import net.citizensnpcs.api.npc.NPC;
|
import net.citizensnpcs.api.npc.NPC;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class's imports must exist separately from DenizenAPI.java in order to not crash from NoClassDefFoundError at runtime
|
* This class's imports must exist separately from DenizenAPI.java in order to not crash from NoClassDefFoundError at
|
||||||
|
* runtime
|
||||||
*/
|
*/
|
||||||
public class DenizenAPI_1_1_0 {
|
public class DenizenAPI_1_1_0 {
|
||||||
|
|
||||||
|
@ -0,0 +1,87 @@
|
|||||||
|
/*******************************************************************************************************
|
||||||
|
* Continued by PikaMug (formerly HappyPikachu) with permission from _Blackvein_. All rights reserved.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||||
|
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
|
||||||
|
* NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||||
|
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*******************************************************************************************************/
|
||||||
|
|
||||||
|
package me.blackvein.quests.util;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.inventory.Inventory;
|
||||||
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
import org.bukkit.inventory.PlayerInventory;
|
||||||
|
|
||||||
|
public class InventoryUtil {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds item to player's inventory. If full, item is dropped at player's location.
|
||||||
|
*
|
||||||
|
* @throws NullPointerException when ItemStack is null
|
||||||
|
*/
|
||||||
|
public static void addItem(Player p, ItemStack i) throws Exception {
|
||||||
|
if (i == null) {
|
||||||
|
throw new NullPointerException("Null item while trying to add to inventory of " + p.getName());
|
||||||
|
}
|
||||||
|
PlayerInventory inv = p.getInventory();
|
||||||
|
if (i != null) {
|
||||||
|
HashMap<Integer, ItemStack> leftover = inv.addItem(i);
|
||||||
|
if (leftover != null) {
|
||||||
|
if (leftover.isEmpty() == false) {
|
||||||
|
for (ItemStack i2 : leftover.values()) {
|
||||||
|
p.getWorld().dropItem(p.getLocation(), i2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes item from player's inventory
|
||||||
|
*
|
||||||
|
* @param inventory Inventory to remove from
|
||||||
|
* @param is Item with amount to remove
|
||||||
|
* @return true if successful
|
||||||
|
*/
|
||||||
|
public static boolean removeItem(Inventory inventory, ItemStack is) {
|
||||||
|
int amount = is.getAmount();
|
||||||
|
HashMap<Integer, ? extends ItemStack> allItems = inventory.all(is.getType());
|
||||||
|
HashMap<Integer, Integer> removeFrom = new HashMap<Integer, Integer>();
|
||||||
|
int foundAmount = 0;
|
||||||
|
for (Map.Entry<Integer, ? extends ItemStack> item : allItems.entrySet()) {
|
||||||
|
if (ItemUtil.compareItems(is, item.getValue(), true) == 0) {
|
||||||
|
if (item.getValue().getAmount() >= amount - foundAmount) {
|
||||||
|
removeFrom.put(item.getKey(), amount - foundAmount);
|
||||||
|
foundAmount = amount;
|
||||||
|
} else {
|
||||||
|
foundAmount += item.getValue().getAmount();
|
||||||
|
removeFrom.put(item.getKey(), item.getValue().getAmount());
|
||||||
|
}
|
||||||
|
if (foundAmount >= amount) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (foundAmount == amount) {
|
||||||
|
for (Map.Entry<Integer, Integer> toRemove : removeFrom.entrySet()) {
|
||||||
|
ItemStack item = inventory.getItem(toRemove.getKey());
|
||||||
|
if (item.getAmount() - toRemove.getValue() <= 0) {
|
||||||
|
inventory.clear(toRemove.getKey());
|
||||||
|
} else {
|
||||||
|
item.setAmount(item.getAmount() - toRemove.getValue());
|
||||||
|
inventory.setItem(toRemove.getKey(), item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
@ -83,9 +83,12 @@ public class ItemUtil {
|
|||||||
return -4;
|
return -4;
|
||||||
} else if (one.getItemMeta().hasLore() == false && two.getItemMeta().hasLore()) {
|
} else if (one.getItemMeta().hasLore() == false && two.getItemMeta().hasLore()) {
|
||||||
return -4;
|
return -4;
|
||||||
} else if (one.getItemMeta().hasDisplayName() && two.getItemMeta().hasDisplayName() && ChatColor.stripColor(one.getItemMeta().getDisplayName()).equals(ChatColor.stripColor(two.getItemMeta().getDisplayName())) == false) {
|
} else if (one.getItemMeta().hasDisplayName() && two.getItemMeta().hasDisplayName()
|
||||||
|
&& ChatColor.stripColor(one.getItemMeta().getDisplayName())
|
||||||
|
.equals(ChatColor.stripColor(two.getItemMeta().getDisplayName())) == false) {
|
||||||
return -4;
|
return -4;
|
||||||
} else if (one.getItemMeta().hasLore() && two.getItemMeta().hasLore() && one.getItemMeta().getLore().equals(two.getItemMeta().getLore()) == false) {
|
} else if (one.getItemMeta().hasLore() && two.getItemMeta().hasLore()
|
||||||
|
&& one.getItemMeta().getLore().equals(two.getItemMeta().getLore()) == false) {
|
||||||
return -4;
|
return -4;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
@ -114,10 +117,12 @@ public class ItemUtil {
|
|||||||
if (one.getItemMeta() instanceof PotionMeta) {
|
if (one.getItemMeta() instanceof PotionMeta) {
|
||||||
if (Material.getMaterial("LINGERING_POTION") != null) {
|
if (Material.getMaterial("LINGERING_POTION") != null) {
|
||||||
// Bukkit version is 1.9+
|
// Bukkit version is 1.9+
|
||||||
if (one.getType().equals(Material.POTION) || one.getType().equals(Material.LINGERING_POTION) || one.getType().equals(Material.SPLASH_POTION)) {
|
if (one.getType().equals(Material.POTION) || one.getType().equals(Material.LINGERING_POTION)
|
||||||
|
|| one.getType().equals(Material.SPLASH_POTION)) {
|
||||||
PotionMeta pmeta1 = (PotionMeta) one.getItemMeta();
|
PotionMeta pmeta1 = (PotionMeta) one.getItemMeta();
|
||||||
PotionMeta pmeta2 = (PotionMeta) two.getItemMeta();
|
PotionMeta pmeta2 = (PotionMeta) two.getItemMeta();
|
||||||
if (pmeta1.getBasePotionData().getType().equals(pmeta2.getBasePotionData().getType()) == false) {
|
if (pmeta1.getBasePotionData().getType()
|
||||||
|
.equals(pmeta2.getBasePotionData().getType()) == false) {
|
||||||
return -9;
|
return -9;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -167,7 +172,8 @@ public class ItemUtil {
|
|||||||
return new ItemStack(Material.getMaterial(material.toUpperCase()), amount, durability);
|
return new ItemStack(Material.getMaterial(material.toUpperCase()), amount, durability);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
try {
|
try {
|
||||||
Bukkit.getLogger().warning(material + " is invalid! You may need to update your quests.yml or events.yml "
|
Bukkit.getLogger().warning(material
|
||||||
|
+ " is invalid! You may need to update your quests.yml or events.yml "
|
||||||
+ "in accordance with https://bit.ly/2BkBNNN");
|
+ "in accordance with https://bit.ly/2BkBNNN");
|
||||||
return new ItemStack(Material.matchMaterial(material, true), amount, durability);
|
return new ItemStack(Material.matchMaterial(material, true), amount, durability);
|
||||||
} catch (Exception e2) {
|
} catch (Exception e2) {
|
||||||
@ -181,7 +187,8 @@ public class ItemUtil {
|
|||||||
/**
|
/**
|
||||||
* Get ItemStack from formatted string. See serialize() for reverse function.
|
* Get ItemStack from formatted string. See serialize() for reverse function.
|
||||||
*
|
*
|
||||||
* <p>Supplied format = name-name:amount-amount:data-data:enchantment-enchantment level:displayname-displayname:lore-lore
|
* <p>Supplied format = name-name:amount-amount:data-data:enchantment-enchantment level:displayname-displayname
|
||||||
|
* :lore-lore
|
||||||
* <p>May continue with extraneous data such as :ItemFlags-flags:stored-enchants:{enc, level}:internal-hashstring
|
* <p>May continue with extraneous data such as :ItemFlags-flags:stored-enchants:{enc, level}:internal-hashstring
|
||||||
*
|
*
|
||||||
* @param data formatted string
|
* @param data formatted string
|
||||||
@ -227,18 +234,21 @@ public class ItemUtil {
|
|||||||
if (e != null) {
|
if (e != null) {
|
||||||
enchs.put(e, Integer.parseInt(temp[1]));
|
enchs.put(e, Integer.parseInt(temp[1]));
|
||||||
} else {
|
} else {
|
||||||
Bukkit.getLogger().severe("Legacy enchantment name \'" + temp[0] + "\' on " + name + " is invalid. Make sure it is spelled correctly");
|
Bukkit.getLogger().severe("Legacy enchantment name \'" + temp[0] + "\' on " + name
|
||||||
|
+ " is invalid. Make sure it is spelled correctly");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Modern enum name
|
// Modern enum name
|
||||||
if (Enchantment.getByName(temp[0]) != null) {
|
if (Enchantment.getByName(temp[0]) != null) {
|
||||||
enchs.put(Enchantment.getByName(temp[0]), Integer.parseInt(temp[1]));
|
enchs.put(Enchantment.getByName(temp[0]), Integer.parseInt(temp[1]));
|
||||||
} else {
|
} else {
|
||||||
Bukkit.getLogger().severe("Enum enchantment name \'" + temp[0] + "\' on " + name + " is invalid. Make sure it is spelled correctly");
|
Bukkit.getLogger().severe("Enum enchantment name \'" + temp[0] + "\' on " + name
|
||||||
|
+ " is invalid. Make sure it is spelled correctly");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Bukkit.getLogger().severe("The enchantment name \'" + temp[0] + "\' on " + name + " is invalid. Make sure quests.yml is UTF-8 encoded");
|
Bukkit.getLogger().severe("The enchantment name \'" + temp[0] + "\' on " + name
|
||||||
|
+ " is invalid. Make sure quests.yml is UTF-8 encoded");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
} else if (arg.startsWith("displayname-")) {
|
} else if (arg.startsWith("displayname-")) {
|
||||||
@ -393,7 +403,8 @@ public class ItemUtil {
|
|||||||
/**
|
/**
|
||||||
* Get formatted string from ItemStack. See readItemStack() for reverse function.
|
* Get formatted string from ItemStack. See readItemStack() for reverse function.
|
||||||
*
|
*
|
||||||
* <p>Returned format = name-name:amount-amount:data-data:enchantment-enchantment level:displayname-displayname:lore-lore:
|
* <p>Returned format = name-name:amount-amount:data-data:enchantment-enchantment level:displayname-displayname
|
||||||
|
* :lore-lore:
|
||||||
*
|
*
|
||||||
* @param is ItemStack
|
* @param is ItemStack
|
||||||
* @return formatted string, or null if invalid stack
|
* @return formatted string, or null if invalid stack
|
||||||
@ -467,7 +478,8 @@ public class ItemUtil {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (is.hasItemMeta() && is.getItemMeta().hasDisplayName()) {
|
if (is.hasItemMeta() && is.getItemMeta().hasDisplayName()) {
|
||||||
text = "" + ChatColor.DARK_AQUA + ChatColor.ITALIC + is.getItemMeta().getDisplayName() + ChatColor.RESET + ChatColor.AQUA + " x " + is.getAmount();
|
text = "" + ChatColor.DARK_AQUA + ChatColor.ITALIC + is.getItemMeta().getDisplayName() + ChatColor.RESET
|
||||||
|
+ ChatColor.AQUA + " x " + is.getAmount();
|
||||||
} else {
|
} else {
|
||||||
text = ChatColor.AQUA + getName(is);
|
text = ChatColor.AQUA + getName(is);
|
||||||
if (is.getDurability() != 0) {
|
if (is.getDurability() != 0) {
|
||||||
@ -499,7 +511,8 @@ public class ItemUtil {
|
|||||||
}
|
}
|
||||||
String text;
|
String text;
|
||||||
if (is.hasItemMeta() && is.getItemMeta().hasDisplayName()) {
|
if (is.hasItemMeta() && is.getItemMeta().hasDisplayName()) {
|
||||||
text = "" + ChatColor.DARK_AQUA + ChatColor.ITALIC + is.getItemMeta().getDisplayName() + ChatColor.RESET + ChatColor.AQUA + " x " + is.getAmount();
|
text = "" + ChatColor.DARK_AQUA + ChatColor.ITALIC + is.getItemMeta().getDisplayName() + ChatColor.RESET
|
||||||
|
+ ChatColor.AQUA + " x " + is.getAmount();
|
||||||
} else {
|
} else {
|
||||||
text = ChatColor.AQUA + getPrettyItemName(is.getType().name());
|
text = ChatColor.AQUA + getPrettyItemName(is.getType().name());
|
||||||
if (is.getDurability() != 0) {
|
if (is.getDurability() != 0) {
|
||||||
|
@ -124,15 +124,19 @@ public class Lang {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void loadLang() throws InvalidConfigurationException, IOException {
|
public void loadLang() throws InvalidConfigurationException, IOException {
|
||||||
File langFile = new File(plugin.getDataFolder(), File.separator + "lang" + File.separator + iso + File.separator + "strings.yml");
|
File langFile = new File(plugin.getDataFolder(), File.separator + "lang" + File.separator + iso + File.separator
|
||||||
File langFile_new = new File(plugin.getDataFolder(), File.separator + "lang" + File.separator + iso + File.separator + "strings_new.yml");
|
+ "strings.yml");
|
||||||
|
File langFile_new = new File(plugin.getDataFolder(), File.separator + "lang" + File.separator + iso
|
||||||
|
+ File.separator + "strings_new.yml");
|
||||||
boolean exists_new = langFile_new.exists();
|
boolean exists_new = langFile_new.exists();
|
||||||
LinkedHashMap<String, String> allStrings = new LinkedHashMap<String, String>();
|
LinkedHashMap<String, String> allStrings = new LinkedHashMap<String, String>();
|
||||||
if (langFile.exists()) {
|
if (langFile.exists()) {
|
||||||
FileConfiguration config = YamlConfiguration.loadConfiguration(new InputStreamReader(new FileInputStream(langFile), "UTF-8"));
|
FileConfiguration config= YamlConfiguration
|
||||||
|
.loadConfiguration(new InputStreamReader(new FileInputStream(langFile), "UTF-8"));
|
||||||
FileConfiguration config_new = null;
|
FileConfiguration config_new = null;
|
||||||
if (exists_new) {
|
if (exists_new) {
|
||||||
config_new = YamlConfiguration.loadConfiguration(new InputStreamReader(new FileInputStream(langFile_new), "UTF-8"));
|
config_new = YamlConfiguration
|
||||||
|
.loadConfiguration(new InputStreamReader(new FileInputStream(langFile_new), "UTF-8"));
|
||||||
}
|
}
|
||||||
// Load user's lang file and determine new strings
|
// Load user's lang file and determine new strings
|
||||||
for (String key : config.getKeys(false)) {
|
for (String key : config.getKeys(false)) {
|
||||||
@ -147,21 +151,27 @@ public class Lang {
|
|||||||
String value = config_new.getString(key);
|
String value = config_new.getString(key);
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
allStrings.put(key, value);
|
allStrings.put(key, value);
|
||||||
plugin.getLogger().warning("There are new language phrases in /lang/" + iso + "/strings_new.yml for the current version!"
|
plugin.getLogger().warning("There are new language phrases in /lang/" + iso
|
||||||
|
+ "/strings_new.yml for the current version!"
|
||||||
+ " You must transfer them to, or regenerate, strings.yml to remove this warning!");
|
+ " You must transfer them to, or regenerate, strings.yml to remove this warning!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
config_new.options().header("Below are any new strings for your current version of Quests! Transfer them to the strings.yml of the"
|
config_new.options().header("Below are any new strings for your current version of Quests! "
|
||||||
|
+ "Transfer them to the strings.yml of the"
|
||||||
+ " same folder to stay up-to-date and suppress console warnings.");
|
+ " same folder to stay up-to-date and suppress console warnings.");
|
||||||
config_new.options().copyHeader(true);
|
config_new.options().copyHeader(true);
|
||||||
config_new.save(langFile_new);
|
config_new.save(langFile_new);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
plugin.getLogger().severe("Failed loading lang files for " + iso + " because they were not found. Using default en-US");
|
plugin.getLogger().severe("Failed loading lang files for " + iso
|
||||||
plugin.getLogger().info("If the plugin has not generated language files, ensure Quests has write permissions");
|
+ " because they were not found. Using default en-US");
|
||||||
plugin.getLogger().info("For help, visit https://github.com/FlyingPikachu/Quests/wiki/Casual-%E2%80%90-Translations");
|
plugin.getLogger()
|
||||||
|
.info("If the plugin has not generated language files, ensure Quests has write permissions");
|
||||||
|
plugin.getLogger()
|
||||||
|
.info("For help, visit https://github.com/FlyingPikachu/Quests/wiki/Casual-%E2%80%90-Translations");
|
||||||
iso = "en-US";
|
iso = "en-US";
|
||||||
FileConfiguration config = YamlConfiguration.loadConfiguration(new InputStreamReader(plugin.getResource("strings.yml"), "UTF-8"));
|
FileConfiguration config = YamlConfiguration
|
||||||
|
.loadConfiguration(new InputStreamReader(plugin.getResource("strings.yml"), "UTF-8"));
|
||||||
for (String key : config.getKeys(false)) {
|
for (String key : config.getKeys(false)) {
|
||||||
allStrings.put(key, config.getString(key));
|
allStrings.put(key, config.getString(key));
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,8 @@ public class LocaleQuery {
|
|||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
String version = Bukkit.getServer().getClass().getPackage().getName().split("\\.")[3];
|
String version = Bukkit.getServer().getClass().getPackage().getName().split("\\.")[3];
|
||||||
try {
|
try {
|
||||||
craftMagicNumbers = Class.forName("org.bukkit.craftbukkit.{v}.util.CraftMagicNumbers".replace("{v}", version));
|
craftMagicNumbers = Class.forName("org.bukkit.craftbukkit.{v}.util.CraftMagicNumbers"
|
||||||
|
.replace("{v}", version));
|
||||||
itemClazz = Class.forName("net.minecraft.server.{v}.Item".replace("{v}", version));
|
itemClazz = Class.forName("net.minecraft.server.{v}.Item".replace("{v}", version));
|
||||||
} catch (ClassNotFoundException e) {
|
} catch (ClassNotFoundException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@ -83,7 +84,8 @@ public class LocaleQuery {
|
|||||||
* @param enchantments Enchantments for the item being translated
|
* @param enchantments Enchantments for the item being translated
|
||||||
* @param meta ItemMeta for the item being translated
|
* @param meta ItemMeta for the item being translated
|
||||||
*/
|
*/
|
||||||
public boolean sendMessage(Player player, String message, Material material, short durability, Map<Enchantment, Integer> enchantments, ItemMeta meta) {
|
public boolean sendMessage(Player player, String message, Material material, short durability,
|
||||||
|
Map<Enchantment, Integer> enchantments, ItemMeta meta) {
|
||||||
if (material == null) {
|
if (material == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -106,9 +108,11 @@ public class LocaleQuery {
|
|||||||
if (material.equals(Material.POTION)) {
|
if (material.equals(Material.POTION)) {
|
||||||
matKey = oldPotions.get(((PotionMeta)i.getItemMeta()).getBasePotionData().getType().name());
|
matKey = oldPotions.get(((PotionMeta)i.getItemMeta()).getBasePotionData().getType().name());
|
||||||
} else if (material.equals(Material.LINGERING_POTION)) {
|
} else if (material.equals(Material.LINGERING_POTION)) {
|
||||||
matKey = oldLingeringPotions.get(((PotionMeta)i.getItemMeta()).getBasePotionData().getType().name());
|
matKey = oldLingeringPotions.get(((PotionMeta)i.getItemMeta()).getBasePotionData().getType()
|
||||||
|
.name());
|
||||||
} else if (material.equals(Material.SPLASH_POTION)) {
|
} else if (material.equals(Material.SPLASH_POTION)) {
|
||||||
matKey = oldSplashPotions.get(((PotionMeta)i.getItemMeta()).getBasePotionData().getType().name());
|
matKey = oldSplashPotions.get(((PotionMeta)i.getItemMeta()).getBasePotionData().getType()
|
||||||
|
.name());
|
||||||
}
|
}
|
||||||
} else if (new Potion(durability).getType() != null) {
|
} else if (new Potion(durability).getType() != null) {
|
||||||
matKey = oldPotions_18.get(new Potion(durability).getType().name());
|
matKey = oldPotions_18.get(new Potion(durability).getType().name());
|
||||||
@ -130,6 +134,9 @@ public class LocaleQuery {
|
|||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (material.isBlock() && Bukkit.createBlockData(material) instanceof org.bukkit.block.data.Ageable) {
|
||||||
|
matKey = "block.minecraft." + material.name().toLowerCase();
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
matKey = queryMaterial(material);
|
matKey = queryMaterial(material);
|
||||||
@ -137,9 +144,12 @@ public class LocaleQuery {
|
|||||||
plugin.getLogger().severe("Unable to query Material: " + material.name());
|
plugin.getLogger().severe("Unable to query Material: " + material.name());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (meta != null && meta instanceof PotionMeta) {
|
if (meta != null && meta instanceof PotionMeta) {
|
||||||
matKey = "item.minecraft.potion.effect." + ((PotionMeta)meta).getBasePotionData().getType().name().toLowerCase()
|
matKey = "item.minecraft.potion.effect." + ((PotionMeta)meta).getBasePotionData().getType().name()
|
||||||
.replace("regen", "regeneration").replace("speed", "swiftness");
|
.toLowerCase().replace("regen", "regeneration").replace("speed", "swiftness")
|
||||||
|
.replace("jump", "leaping").replace("instant_heal", "healing")
|
||||||
|
.replace("instant_damage", "harming");
|
||||||
}
|
}
|
||||||
if (enchantments != null && !enchantments.isEmpty()) {
|
if (enchantments != null && !enchantments.isEmpty()) {
|
||||||
int count = 0;
|
int count = 0;
|
||||||
@ -174,7 +184,8 @@ public class LocaleQuery {
|
|||||||
* @param durability Durability for the item being translated
|
* @param durability Durability for the item being translated
|
||||||
* @param enchantments Enchantments for the item being translated
|
* @param enchantments Enchantments for the item being translated
|
||||||
*/
|
*/
|
||||||
public boolean sendMessage(Player player, String message, Material material, short durability, Map<Enchantment, Integer> enchantments) {
|
public boolean sendMessage(Player player, String message, Material material, short durability,
|
||||||
|
Map<Enchantment, Integer> enchantments) {
|
||||||
return sendMessage(player, message, material, durability, enchantments, null);
|
return sendMessage(player, message, material, durability, enchantments, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,6 +21,61 @@ import org.bukkit.entity.EntityType;
|
|||||||
|
|
||||||
public class MiscUtil {
|
public class MiscUtil {
|
||||||
|
|
||||||
|
public static String getTime(long milliseconds) {
|
||||||
|
String message = "";
|
||||||
|
long days = milliseconds / 86400000;
|
||||||
|
long hours = (milliseconds % 86400000) / 3600000;
|
||||||
|
long minutes = ((milliseconds % 86400000) % 3600000) / 60000;
|
||||||
|
long seconds = (((milliseconds % 86400000) % 3600000) % 60000) / 1000;
|
||||||
|
long milliSeconds2 = (((milliseconds % 86400000) % 3600000) % 60000) % 1000;
|
||||||
|
if (days > 0L) {
|
||||||
|
if (days == 1L) {
|
||||||
|
message += " 1 " + Lang.get("timeDay") + ",";
|
||||||
|
} else {
|
||||||
|
message += " " + days + " " + Lang.get("timeDays") + ",";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (hours > 0L) {
|
||||||
|
if (hours == 1L) {
|
||||||
|
message += " 1 " + Lang.get("timeHour") + ",";
|
||||||
|
} else {
|
||||||
|
message += " " + hours + " " + Lang.get("timeHours") + ",";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (minutes > 0L) {
|
||||||
|
if (minutes == 1L) {
|
||||||
|
message += " 1 " + Lang.get("timeMinute") + ",";
|
||||||
|
} else {
|
||||||
|
message += " " + minutes + " " + Lang.get("timeMinutes") + ",";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (seconds > 0L) {
|
||||||
|
if (seconds == 1L) {
|
||||||
|
message += " 1 " + Lang.get("timeSecond") + ",";
|
||||||
|
} else {
|
||||||
|
message += " " + seconds + " " + Lang.get("timeSeconds") + ",";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (milliSeconds2 > 0L) {
|
||||||
|
if (milliSeconds2 == 1L) {
|
||||||
|
message += " 1 " + Lang.get("timeMillisecond") + ",";
|
||||||
|
} else {
|
||||||
|
message += " " + milliSeconds2 + " " + Lang.get("timeMilliseconds") + ",";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (message.length() > 0) {
|
||||||
|
message = message.substring(1, message.length() - 1);
|
||||||
|
}
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Capitalize first letter of text and set remainder to lowercase
|
||||||
|
*
|
||||||
|
* @param input
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public static String getCapitalized(String input) {
|
public static String getCapitalized(String input) {
|
||||||
if (input.isEmpty()) {
|
if (input.isEmpty()) {
|
||||||
return input;
|
return input;
|
||||||
@ -55,17 +110,43 @@ public class MiscUtil {
|
|||||||
return prettyString;
|
return prettyString;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getProperMobName(EntityType type) {
|
/**
|
||||||
String name = type.name().toLowerCase();
|
* Convert text from snake_case to UpperCamelCase
|
||||||
|
*
|
||||||
|
* @param type To convert
|
||||||
|
* @return Converted text
|
||||||
|
*/
|
||||||
|
public static String snakeCaseToUpperCamelCase(String input) {
|
||||||
|
String name = input.toLowerCase();
|
||||||
name = Character.toUpperCase(name.charAt(0)) + name.substring(1);
|
name = Character.toUpperCase(name.charAt(0)) + name.substring(1);
|
||||||
|
for (int i = 0; i < input.chars().filter(num -> num == '_').count(); i++) {
|
||||||
int index = name.indexOf('_');
|
int index = name.indexOf('_');
|
||||||
if (index != -1) {
|
if (index != -1) {
|
||||||
name = name.substring(0, (index + 1)) + Character.toUpperCase(name.charAt(index + 1)) + name.substring(index + 2);
|
name = name.substring(0, (index + 1)) + Character.toUpperCase(name.charAt(index + 1))
|
||||||
|
+ name.substring(index + 2);
|
||||||
name = name.replaceFirst("_", "");
|
name = name.replaceFirst("_", "");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert EntityType name from snake_case to UpperCamelCase
|
||||||
|
*
|
||||||
|
* @deprecated Use {@link #snakeCaseToUpperCamelCase(String)}
|
||||||
|
* @param type To convert
|
||||||
|
* @return Converted text
|
||||||
|
*/
|
||||||
|
public static String getProperMobName(EntityType type) {
|
||||||
|
return snakeCaseToUpperCamelCase(type.name());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets living EntityType from name
|
||||||
|
*
|
||||||
|
* @param properName Name to get type from
|
||||||
|
* @return EntityType or null if invalid
|
||||||
|
*/
|
||||||
public static EntityType getProperMobType(String properName) {
|
public static EntityType getProperMobType(String properName) {
|
||||||
properName = properName.replaceAll("_", "").replaceAll(" ", "").toUpperCase();
|
properName = properName.replaceAll("_", "").replaceAll(" ", "").toUpperCase();
|
||||||
for (EntityType et : EntityType.values()) {
|
for (EntityType et : EntityType.values()) {
|
||||||
@ -120,7 +201,8 @@ public class MiscUtil {
|
|||||||
} else if (s.equalsIgnoreCase("Red") || s.equalsIgnoreCase(Lang.get("COLOR_RED"))) {
|
} else if (s.equalsIgnoreCase("Red") || s.equalsIgnoreCase(Lang.get("COLOR_RED"))) {
|
||||||
return DyeColor.RED;
|
return DyeColor.RED;
|
||||||
// 1.13 changed DyeColor.SILVER -> DyeColor.LIGHT_GRAY
|
// 1.13 changed DyeColor.SILVER -> DyeColor.LIGHT_GRAY
|
||||||
} else if (s.equalsIgnoreCase("Silver") || s.equalsIgnoreCase("LightGray") || s.equalsIgnoreCase(Lang.get("COLOR_SILVER"))) {
|
} else if (s.equalsIgnoreCase("Silver") || s.equalsIgnoreCase("LightGray")
|
||||||
|
|| s.equalsIgnoreCase(Lang.get("COLOR_SILVER"))) {
|
||||||
return DyeColor.getByColor(Color.SILVER);
|
return DyeColor.getByColor(Color.SILVER);
|
||||||
} else if (s.equalsIgnoreCase("White") || s.equalsIgnoreCase(Lang.get("COLOR_WHITE"))) {
|
} else if (s.equalsIgnoreCase("White") || s.equalsIgnoreCase(Lang.get("COLOR_WHITE"))) {
|
||||||
return DyeColor.WHITE;
|
return DyeColor.WHITE;
|
||||||
|
@ -19,7 +19,6 @@ public class RomanNumeral {
|
|||||||
private final static TreeMap<Integer, String> map = new TreeMap<Integer, String>();
|
private final static TreeMap<Integer, String> map = new TreeMap<Integer, String>();
|
||||||
|
|
||||||
static {
|
static {
|
||||||
|
|
||||||
map.put(1000, "M");
|
map.put(1000, "M");
|
||||||
map.put(900, "CM");
|
map.put(900, "CM");
|
||||||
map.put(500, "D");
|
map.put(500, "D");
|
||||||
@ -33,7 +32,6 @@ public class RomanNumeral {
|
|||||||
map.put(5, "V");
|
map.put(5, "V");
|
||||||
map.put(4, "IV");
|
map.put(4, "IV");
|
||||||
map.put(1, "I");
|
map.put(1, "I");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public final static String getNumeral(int number) {
|
public final static String getNumeral(int number) {
|
||||||
|
@ -82,14 +82,16 @@ public class WorldGuardAPI {
|
|||||||
vector = Class.forName("com.sk89q.worldedit.Vector");
|
vector = Class.forName("com.sk89q.worldedit.Vector");
|
||||||
vectorConstructor = vector.getConstructor(double.class, double.class, double.class);
|
vectorConstructor = vector.getConstructor(double.class, double.class, double.class);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Bukkit.getLogger().log(Level.WARNING, "Quests failed to bind to WorldGuard, integration will not work!", e);
|
Bukkit.getLogger().log(Level.WARNING,
|
||||||
|
"Quests failed to bind to WorldGuard, integration will not work!", e);
|
||||||
regionContainer = null;
|
regionContainer = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (regionContainer == null) {
|
if (regionContainer == null) {
|
||||||
Bukkit.getLogger().warning("Quests failed to find RegionContainer, WorldGuard integration will not function!");
|
Bukkit.getLogger()
|
||||||
|
.warning("Quests failed to find RegionContainer, WorldGuard integration will not function!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -105,7 +107,8 @@ public class WorldGuardAPI {
|
|||||||
try {
|
try {
|
||||||
regionManager = (RegionManager)regionContainerGetMethod.invoke(regionContainer, world);
|
regionManager = (RegionManager)regionContainerGetMethod.invoke(regionContainer, world);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Bukkit.getLogger().log(Level.WARNING, "Quests encountered an error getting WorldGuard RegionManager", e);
|
Bukkit.getLogger().log(Level.WARNING,
|
||||||
|
"Quests encountered an error getting WorldGuard RegionManager", e);
|
||||||
}
|
}
|
||||||
return regionManager;
|
return regionManager;
|
||||||
}
|
}
|
||||||
@ -120,10 +123,12 @@ public class WorldGuardAPI {
|
|||||||
ApplicableRegionSet ars = null;
|
ApplicableRegionSet ars = null;
|
||||||
if (regionManager == null) return null;
|
if (regionManager == null) return null;
|
||||||
try {
|
try {
|
||||||
Method getApplicableRegionsMethod = regionManager.getClass().getMethod("getApplicableRegions", Location.class);
|
Method getApplicableRegionsMethod = regionManager.getClass()
|
||||||
|
.getMethod("getApplicableRegions", Location.class);
|
||||||
ars = (ApplicableRegionSet)getApplicableRegionsMethod.invoke(regionManager, location);
|
ars = (ApplicableRegionSet)getApplicableRegionsMethod.invoke(regionManager, location);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Bukkit.getLogger().log(Level.WARNING, "Quests encountered an error getting RegionManager#getApplicableRegions", e);
|
Bukkit.getLogger().log(Level.WARNING,
|
||||||
|
"Quests encountered an error getting RegionManager#getApplicableRegions", e);
|
||||||
}
|
}
|
||||||
return ars;
|
return ars;
|
||||||
}
|
}
|
||||||
@ -139,11 +144,13 @@ public class WorldGuardAPI {
|
|||||||
List<String> ari = null;
|
List<String> ari = null;
|
||||||
if (regionManager == null) return null;
|
if (regionManager == null) return null;
|
||||||
try {
|
try {
|
||||||
Method getApplicableRegionsMethod = regionManager.getClass().getMethod("getApplicableRegionsIDs", vector);
|
Method getApplicableRegionsMethod = regionManager.getClass()
|
||||||
|
.getMethod("getApplicableRegionsIDs", vector);
|
||||||
ari = (List<String>)getApplicableRegionsMethod.invoke(regionManager,
|
ari = (List<String>)getApplicableRegionsMethod.invoke(regionManager,
|
||||||
vectorConstructor.newInstance(location.getX(), location.getY(), location.getZ()));
|
vectorConstructor.newInstance(location.getX(), location.getY(), location.getZ()));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Bukkit.getLogger().log(Level.WARNING, "Quests encountered an error getting RegionManager#getApplicableRegionsIDs", e);
|
Bukkit.getLogger().log(Level.WARNING,
|
||||||
|
"Quests encountered an error getting RegionManager#getApplicableRegionsIDs", e);
|
||||||
}
|
}
|
||||||
return ari;
|
return ari;
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,8 @@ import com.sk89q.worldguard.protection.ApplicableRegionSet;
|
|||||||
import com.sk89q.worldguard.protection.managers.RegionManager;
|
import com.sk89q.worldguard.protection.managers.RegionManager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class's imports must exist separately from WorldGuardAPI.java in order to not crash from NoClassDefFoundError at runtime
|
* This class's imports must exist separately from WorldGuardAPI.java in order to not crash from NoClassDefFoundError
|
||||||
|
* at runtime
|
||||||
*/
|
*/
|
||||||
public class WorldGuardAPI_7_0_0 {
|
public class WorldGuardAPI_7_0_0 {
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ npc-effects:
|
|||||||
redo-quest: angry_villager
|
redo-quest: angry_villager
|
||||||
show-requirements: true
|
show-requirements: true
|
||||||
show-titles: true
|
show-titles: true
|
||||||
|
strict-player-movement: 0
|
||||||
translate-names: true
|
translate-names: true
|
||||||
translate-subcommands: false
|
translate-subcommands: false
|
||||||
use-compass: true
|
use-compass: true
|
@ -65,10 +65,9 @@ questEditorPln: "Edit Planner"
|
|||||||
questEditorStages: "تعديل المرحلة"
|
questEditorStages: "تعديل المرحلة"
|
||||||
questEditorRews: "تحرير المكافآت"
|
questEditorRews: "تحرير المكافآت"
|
||||||
questEditorOpts: "Edit Options"
|
questEditorOpts: "Edit Options"
|
||||||
questEditorEnterQuestName: "Enter Quest name (<cancel>)"
|
questEditorEnterQuestName: "Enter Quest name, <cancel>"
|
||||||
questEditorEditEnterQuestName: "Enter Quest name to edit (<cancel>)"
|
questEditorEnterAskMessage: "Enter ask message, <cancel>"
|
||||||
questEditorEnterAskMessage: "Enter ask message (<cancel>)"
|
questEditorEnterFinishMessage: "Enter finish message, <cancel>"
|
||||||
questEditorEnterFinishMessage: "Enter finish message (<cancel>)"
|
|
||||||
questEditorEnterNPCStart: "Enter NPC ID, <clear>, <cancel>"
|
questEditorEnterNPCStart: "Enter NPC ID, <clear>, <cancel>"
|
||||||
questEditorEnterBlockStart: "Right-click on a block to use as a start point, <done>, <clear>, <cancel>"
|
questEditorEnterBlockStart: "Right-click on a block to use as a start point, <done>, <clear>, <cancel>"
|
||||||
questEditorEnterInitialEvent: "Enter an Action name, <clear>, <cancel>"
|
questEditorEnterInitialEvent: "Enter an Action name, <clear>, <cancel>"
|
||||||
@ -164,11 +163,7 @@ stageEditorCompleteMessage: "Complete message"
|
|||||||
stageEditorDelete: "حذف المرحلة"
|
stageEditorDelete: "حذف المرحلة"
|
||||||
stageEditorSetBlockNames: "Set block names"
|
stageEditorSetBlockNames: "Set block names"
|
||||||
stageEditorSetBlockAmounts: "Set block amounts"
|
stageEditorSetBlockAmounts: "Set block amounts"
|
||||||
stageEditorSetBlockDurability: "Set block durability"
|
stageEditorSetBlockDurability: "Set block durabilities"
|
||||||
stageEditorSetDamageAmounts: "Set damage amounts"
|
|
||||||
stageEditorSetPlaceAmounts: "Set place amounts"
|
|
||||||
stageEditorSetUseAmounts: "Set use amounts"
|
|
||||||
stageEditorSetCutAmounts: "Set cut amounts"
|
|
||||||
stageEditorSetKillAmounts: "Set kill amounts"
|
stageEditorSetKillAmounts: "Set kill amounts"
|
||||||
stageEditorSetEnchantAmounts: "Set enchant amounts"
|
stageEditorSetEnchantAmounts: "Set enchant amounts"
|
||||||
stageEditorSetMobAmounts: "Set mob amounts"
|
stageEditorSetMobAmounts: "Set mob amounts"
|
||||||
@ -197,12 +192,8 @@ stageEditorCustomAlreadyAdded: "That custom objective has already been added!"
|
|||||||
stageEditorCustomCleared: "Custom objectives cleared."
|
stageEditorCustomCleared: "Custom objectives cleared."
|
||||||
stageEditorCustomDataPrompt: "قم بإدخال قيمة ل <data>:"
|
stageEditorCustomDataPrompt: "قم بإدخال قيمة ل <data>:"
|
||||||
stageEditorEnterBlockNames: "Enter block names, <space>, <cancel>"
|
stageEditorEnterBlockNames: "Enter block names, <space>, <cancel>"
|
||||||
stageEditorBreakBlocksPrompt: "Enter break amounts (numbers), <space>, <cancel>"
|
stageEditorEnterBlockAmounts: "Enter block amounts, <space>, <cancel>"
|
||||||
stageEditorDamageBlocksPrompt: "Enter damage amounts (numbers), <space>, <cancel>"
|
stageEditorEnterBlockDurability: "Enter block durabilities (numbers), <space>, <cancel>"
|
||||||
stageEditorPlaceBlocksPrompt: "Enter place amounts (numbers), <space>, <cancel>"
|
|
||||||
stageEditorUseBlocksPrompt: "Enter use amounts (numbers), <space>, <cancel>"
|
|
||||||
stageEditorCutBlocksPrompt: "Enter cut amounts (numbers), <space>, <cancel>"
|
|
||||||
stageEditorEnterBlockDurability: "Enter block durability (numbers), <space>, <cancel>"
|
|
||||||
stageEditorCatchFishPrompt: "Enter number of fish to catch, <clear>, <cancel>"
|
stageEditorCatchFishPrompt: "Enter number of fish to catch, <clear>, <cancel>"
|
||||||
stageEditorKillPlayerPrompt: "Enter number of players to kill, <clear>, <cancel>"
|
stageEditorKillPlayerPrompt: "Enter number of players to kill, <clear>, <cancel>"
|
||||||
stageEditorEnchantTypePrompt: "Enter enchantment names, <semicolon>, <cancel>"
|
stageEditorEnchantTypePrompt: "Enter enchantment names, <semicolon>, <cancel>"
|
||||||
@ -601,16 +592,6 @@ timeZoneTitle: "- Time Zones -"
|
|||||||
enchantmentsTitle: "- Enchantments -"
|
enchantmentsTitle: "- Enchantments -"
|
||||||
questGUITitle: "- GUI Item Display -"
|
questGUITitle: "- GUI Item Display -"
|
||||||
questRegionTitle: "- Quest Region -"
|
questRegionTitle: "- Quest Region -"
|
||||||
effBlazeShoot: "Sound of a Blaze firing"
|
|
||||||
effBowFire: "Sound of a bow firing"
|
|
||||||
effClick1: "A click sound"
|
|
||||||
effClick2: "A different click sound"
|
|
||||||
effDoorToggle: "Sound of a door opening or closing"
|
|
||||||
effExtinguish: "Sound of fire being extinguished"
|
|
||||||
effGhastShoot: "Sound of a Ghast firing"
|
|
||||||
effGhastShriek: "Sound of a Ghast shrieking"
|
|
||||||
effZombieWood: "Sound of a Zombie chewing an iron door"
|
|
||||||
effZombieIron: "Sound of a Zombie chewing a wooden door"
|
|
||||||
effEnterName: "Enter an effect name to add it to the list, <cancel>"
|
effEnterName: "Enter an effect name to add it to the list, <cancel>"
|
||||||
cmdAdd: "add"
|
cmdAdd: "add"
|
||||||
strAdd: "then enter '<command>' to include it"
|
strAdd: "then enter '<command>' to include it"
|
||||||
|
@ -66,7 +66,6 @@ questEditorStages: "Upravit fáze"
|
|||||||
questEditorRews: "Upravit odměny"
|
questEditorRews: "Upravit odměny"
|
||||||
questEditorOpts: "Upravit Možnosti"
|
questEditorOpts: "Upravit Možnosti"
|
||||||
questEditorEnterQuestName: "Zadejte název úkolu (<cancel>)"
|
questEditorEnterQuestName: "Zadejte název úkolu (<cancel>)"
|
||||||
questEditorEditEnterQuestName: "Zadejte jméno úkolu který chcete upravit (<cancel>)"
|
|
||||||
questEditorEnterAskMessage: "Zadejte požadovanou zprávu (<cancel>)"
|
questEditorEnterAskMessage: "Zadejte požadovanou zprávu (<cancel>)"
|
||||||
questEditorEnterFinishMessage: "Zadejte konečnou zprávu (<cancel>)"
|
questEditorEnterFinishMessage: "Zadejte konečnou zprávu (<cancel>)"
|
||||||
questEditorEnterNPCStart: "Zadejte NPC ID, <clear>, <cancel>"
|
questEditorEnterNPCStart: "Zadejte NPC ID, <clear>, <cancel>"
|
||||||
@ -165,10 +164,6 @@ stageEditorDelete: "Odstranit fázi"
|
|||||||
stageEditorSetBlockNames: "Nastavit názvy bloků"
|
stageEditorSetBlockNames: "Nastavit názvy bloků"
|
||||||
stageEditorSetBlockAmounts: "Nastavit množství bloků"
|
stageEditorSetBlockAmounts: "Nastavit množství bloků"
|
||||||
stageEditorSetBlockDurability: "Natavit trvanlivost"
|
stageEditorSetBlockDurability: "Natavit trvanlivost"
|
||||||
stageEditorSetDamageAmounts: "Nastavit množství poškození"
|
|
||||||
stageEditorSetPlaceAmounts: "Nastavit množství umístění"
|
|
||||||
stageEditorSetUseAmounts: "Nastavit množství použití"
|
|
||||||
stageEditorSetCutAmounts: "Nastavit množství uříznutí"
|
|
||||||
stageEditorSetKillAmounts: "Nastavení množství zabití"
|
stageEditorSetKillAmounts: "Nastavení množství zabití"
|
||||||
stageEditorSetEnchantAmounts: "Nastavit množství enchantovaných věcí"
|
stageEditorSetEnchantAmounts: "Nastavit množství enchantovaných věcí"
|
||||||
stageEditorSetMobAmounts: "Nastavit množství monster"
|
stageEditorSetMobAmounts: "Nastavit množství monster"
|
||||||
@ -197,11 +192,7 @@ stageEditorCustomAlreadyAdded: "Tento vlastní cíl již byl přidán!"
|
|||||||
stageEditorCustomCleared: "Vlastní cíle vyčištěny."
|
stageEditorCustomCleared: "Vlastní cíle vyčištěny."
|
||||||
stageEditorCustomDataPrompt: "Zadejte hodnotu pro <data>:"
|
stageEditorCustomDataPrompt: "Zadejte hodnotu pro <data>:"
|
||||||
stageEditorEnterBlockNames: "Napiš jméno blocku, <space>, <cancel>"
|
stageEditorEnterBlockNames: "Napiš jméno blocku, <space>, <cancel>"
|
||||||
stageEditorBreakBlocksPrompt: "Napiš množství zničení (numbers), <space>, <cancel>"
|
stageEditorEnterBlockAmounts: "Enter block amounts, <space>, <cancel>"
|
||||||
stageEditorDamageBlocksPrompt: "Napiš množství poškození (numbers), <space>, <cancel>"
|
|
||||||
stageEditorPlaceBlocksPrompt: "Napiš množství položení (numbers), <space>, <cancel>"
|
|
||||||
stageEditorUseBlocksPrompt: "Napiš množství použití (numbers), <space>, <cancel>"
|
|
||||||
stageEditorCutBlocksPrompt: "Napiš množství ustřižení (numbers), <space>, <cancel>"
|
|
||||||
stageEditorEnterBlockDurability: "Napiš výdrž blocku (numbers), <space>, <cancel>"
|
stageEditorEnterBlockDurability: "Napiš výdrž blocku (numbers), <space>, <cancel>"
|
||||||
stageEditorCatchFishPrompt: "Napiš kolik ryb musí chytit, <clear>, <cancel>"
|
stageEditorCatchFishPrompt: "Napiš kolik ryb musí chytit, <clear>, <cancel>"
|
||||||
stageEditorKillPlayerPrompt: "Napiš kolik hráčů musí zabít, <clear>, <cancel>"
|
stageEditorKillPlayerPrompt: "Napiš kolik hráčů musí zabít, <clear>, <cancel>"
|
||||||
@ -601,16 +592,6 @@ timeZoneTitle: "- Časová Pásma -"
|
|||||||
enchantmentsTitle: "- Enchanty -"
|
enchantmentsTitle: "- Enchanty -"
|
||||||
questGUITitle: "- Zobrazování Položky GUI -"
|
questGUITitle: "- Zobrazování Položky GUI -"
|
||||||
questRegionTitle: "- Oblast Úkolu -"
|
questRegionTitle: "- Oblast Úkolu -"
|
||||||
effBlazeShoot: "Zvuk střelby Blaze"
|
|
||||||
effBowFire: "Zvuk blaze střílení"
|
|
||||||
effClick1: "Zvuk kliku"
|
|
||||||
effClick2: "Odlišný zvuk kliku"
|
|
||||||
effDoorToggle: "Zvuk zavírání nebo otevírání dveří"
|
|
||||||
effExtinguish: "Zvuk ohně zhasl"
|
|
||||||
effGhastShoot: "Zvuk spálení Ghast"
|
|
||||||
effGhastShriek: "Zvuk kříčícího Ghast"
|
|
||||||
effZombieWood: "Zvuk, když Zombie rozbíjí železné dveře"
|
|
||||||
effZombieIron: "Zvuk, když Zombie rozbíjí dřevěné dveře"
|
|
||||||
effEnterName: "Zadejte název efektu který chcete přidat do seznamu, <cancel>"
|
effEnterName: "Zadejte název efektu který chcete přidat do seznamu, <cancel>"
|
||||||
cmdAdd: "přidat"
|
cmdAdd: "přidat"
|
||||||
strAdd: "potom zadejte '<command>' pro přidání"
|
strAdd: "potom zadejte '<command>' pro přidání"
|
||||||
|
@ -66,7 +66,6 @@ questEditorStages: "Redigere faserne"
|
|||||||
questEditorRews: "Redigere belønninger"
|
questEditorRews: "Redigere belønninger"
|
||||||
questEditorOpts: "Rediger Valgmuligheder"
|
questEditorOpts: "Rediger Valgmuligheder"
|
||||||
questEditorEnterQuestName: "Skriv Quest navn (<cancel>)"
|
questEditorEnterQuestName: "Skriv Quest navn (<cancel>)"
|
||||||
questEditorEditEnterQuestName: "Skriv Quest navn til at redigere (<cancel>)"
|
|
||||||
questEditorEnterAskMessage: "Skriv spørge beskeden (<cancel>)"
|
questEditorEnterAskMessage: "Skriv spørge beskeden (<cancel>)"
|
||||||
questEditorEnterFinishMessage: "Skriv slut beskeden (<cancel>)"
|
questEditorEnterFinishMessage: "Skriv slut beskeden (<cancel>)"
|
||||||
questEditorEnterNPCStart: "Indtast NPC ID, <clear>, <cancel>"
|
questEditorEnterNPCStart: "Indtast NPC ID, <clear>, <cancel>"
|
||||||
@ -165,10 +164,6 @@ stageEditorDelete: "Fjernet scene"
|
|||||||
stageEditorSetBlockNames: "Sæt blok navne"
|
stageEditorSetBlockNames: "Sæt blok navne"
|
||||||
stageEditorSetBlockAmounts: "Sæt antal blok"
|
stageEditorSetBlockAmounts: "Sæt antal blok"
|
||||||
stageEditorSetBlockDurability: "Sæt blok holdbarheden"
|
stageEditorSetBlockDurability: "Sæt blok holdbarheden"
|
||||||
stageEditorSetDamageAmounts: "Sæt antal skade"
|
|
||||||
stageEditorSetPlaceAmounts: "Sæt antal placeringer"
|
|
||||||
stageEditorSetUseAmounts: "Sæt antal brugte"
|
|
||||||
stageEditorSetCutAmounts: "Sæt antal skæringer"
|
|
||||||
stageEditorSetKillAmounts: "Sæt antal dræbe"
|
stageEditorSetKillAmounts: "Sæt antal dræbe"
|
||||||
stageEditorSetEnchantAmounts: "Sæt antal besværgelse"
|
stageEditorSetEnchantAmounts: "Sæt antal besværgelse"
|
||||||
stageEditorSetMobAmounts: "Sæt antal mob"
|
stageEditorSetMobAmounts: "Sæt antal mob"
|
||||||
@ -197,11 +192,7 @@ stageEditorCustomAlreadyAdded: "Dette håndlavede objekt er allerede blevet tilf
|
|||||||
stageEditorCustomCleared: "Håndlavede objekt ryddet."
|
stageEditorCustomCleared: "Håndlavede objekt ryddet."
|
||||||
stageEditorCustomDataPrompt: "Skriv værdien for <data>:"
|
stageEditorCustomDataPrompt: "Skriv værdien for <data>:"
|
||||||
stageEditorEnterBlockNames: "Skriv blok navne, <space>, <cancel>"
|
stageEditorEnterBlockNames: "Skriv blok navne, <space>, <cancel>"
|
||||||
stageEditorBreakBlocksPrompt: "Skriv antal ødelæggelse af blokke (skal være tal), <space>, <cancel>"
|
stageEditorEnterBlockAmounts: "Enter block amounts, <space>, <cancel>"
|
||||||
stageEditorDamageBlocksPrompt: "Skriv antal skade (skal være tal), <space>, <cancel>"
|
|
||||||
stageEditorPlaceBlocksPrompt: "Skriv antal blokke sat (I tal), <space>, <cancel>"
|
|
||||||
stageEditorUseBlocksPrompt: "Skriv antallet brugte (i tal), <space>, <cancel>"
|
|
||||||
stageEditorCutBlocksPrompt: "Skriv antal snits (i tal), <space>, <cancel>"
|
|
||||||
stageEditorEnterBlockDurability: "Skriv blok holdbarhed (i tal), <space>, <cancel>"
|
stageEditorEnterBlockDurability: "Skriv blok holdbarhed (i tal), <space>, <cancel>"
|
||||||
stageEditorCatchFishPrompt: "Indtast antal fisk man skal fange, <clear>, <cancel>"
|
stageEditorCatchFishPrompt: "Indtast antal fisk man skal fange, <clear>, <cancel>"
|
||||||
stageEditorKillPlayerPrompt: "Skriv antal spillere man skal dræbe, <clear>, <cancel>"
|
stageEditorKillPlayerPrompt: "Skriv antal spillere man skal dræbe, <clear>, <cancel>"
|
||||||
@ -601,16 +592,6 @@ timeZoneTitle: "- Tidszoner -"
|
|||||||
enchantmentsTitle: "- Besværgelser -"
|
enchantmentsTitle: "- Besværgelser -"
|
||||||
questGUITitle: "- GUI Elementvisning -"
|
questGUITitle: "- GUI Elementvisning -"
|
||||||
questRegionTitle: "- Quest Område -"
|
questRegionTitle: "- Quest Område -"
|
||||||
effBlazeShoot: "Lyd af en Blaze fyring"
|
|
||||||
effBowFire: "Lyd af en bue fyring"
|
|
||||||
effClick1: "En klikke lyd"
|
|
||||||
effClick2: "En anden kliklyd"
|
|
||||||
effDoorToggle: "Lyden af en døråbning eller lukning"
|
|
||||||
effExtinguish: "Lyden af ild, der er slukket"
|
|
||||||
effGhastShoot: "Lyden af en Ghast fyring"
|
|
||||||
effGhastShriek: "Lyden af et Ghast skrig"
|
|
||||||
effZombieWood: "Lyd af en zombie, der tygger en jerndør"
|
|
||||||
effZombieIron: "Lyd af en zombie, der tygger en trædør"
|
|
||||||
effEnterName: "Skriv et effekt navn for at tilføje det til listen, <cancel>"
|
effEnterName: "Skriv et effekt navn for at tilføje det til listen, <cancel>"
|
||||||
cmdAdd: "tilføj"
|
cmdAdd: "tilføj"
|
||||||
strAdd: "og skriv '<command>' for at inkludere det"
|
strAdd: "og skriv '<command>' for at inkludere det"
|
||||||
|
@ -66,7 +66,6 @@ questEditorStages: "Stufen bearbeiten"
|
|||||||
questEditorRews: "Belohnungen bearbeiten"
|
questEditorRews: "Belohnungen bearbeiten"
|
||||||
questEditorOpts: "Optionen Bearbeiten"
|
questEditorOpts: "Optionen Bearbeiten"
|
||||||
questEditorEnterQuestName: "Quest name eingeben (<cancel>)"
|
questEditorEnterQuestName: "Quest name eingeben (<cancel>)"
|
||||||
questEditorEditEnterQuestName: "Gib den Quest-Namen zum bearbeiten an (<cancel>)"
|
|
||||||
questEditorEnterAskMessage: "Gib eine Startnachricht ein (<cancel>)"
|
questEditorEnterAskMessage: "Gib eine Startnachricht ein (<cancel>)"
|
||||||
questEditorEnterFinishMessage: "Gib eine Endnachricht ein (<cancel>)"
|
questEditorEnterFinishMessage: "Gib eine Endnachricht ein (<cancel>)"
|
||||||
questEditorEnterNPCStart: "Gib die NPC-ID ein, <clear>, <cancel>"
|
questEditorEnterNPCStart: "Gib die NPC-ID ein, <clear>, <cancel>"
|
||||||
@ -165,10 +164,6 @@ stageEditorDelete: "Stufe löschen"
|
|||||||
stageEditorSetBlockNames: "Block-Namen setzen"
|
stageEditorSetBlockNames: "Block-Namen setzen"
|
||||||
stageEditorSetBlockAmounts: "Block-Anzahl setzen"
|
stageEditorSetBlockAmounts: "Block-Anzahl setzen"
|
||||||
stageEditorSetBlockDurability: "Block-Haltbarkeit setzen"
|
stageEditorSetBlockDurability: "Block-Haltbarkeit setzen"
|
||||||
stageEditorSetDamageAmounts: "Beschädigung setzen"
|
|
||||||
stageEditorSetPlaceAmounts: "Menge zum Platzieren setzen"
|
|
||||||
stageEditorSetUseAmounts: "Anzahl Verwendungen setzen"
|
|
||||||
stageEditorSetCutAmounts: "Setze die Schnittmenge"
|
|
||||||
stageEditorSetKillAmounts: "Killmenge setzen"
|
stageEditorSetKillAmounts: "Killmenge setzen"
|
||||||
stageEditorSetEnchantAmounts: "Verzauberungsmenge setzen"
|
stageEditorSetEnchantAmounts: "Verzauberungsmenge setzen"
|
||||||
stageEditorSetMobAmounts: "Menge der Mobs setzen"
|
stageEditorSetMobAmounts: "Menge der Mobs setzen"
|
||||||
@ -197,11 +192,7 @@ stageEditorCustomAlreadyAdded: "Dieses benutzerdefinierte Ziel wurde bereits hin
|
|||||||
stageEditorCustomCleared: "Benutzerdefinierte Ziele gelöscht."
|
stageEditorCustomCleared: "Benutzerdefinierte Ziele gelöscht."
|
||||||
stageEditorCustomDataPrompt: "Geben Sie den Wert für <data> ein:"
|
stageEditorCustomDataPrompt: "Geben Sie den Wert für <data> ein:"
|
||||||
stageEditorEnterBlockNames: "Gib den Blocknamen ein, <space>, <cancel>"
|
stageEditorEnterBlockNames: "Gib den Blocknamen ein, <space>, <cancel>"
|
||||||
stageEditorBreakBlocksPrompt: "Gib die Abbaumengen (zahlen) ein, <space>, <cancel>"
|
stageEditorEnterBlockAmounts: "Enter block amounts, <space>, <cancel>"
|
||||||
stageEditorDamageBlocksPrompt: "Gib die Schadensmenge (zahlen) ein, <space>, <cancel>"
|
|
||||||
stageEditorPlaceBlocksPrompt: "Gib die Menge zum Platzieren (zahlen) ein, <space>, <cancel>"
|
|
||||||
stageEditorUseBlocksPrompt: "Gib die Nutzungsmenge (zahlen) ein, <space>, <cancel>"
|
|
||||||
stageEditorCutBlocksPrompt: "Gib die Schnittmenge (zahlen) ein, <space>, <cancel>"
|
|
||||||
stageEditorEnterBlockDurability: "Gib die Blockhaltbarkeit (zahlen) ein, <space>, <cancel>"
|
stageEditorEnterBlockDurability: "Gib die Blockhaltbarkeit (zahlen) ein, <space>, <cancel>"
|
||||||
stageEditorCatchFishPrompt: "Gib die Anzahl der Fische an die gefangen werden müssen, <clear>, <cancel>"
|
stageEditorCatchFishPrompt: "Gib die Anzahl der Fische an die gefangen werden müssen, <clear>, <cancel>"
|
||||||
stageEditorKillPlayerPrompt: "Gib die Anzahl Spieler die getötet werden müssen, <clear>, <cancel>"
|
stageEditorKillPlayerPrompt: "Gib die Anzahl Spieler die getötet werden müssen, <clear>, <cancel>"
|
||||||
@ -601,16 +592,6 @@ timeZoneTitle: "- Zeitzonen -"
|
|||||||
enchantmentsTitle: "- Verzauberungen -"
|
enchantmentsTitle: "- Verzauberungen -"
|
||||||
questGUITitle: "- GUI Item Anzeige -"
|
questGUITitle: "- GUI Item Anzeige -"
|
||||||
questRegionTitle: "- Quest Region -"
|
questRegionTitle: "- Quest Region -"
|
||||||
effBlazeShoot: "Sound von einer feuernden Lohe"
|
|
||||||
effBowFire: "Sound eines Pfeilschusses"
|
|
||||||
effClick1: "Ein Klicksound"
|
|
||||||
effClick2: "Ein anderer Klicksound"
|
|
||||||
effDoorToggle: "Sound einer öffnenden oder schliessenden Tür"
|
|
||||||
effExtinguish: "Sound eines Feuers, welches ausgelöscht wird"
|
|
||||||
effGhastShoot: "Sound eines feuernden Ghasts"
|
|
||||||
effGhastShriek: "Sound eines schreienden Ghasts"
|
|
||||||
effZombieWood: "Sound eines Zombies, dass eine Eisentür aufbeisst"
|
|
||||||
effZombieIron: "Sound eines Zombies, dass eine Holztür aufbeisst"
|
|
||||||
effEnterName: "Gib einen Effektnamen ein, <cancel>"
|
effEnterName: "Gib einen Effektnamen ein, <cancel>"
|
||||||
cmdAdd: "hinzufügen"
|
cmdAdd: "hinzufügen"
|
||||||
strAdd: "Geben Sie dann <command> ein um es aufzunehmen"
|
strAdd: "Geben Sie dann <command> ein um es aufzunehmen"
|
||||||
|
@ -66,7 +66,6 @@ questEditorStages: "Edit Stages"
|
|||||||
questEditorRews: "Edit Rewards"
|
questEditorRews: "Edit Rewards"
|
||||||
questEditorOpts: "Edit Options"
|
questEditorOpts: "Edit Options"
|
||||||
questEditorEnterQuestName: "Enter Quest name (<cancel>)"
|
questEditorEnterQuestName: "Enter Quest name (<cancel>)"
|
||||||
questEditorEditEnterQuestName: "Enter Quest name t' edit (<cancel>)"
|
|
||||||
questEditorEnterAskMessage: "Enter ask message (<cancel>)"
|
questEditorEnterAskMessage: "Enter ask message (<cancel>)"
|
||||||
questEditorEnterFinishMessage: "Enter finish message (<cancel>)"
|
questEditorEnterFinishMessage: "Enter finish message (<cancel>)"
|
||||||
questEditorEnterNPCStart: "Enter NPC ID, <clear>, <cancel>"
|
questEditorEnterNPCStart: "Enter NPC ID, <clear>, <cancel>"
|
||||||
@ -85,7 +84,7 @@ questPartiesInvite: "<player> can now perform quests wit' ye!"
|
|||||||
questPartiesJoin: "Ye can now perform quests wit' <player>."
|
questPartiesJoin: "Ye can now perform quests wit' <player>."
|
||||||
questPartiesKicked: "<player> can no longer perform quests wit' ye."
|
questPartiesKicked: "<player> can no longer perform quests wit' ye."
|
||||||
questPartiesLeave: "Ye can no longer perform quests wit' <player>."
|
questPartiesLeave: "Ye can no longer perform quests wit' <player>."
|
||||||
questWGSetRegion: "Set Region"
|
questWGSetRegion: "Set Region start"
|
||||||
questWGPrompt: "Enter WorldGuard region, <clear>, <cancel>"
|
questWGPrompt: "Enter WorldGuard region, <clear>, <cancel>"
|
||||||
questWGInvalidRegion: "<region> ain't a valid WorldGuard region!"
|
questWGInvalidRegion: "<region> ain't a valid WorldGuard region!"
|
||||||
questWGRegionCleared: "Quest region cleared."
|
questWGRegionCleared: "Quest region cleared."
|
||||||
@ -165,10 +164,6 @@ stageEditorDelete: "Delete Stage"
|
|||||||
stageEditorSetBlockNames: "Set block names"
|
stageEditorSetBlockNames: "Set block names"
|
||||||
stageEditorSetBlockAmounts: "Set block amounts"
|
stageEditorSetBlockAmounts: "Set block amounts"
|
||||||
stageEditorSetBlockDurability: "Set block durability"
|
stageEditorSetBlockDurability: "Set block durability"
|
||||||
stageEditorSetDamageAmounts: "Set damage amounts"
|
|
||||||
stageEditorSetPlaceAmounts: "Set place amounts"
|
|
||||||
stageEditorSetUseAmounts: "Set use amounts"
|
|
||||||
stageEditorSetCutAmounts: "Set cut amounts"
|
|
||||||
stageEditorSetKillAmounts: "Set kill amounts"
|
stageEditorSetKillAmounts: "Set kill amounts"
|
||||||
stageEditorSetEnchantAmounts: "Set enchant amounts"
|
stageEditorSetEnchantAmounts: "Set enchant amounts"
|
||||||
stageEditorSetMobAmounts: "Set mob amounts"
|
stageEditorSetMobAmounts: "Set mob amounts"
|
||||||
@ -197,12 +192,8 @@ stageEditorCustomAlreadyAdded: "That custom objective has already been added!"
|
|||||||
stageEditorCustomCleared: "Custom objectives cleared."
|
stageEditorCustomCleared: "Custom objectives cleared."
|
||||||
stageEditorCustomDataPrompt: "Enter value fer <data>:"
|
stageEditorCustomDataPrompt: "Enter value fer <data>:"
|
||||||
stageEditorEnterBlockNames: "Enter block names, <space>, <cancel>"
|
stageEditorEnterBlockNames: "Enter block names, <space>, <cancel>"
|
||||||
stageEditorBreakBlocksPrompt: "Enter break amounts (numbers), <space>, <cancel>"
|
stageEditorEnterBlockAmounts: "Enter block amounts, <space>, <cancel>"
|
||||||
stageEditorDamageBlocksPrompt: "Enter damage amounts (numbers), <space>, <cancel>"
|
stageEditorEnterBlockDurability: "Enter block durabilities (numbers), <space>, <cancel>"
|
||||||
stageEditorPlaceBlocksPrompt: "Enter place amounts (numbers), <space>, <cancel>"
|
|
||||||
stageEditorUseBlocksPrompt: "Enter use amounts (numbers), <space>, <cancel>"
|
|
||||||
stageEditorCutBlocksPrompt: "Enter cut amounts (numbers), <space>, <cancel>"
|
|
||||||
stageEditorEnterBlockDurability: "Enter block durability (numbers), <space>, <cancel>"
|
|
||||||
stageEditorCatchFishPrompt: "Enter number o' fish t' catch, <clear>, <cancel>"
|
stageEditorCatchFishPrompt: "Enter number o' fish t' catch, <clear>, <cancel>"
|
||||||
stageEditorKillPlayerPrompt: "Enter number o' players t' kill, <clear>, <cancel>"
|
stageEditorKillPlayerPrompt: "Enter number o' players t' kill, <clear>, <cancel>"
|
||||||
stageEditorEnchantTypePrompt: "Enter enchantment names, <semicolon>, <cancel>"
|
stageEditorEnchantTypePrompt: "Enter enchantment names, <semicolon>, <cancel>"
|
||||||
@ -601,16 +592,6 @@ timeZoneTitle: "- Time Zones -"
|
|||||||
enchantmentsTitle: "- Enchantments -"
|
enchantmentsTitle: "- Enchantments -"
|
||||||
questGUITitle: "- GUI Item Display -"
|
questGUITitle: "- GUI Item Display -"
|
||||||
questRegionTitle: "- Quest Region -"
|
questRegionTitle: "- Quest Region -"
|
||||||
effBlazeShoot: "Sound o' a Blaze firin'"
|
|
||||||
effBowFire: "Sound o' a bow firin'"
|
|
||||||
effClick1: "A click sound"
|
|
||||||
effClick2: "A different click sound"
|
|
||||||
effDoorToggle: "Sound o' a door openin' or closin'"
|
|
||||||
effExtinguish: "Sound o' fire bein' extinguished"
|
|
||||||
effGhastShoot: "Sound o' a Ghast firin'"
|
|
||||||
effGhastShriek: "Sound o' a Ghast shriekin'"
|
|
||||||
effZombieWood: "Sound o' a Zombie chewin' an iron door"
|
|
||||||
effZombieIron: "Sound o' a Zombie chewin' a wooden door"
|
|
||||||
effEnterName: "Enter an effect name t' add it t' th' list, <cancel>"
|
effEnterName: "Enter an effect name t' add it t' th' list, <cancel>"
|
||||||
cmdAdd: "add"
|
cmdAdd: "add"
|
||||||
strAdd: "then enter '<command>' t' include it"
|
strAdd: "then enter '<command>' t' include it"
|
||||||
|
@ -66,7 +66,6 @@ questEditorStages: "Edit Stages"
|
|||||||
questEditorRews: "Edit Rewards"
|
questEditorRews: "Edit Rewards"
|
||||||
questEditorOpts: "Edit Options"
|
questEditorOpts: "Edit Options"
|
||||||
questEditorEnterQuestName: "Enter Quest name (<cancel>)"
|
questEditorEnterQuestName: "Enter Quest name (<cancel>)"
|
||||||
questEditorEditEnterQuestName: "Enter Quest name to edit (<cancel>)"
|
|
||||||
questEditorEnterAskMessage: "Enter ask message (<cancel>)"
|
questEditorEnterAskMessage: "Enter ask message (<cancel>)"
|
||||||
questEditorEnterFinishMessage: "Enter finish message (<cancel>)"
|
questEditorEnterFinishMessage: "Enter finish message (<cancel>)"
|
||||||
questEditorEnterNPCStart: "Enter NPC ID, <clear>, <cancel>"
|
questEditorEnterNPCStart: "Enter NPC ID, <clear>, <cancel>"
|
||||||
@ -85,7 +84,7 @@ questPartiesInvite: "<player> can now perform quests with you!"
|
|||||||
questPartiesJoin: "You can now perform quests with <player>."
|
questPartiesJoin: "You can now perform quests with <player>."
|
||||||
questPartiesKicked: "<player> can no longer perform quests with you."
|
questPartiesKicked: "<player> can no longer perform quests with you."
|
||||||
questPartiesLeave: "You can no longer perform quests with <player>."
|
questPartiesLeave: "You can no longer perform quests with <player>."
|
||||||
questWGSetRegion: "Set Region"
|
questWGSetRegion: "Set Region start"
|
||||||
questWGPrompt: "Enter WorldGuard region, <clear>, <cancel>"
|
questWGPrompt: "Enter WorldGuard region, <clear>, <cancel>"
|
||||||
questWGInvalidRegion: "<region> is not a valid WorldGuard region!"
|
questWGInvalidRegion: "<region> is not a valid WorldGuard region!"
|
||||||
questWGRegionCleared: "Quest region cleared."
|
questWGRegionCleared: "Quest region cleared."
|
||||||
@ -165,10 +164,6 @@ stageEditorDelete: "Delete Stage"
|
|||||||
stageEditorSetBlockNames: "Set block names"
|
stageEditorSetBlockNames: "Set block names"
|
||||||
stageEditorSetBlockAmounts: "Set block amounts"
|
stageEditorSetBlockAmounts: "Set block amounts"
|
||||||
stageEditorSetBlockDurability: "Set block durability"
|
stageEditorSetBlockDurability: "Set block durability"
|
||||||
stageEditorSetDamageAmounts: "Set damage amounts"
|
|
||||||
stageEditorSetPlaceAmounts: "Set place amounts"
|
|
||||||
stageEditorSetUseAmounts: "Set use amounts"
|
|
||||||
stageEditorSetCutAmounts: "Set cut amounts"
|
|
||||||
stageEditorSetKillAmounts: "Set kill amounts"
|
stageEditorSetKillAmounts: "Set kill amounts"
|
||||||
stageEditorSetEnchantAmounts: "Set enchant amounts"
|
stageEditorSetEnchantAmounts: "Set enchant amounts"
|
||||||
stageEditorSetMobAmounts: "Set mob amounts"
|
stageEditorSetMobAmounts: "Set mob amounts"
|
||||||
@ -197,12 +192,8 @@ stageEditorCustomAlreadyAdded: "That custom objective has already been added!"
|
|||||||
stageEditorCustomCleared: "Custom objectives cleared."
|
stageEditorCustomCleared: "Custom objectives cleared."
|
||||||
stageEditorCustomDataPrompt: "Enter value for <data>:"
|
stageEditorCustomDataPrompt: "Enter value for <data>:"
|
||||||
stageEditorEnterBlockNames: "Enter block names, <space>, <cancel>"
|
stageEditorEnterBlockNames: "Enter block names, <space>, <cancel>"
|
||||||
stageEditorBreakBlocksPrompt: "Enter break amounts (numbers), <space>, <cancel>"
|
stageEditorEnterBlockAmounts: "Enter block amounts, <space>, <cancel>"
|
||||||
stageEditorDamageBlocksPrompt: "Enter damage amounts (numbers), <space>, <cancel>"
|
stageEditorEnterBlockDurability: "Enter block durabilities (numbers), <space>, <cancel>"
|
||||||
stageEditorPlaceBlocksPrompt: "Enter place amounts (numbers), <space>, <cancel>"
|
|
||||||
stageEditorUseBlocksPrompt: "Enter use amounts (numbers), <space>, <cancel>"
|
|
||||||
stageEditorCutBlocksPrompt: "Enter cut amounts (numbers), <space>, <cancel>"
|
|
||||||
stageEditorEnterBlockDurability: "Enter block durability (numbers), <space>, <cancel>"
|
|
||||||
stageEditorCatchFishPrompt: "Enter number of fish to catch, <clear>, <cancel>"
|
stageEditorCatchFishPrompt: "Enter number of fish to catch, <clear>, <cancel>"
|
||||||
stageEditorKillPlayerPrompt: "Enter number of players to kill, <clear>, <cancel>"
|
stageEditorKillPlayerPrompt: "Enter number of players to kill, <clear>, <cancel>"
|
||||||
stageEditorEnchantTypePrompt: "Enter enchantment names, <semicolon>, <cancel>"
|
stageEditorEnchantTypePrompt: "Enter enchantment names, <semicolon>, <cancel>"
|
||||||
@ -601,16 +592,6 @@ timeZoneTitle: "- Time Zones -"
|
|||||||
enchantmentsTitle: "- Enchantments -"
|
enchantmentsTitle: "- Enchantments -"
|
||||||
questGUITitle: "- GUI Item Display -"
|
questGUITitle: "- GUI Item Display -"
|
||||||
questRegionTitle: "- Quest Region -"
|
questRegionTitle: "- Quest Region -"
|
||||||
effBlazeShoot: "Sound of a Blaze firing"
|
|
||||||
effBowFire: "Sound of a bow firing"
|
|
||||||
effClick1: "A click sound"
|
|
||||||
effClick2: "A different click sound"
|
|
||||||
effDoorToggle: "Sound of a door opening or closing"
|
|
||||||
effExtinguish: "Sound of fire being extinguished"
|
|
||||||
effGhastShoot: "Sound of a Ghast firing"
|
|
||||||
effGhastShriek: "Sound of a Ghast shrieking"
|
|
||||||
effZombieWood: "Sound of a Zombie chewing an iron door"
|
|
||||||
effZombieIron: "Sound of a Zombie chewing a wooden door"
|
|
||||||
effEnterName: "Enter an effect name to add it to the list, <cancel>"
|
effEnterName: "Enter an effect name to add it to the list, <cancel>"
|
||||||
cmdAdd: "add"
|
cmdAdd: "add"
|
||||||
strAdd: "then enter '<command>' to include it"
|
strAdd: "then enter '<command>' to include it"
|
||||||
|
@ -66,7 +66,6 @@ questEditorStages: "Editar Etapas"
|
|||||||
questEditorRews: "Editar Premios"
|
questEditorRews: "Editar Premios"
|
||||||
questEditorOpts: "Editar Opciones"
|
questEditorOpts: "Editar Opciones"
|
||||||
questEditorEnterQuestName: "Tipea el nombre de Misión (<cancel>)"
|
questEditorEnterQuestName: "Tipea el nombre de Misión (<cancel>)"
|
||||||
questEditorEditEnterQuestName: "Escribe el nombre de Misión (<cancel>)"
|
|
||||||
questEditorEnterAskMessage: "Escribe el mensaje de inicio (<cancel>)"
|
questEditorEnterAskMessage: "Escribe el mensaje de inicio (<cancel>)"
|
||||||
questEditorEnterFinishMessage: "Escribe el mensaje final (<cancel>)"
|
questEditorEnterFinishMessage: "Escribe el mensaje final (<cancel>)"
|
||||||
questEditorEnterNPCStart: "Ingresa el ID del NPC, <clear>, <cancel>"
|
questEditorEnterNPCStart: "Ingresa el ID del NPC, <clear>, <cancel>"
|
||||||
@ -165,10 +164,6 @@ stageEditorDelete: "Borrar etapa"
|
|||||||
stageEditorSetBlockNames: "Establecer nombre de bloques"
|
stageEditorSetBlockNames: "Establecer nombre de bloques"
|
||||||
stageEditorSetBlockAmounts: "Establecer cantidad de bloques"
|
stageEditorSetBlockAmounts: "Establecer cantidad de bloques"
|
||||||
stageEditorSetBlockDurability: "Establecer la durabilidad del bloque"
|
stageEditorSetBlockDurability: "Establecer la durabilidad del bloque"
|
||||||
stageEditorSetDamageAmounts: "Establecer cantidad de daños"
|
|
||||||
stageEditorSetPlaceAmounts: "Colocar cantidad de lugares"
|
|
||||||
stageEditorSetUseAmounts: "Colocar cantidades de uso"
|
|
||||||
stageEditorSetCutAmounts: "Colocar cantidades de corte"
|
|
||||||
stageEditorSetKillAmounts: "Colocar cantidades de muerte"
|
stageEditorSetKillAmounts: "Colocar cantidades de muerte"
|
||||||
stageEditorSetEnchantAmounts: "Colocar cantidades de encantamiento"
|
stageEditorSetEnchantAmounts: "Colocar cantidades de encantamiento"
|
||||||
stageEditorSetMobAmounts: "Establecer cantidad de mobs"
|
stageEditorSetMobAmounts: "Establecer cantidad de mobs"
|
||||||
@ -197,11 +192,7 @@ stageEditorCustomAlreadyAdded: "¡Ese objetivo personalizado ya ha sido añadido
|
|||||||
stageEditorCustomCleared: "Objetivos personalizados borrados."
|
stageEditorCustomCleared: "Objetivos personalizados borrados."
|
||||||
stageEditorCustomDataPrompt: "Introduzca el valor para <data>:"
|
stageEditorCustomDataPrompt: "Introduzca el valor para <data>:"
|
||||||
stageEditorEnterBlockNames: "Introduce nombres de bloques, <space>, <cancel>"
|
stageEditorEnterBlockNames: "Introduce nombres de bloques, <space>, <cancel>"
|
||||||
stageEditorBreakBlocksPrompt: "Introduzca cantidad de bloques (números), <space>, <cancel>"
|
stageEditorEnterBlockAmounts: "Enter block amounts, <space>, <cancel>"
|
||||||
stageEditorDamageBlocksPrompt: "Introduzca cantidad de daños (números), <space>, <cancel>"
|
|
||||||
stageEditorPlaceBlocksPrompt: "Introduzca cantidad de lugares (números), <space>, <cancel>"
|
|
||||||
stageEditorUseBlocksPrompt: "Introduzca cantidad de usos (números), <space>, <cancel>"
|
|
||||||
stageEditorCutBlocksPrompt: "Introduzca cantidad de cortes (números), <space>, <cancel>"
|
|
||||||
stageEditorEnterBlockDurability: "Introduzca la durabilidad del bloque (números), <space>, <cancel>"
|
stageEditorEnterBlockDurability: "Introduzca la durabilidad del bloque (números), <space>, <cancel>"
|
||||||
stageEditorCatchFishPrompt: "Introduzca número de peces para atrapar, <clear>, <cancel>"
|
stageEditorCatchFishPrompt: "Introduzca número de peces para atrapar, <clear>, <cancel>"
|
||||||
stageEditorKillPlayerPrompt: "Introduzca números de jugadores para matar, <clear>, <cancel>"
|
stageEditorKillPlayerPrompt: "Introduzca números de jugadores para matar, <clear>, <cancel>"
|
||||||
@ -601,16 +592,6 @@ timeZoneTitle: "- Zona Horaria -"
|
|||||||
enchantmentsTitle: "- Encantamientos -"
|
enchantmentsTitle: "- Encantamientos -"
|
||||||
questGUITitle: "- GUI Mostrar Ítem -"
|
questGUITitle: "- GUI Mostrar Ítem -"
|
||||||
questRegionTitle: "- Región de la Misión -"
|
questRegionTitle: "- Región de la Misión -"
|
||||||
effBlazeShoot: "Sonido de un disparo de Blaze"
|
|
||||||
effBowFire: "Sonido de un arco que dispara"
|
|
||||||
effClick1: "Un solido de clic"
|
|
||||||
effClick2: "Un diferente sonido de clic"
|
|
||||||
effDoorToggle: "Sonido de una puerta abriendose y cerrandose"
|
|
||||||
effExtinguish: "Sonido de fuego siendo extinguido"
|
|
||||||
effGhastShoot: "Sonido de un tiroteo de Ghast"
|
|
||||||
effGhastShriek: "Sonido de un grito Ghast"
|
|
||||||
effZombieWood: "Sonido de un Zombie masticando una puerta de hierro"
|
|
||||||
effZombieIron: "Sonido de un Zombie masticando una puerta de madera"
|
|
||||||
effEnterName: "Introduzca un nombre de efecto para añadir a la lista, <cancel>"
|
effEnterName: "Introduzca un nombre de efecto para añadir a la lista, <cancel>"
|
||||||
cmdAdd: "añadir"
|
cmdAdd: "añadir"
|
||||||
strAdd: "luego ingresa '<command>' para incluirlo"
|
strAdd: "luego ingresa '<command>' para incluirlo"
|
||||||
|
@ -65,10 +65,9 @@ questEditorPln: "Muuda Planeerijat"
|
|||||||
questEditorStages: "Edit Stages"
|
questEditorStages: "Edit Stages"
|
||||||
questEditorRews: "Regigeeri auhinud"
|
questEditorRews: "Regigeeri auhinud"
|
||||||
questEditorOpts: "Muuda Valikuid"
|
questEditorOpts: "Muuda Valikuid"
|
||||||
questEditorEnterQuestName: "Enter Quest name (<cancel>)"
|
questEditorEnterQuestName: "Enter Quest name, <cancel>"
|
||||||
questEditorEditEnterQuestName: "Enter Quest name to edit (<cancel>)"
|
questEditorEnterAskMessage: "Enter ask message, <cancel>"
|
||||||
questEditorEnterAskMessage: "Enter ask message (<cancel>)"
|
questEditorEnterFinishMessage: "Enter finish message, <cancel>"
|
||||||
questEditorEnterFinishMessage: "Enter finish message (<cancel>)"
|
|
||||||
questEditorEnterNPCStart: "Enter NPC ID, <clear>, <cancel>"
|
questEditorEnterNPCStart: "Enter NPC ID, <clear>, <cancel>"
|
||||||
questEditorEnterBlockStart: "Right-click on a block to use as a start point, <done>, <clear>, <cancel>"
|
questEditorEnterBlockStart: "Right-click on a block to use as a start point, <done>, <clear>, <cancel>"
|
||||||
questEditorEnterInitialEvent: "Enter an Action name, <clear>, <cancel>"
|
questEditorEnterInitialEvent: "Enter an Action name, <clear>, <cancel>"
|
||||||
@ -85,7 +84,7 @@ questPartiesInvite: "<player> can now perform quests with you!"
|
|||||||
questPartiesJoin: "You can now perform quests with <player>."
|
questPartiesJoin: "You can now perform quests with <player>."
|
||||||
questPartiesKicked: "<player> can no longer perform quests with you."
|
questPartiesKicked: "<player> can no longer perform quests with you."
|
||||||
questPartiesLeave: "You can no longer perform quests with <player>."
|
questPartiesLeave: "You can no longer perform quests with <player>."
|
||||||
questWGSetRegion: "Set Region"
|
questWGSetRegion: "Set Region start"
|
||||||
questWGPrompt: "Enter WorldGuard region, <clear>, <cancel>"
|
questWGPrompt: "Enter WorldGuard region, <clear>, <cancel>"
|
||||||
questWGInvalidRegion: "<region> is not a valid WorldGuard region!"
|
questWGInvalidRegion: "<region> is not a valid WorldGuard region!"
|
||||||
questWGRegionCleared: "Quest region cleared."
|
questWGRegionCleared: "Quest region cleared."
|
||||||
@ -164,11 +163,7 @@ stageEditorCompleteMessage: "Complete message"
|
|||||||
stageEditorDelete: "Delete Stage"
|
stageEditorDelete: "Delete Stage"
|
||||||
stageEditorSetBlockNames: "Set block names"
|
stageEditorSetBlockNames: "Set block names"
|
||||||
stageEditorSetBlockAmounts: "Set block amounts"
|
stageEditorSetBlockAmounts: "Set block amounts"
|
||||||
stageEditorSetBlockDurability: "Set block durability"
|
stageEditorSetBlockDurability: "Set block durabilities"
|
||||||
stageEditorSetDamageAmounts: "Set damage amounts"
|
|
||||||
stageEditorSetPlaceAmounts: "Set place amounts"
|
|
||||||
stageEditorSetUseAmounts: "Set use amounts"
|
|
||||||
stageEditorSetCutAmounts: "Set cut amounts"
|
|
||||||
stageEditorSetKillAmounts: "Set kill amounts"
|
stageEditorSetKillAmounts: "Set kill amounts"
|
||||||
stageEditorSetEnchantAmounts: "Set enchant amounts"
|
stageEditorSetEnchantAmounts: "Set enchant amounts"
|
||||||
stageEditorSetMobAmounts: "Määra elukate hulgad"
|
stageEditorSetMobAmounts: "Määra elukate hulgad"
|
||||||
@ -197,12 +192,8 @@ stageEditorCustomAlreadyAdded: "That custom objective has already been added!"
|
|||||||
stageEditorCustomCleared: "Custom objectives cleared."
|
stageEditorCustomCleared: "Custom objectives cleared."
|
||||||
stageEditorCustomDataPrompt: "Enter value for <data>:"
|
stageEditorCustomDataPrompt: "Enter value for <data>:"
|
||||||
stageEditorEnterBlockNames: "Enter block names, <space>, <cancel>"
|
stageEditorEnterBlockNames: "Enter block names, <space>, <cancel>"
|
||||||
stageEditorBreakBlocksPrompt: "Enter break amounts (numbers), <space>, <cancel>"
|
stageEditorEnterBlockAmounts: "Enter block amounts, <space>, <cancel>"
|
||||||
stageEditorDamageBlocksPrompt: "Enter damage amounts (numbers), <space>, <cancel>"
|
stageEditorEnterBlockDurability: "Enter block durabilities (numbers), <space>, <cancel>"
|
||||||
stageEditorPlaceBlocksPrompt: "Enter place amounts (numbers), <space>, <cancel>"
|
|
||||||
stageEditorUseBlocksPrompt: "Enter use amounts (numbers), <space>, <cancel>"
|
|
||||||
stageEditorCutBlocksPrompt: "Enter cut amounts (numbers), <space>, <cancel>"
|
|
||||||
stageEditorEnterBlockDurability: "Enter block durability (numbers), <space>, <cancel>"
|
|
||||||
stageEditorCatchFishPrompt: "Enter number of fish to catch, <clear>, <cancel>"
|
stageEditorCatchFishPrompt: "Enter number of fish to catch, <clear>, <cancel>"
|
||||||
stageEditorKillPlayerPrompt: "Enter number of players to kill, <clear>, <cancel>"
|
stageEditorKillPlayerPrompt: "Enter number of players to kill, <clear>, <cancel>"
|
||||||
stageEditorEnchantTypePrompt: "Enter enchantment names, <semicolon>, <cancel>"
|
stageEditorEnchantTypePrompt: "Enter enchantment names, <semicolon>, <cancel>"
|
||||||
@ -601,16 +592,6 @@ timeZoneTitle: "- Ajavööndid -"
|
|||||||
enchantmentsTitle: "- Loitsud -"
|
enchantmentsTitle: "- Loitsud -"
|
||||||
questGUITitle: "- GUI Item Display -"
|
questGUITitle: "- GUI Item Display -"
|
||||||
questRegionTitle: "- Quest Region -"
|
questRegionTitle: "- Quest Region -"
|
||||||
effBlazeShoot: "Sound of a Blaze firing"
|
|
||||||
effBowFire: "Sound of a bow firing"
|
|
||||||
effClick1: "A click sound"
|
|
||||||
effClick2: "A different click sound"
|
|
||||||
effDoorToggle: "Sound of a door opening or closing"
|
|
||||||
effExtinguish: "Sound of fire being extinguished"
|
|
||||||
effGhastShoot: "Sound of a Ghast firing"
|
|
||||||
effGhastShriek: "Sound of a Ghast shrieking"
|
|
||||||
effZombieWood: "Sound of a Zombie chewing an iron door"
|
|
||||||
effZombieIron: "Sound of a Zombie chewing a wooden door"
|
|
||||||
effEnterName: "Enter an effect name to add it to the list, <cancel>"
|
effEnterName: "Enter an effect name to add it to the list, <cancel>"
|
||||||
cmdAdd: "lisa"
|
cmdAdd: "lisa"
|
||||||
strAdd: "then enter '<command>' to include it"
|
strAdd: "then enter '<command>' to include it"
|
||||||
|
@ -66,7 +66,6 @@ questEditorStages: "Muokkaa tasoja"
|
|||||||
questEditorRews: "Muokkaa palkintoja"
|
questEditorRews: "Muokkaa palkintoja"
|
||||||
questEditorOpts: "Edit Options"
|
questEditorOpts: "Edit Options"
|
||||||
questEditorEnterQuestName: "Syötä tehtävän nimi (<cancel>)"
|
questEditorEnterQuestName: "Syötä tehtävän nimi (<cancel>)"
|
||||||
questEditorEditEnterQuestName: "Syötä tehtävän nimi muokataksesi (<cancel>)"
|
|
||||||
questEditorEnterAskMessage: "Syötä alkukysymys (<cancel>)"
|
questEditorEnterAskMessage: "Syötä alkukysymys (<cancel>)"
|
||||||
questEditorEnterFinishMessage: "Syötä lopetusviesti (<cancel>)"
|
questEditorEnterFinishMessage: "Syötä lopetusviesti (<cancel>)"
|
||||||
questEditorEnterNPCStart: "Enter NPC ID, <clear>, <cancel>"
|
questEditorEnterNPCStart: "Enter NPC ID, <clear>, <cancel>"
|
||||||
@ -165,10 +164,6 @@ stageEditorDelete: "Poista taso"
|
|||||||
stageEditorSetBlockNames: "Aseta palikan nimi"
|
stageEditorSetBlockNames: "Aseta palikan nimi"
|
||||||
stageEditorSetBlockAmounts: "Aseta palikoiden määrä"
|
stageEditorSetBlockAmounts: "Aseta palikoiden määrä"
|
||||||
stageEditorSetBlockDurability: "Aseta palikan kestävyys"
|
stageEditorSetBlockDurability: "Aseta palikan kestävyys"
|
||||||
stageEditorSetDamageAmounts: "Aseta vahingoitettavien määrä"
|
|
||||||
stageEditorSetPlaceAmounts: "Aseta asetettavien määrä"
|
|
||||||
stageEditorSetUseAmounts: "Aseta käyttämisen määrä"
|
|
||||||
stageEditorSetCutAmounts: "Aseta leikkaamisen määrä"
|
|
||||||
stageEditorSetKillAmounts: "Aseta tappojen määrä"
|
stageEditorSetKillAmounts: "Aseta tappojen määrä"
|
||||||
stageEditorSetEnchantAmounts: "Aseta lumousten määrä"
|
stageEditorSetEnchantAmounts: "Aseta lumousten määrä"
|
||||||
stageEditorSetMobAmounts: "Aseta olentojen määrä"
|
stageEditorSetMobAmounts: "Aseta olentojen määrä"
|
||||||
@ -197,11 +192,7 @@ stageEditorCustomAlreadyAdded: "That custom objective has already been added!"
|
|||||||
stageEditorCustomCleared: "Custom objectives cleared."
|
stageEditorCustomCleared: "Custom objectives cleared."
|
||||||
stageEditorCustomDataPrompt: "Enter value for <data>:"
|
stageEditorCustomDataPrompt: "Enter value for <data>:"
|
||||||
stageEditorEnterBlockNames: "Enter block names, <space>, <cancel>"
|
stageEditorEnterBlockNames: "Enter block names, <space>, <cancel>"
|
||||||
stageEditorBreakBlocksPrompt: "Enter break amounts (numbers), <space>, <cancel>"
|
stageEditorEnterBlockAmounts: "Enter block amounts, <space>, <cancel>"
|
||||||
stageEditorDamageBlocksPrompt: "Enter damage amounts (numbers), <space>, <cancel>"
|
|
||||||
stageEditorPlaceBlocksPrompt: "Enter place amounts (numbers), <space>, <cancel>"
|
|
||||||
stageEditorUseBlocksPrompt: "Enter use amounts (numbers), <space>, <cancel>"
|
|
||||||
stageEditorCutBlocksPrompt: "Enter cut amounts (numbers), <space>, <cancel>"
|
|
||||||
stageEditorEnterBlockDurability: "Enter block durability (numbers), <space>, <cancel>"
|
stageEditorEnterBlockDurability: "Enter block durability (numbers), <space>, <cancel>"
|
||||||
stageEditorCatchFishPrompt: "Enter number of fish to catch, <clear>, <cancel>"
|
stageEditorCatchFishPrompt: "Enter number of fish to catch, <clear>, <cancel>"
|
||||||
stageEditorKillPlayerPrompt: "Enter number of players to kill, <clear>, <cancel>"
|
stageEditorKillPlayerPrompt: "Enter number of players to kill, <clear>, <cancel>"
|
||||||
@ -601,16 +592,6 @@ timeZoneTitle: "- Time Zones -"
|
|||||||
enchantmentsTitle: "- Enchantments -"
|
enchantmentsTitle: "- Enchantments -"
|
||||||
questGUITitle: "- GUI Item Display -"
|
questGUITitle: "- GUI Item Display -"
|
||||||
questRegionTitle: "- Quest Region -"
|
questRegionTitle: "- Quest Region -"
|
||||||
effBlazeShoot: "Sound of a Blaze firing"
|
|
||||||
effBowFire: "Sound of a bow firing"
|
|
||||||
effClick1: "A click sound"
|
|
||||||
effClick2: "A different click sound"
|
|
||||||
effDoorToggle: "Sound of a door opening or closing"
|
|
||||||
effExtinguish: "Sound of fire being extinguished"
|
|
||||||
effGhastShoot: "Sound of a Ghast firing"
|
|
||||||
effGhastShriek: "Sound of a Ghast shrieking"
|
|
||||||
effZombieWood: "Sound of a Zombie chewing an iron door"
|
|
||||||
effZombieIron: "Sound of a Zombie chewing a wooden door"
|
|
||||||
effEnterName: "Enter an effect name to add it to the list, <cancel>"
|
effEnterName: "Enter an effect name to add it to the list, <cancel>"
|
||||||
cmdAdd: "add"
|
cmdAdd: "add"
|
||||||
strAdd: "then enter '<command>' to include it"
|
strAdd: "then enter '<command>' to include it"
|
||||||
|
@ -66,7 +66,6 @@ questEditorStages: "I-edit ang Yugto"
|
|||||||
questEditorRews: "I-edit ang Gantimpala"
|
questEditorRews: "I-edit ang Gantimpala"
|
||||||
questEditorOpts: "I-edit ang Opsyon"
|
questEditorOpts: "I-edit ang Opsyon"
|
||||||
questEditorEnterQuestName: "Ilagay ang pangalan ng Pagsusulit (<cancel>)"
|
questEditorEnterQuestName: "Ilagay ang pangalan ng Pagsusulit (<cancel>)"
|
||||||
questEditorEditEnterQuestName: "Ilagay ang pangalan para i-edit (<cancel>)"
|
|
||||||
questEditorEnterAskMessage: "Ilagay ang may katanungang mensahe (<cancel>)"
|
questEditorEnterAskMessage: "Ilagay ang may katanungang mensahe (<cancel>)"
|
||||||
questEditorEnterFinishMessage: "Ilagay ang tapos na mensahe (<cancel>)"
|
questEditorEnterFinishMessage: "Ilagay ang tapos na mensahe (<cancel>)"
|
||||||
questEditorEnterNPCStart: "Ilagay ang NPC ID, <clear>, <cancel>"
|
questEditorEnterNPCStart: "Ilagay ang NPC ID, <clear>, <cancel>"
|
||||||
@ -165,10 +164,6 @@ stageEditorDelete: "Buradong Yugto"
|
|||||||
stageEditorSetBlockNames: "Maglagay ng Harangan ng pangalan"
|
stageEditorSetBlockNames: "Maglagay ng Harangan ng pangalan"
|
||||||
stageEditorSetBlockAmounts: "Maglagay ng Harangang halaga"
|
stageEditorSetBlockAmounts: "Maglagay ng Harangang halaga"
|
||||||
stageEditorSetBlockDurability: "Maglagay ng harang ng tibay"
|
stageEditorSetBlockDurability: "Maglagay ng harang ng tibay"
|
||||||
stageEditorSetDamageAmounts: "Maglagay ng halaga ng pinsala"
|
|
||||||
stageEditorSetPlaceAmounts: "Maglagay ng halaga ng lugar"
|
|
||||||
stageEditorSetUseAmounts: "Maglagay ng magagamit na halaga"
|
|
||||||
stageEditorSetCutAmounts: "Maglagay ng hating halaga"
|
|
||||||
stageEditorSetKillAmounts: "Maglagay ng halaga ng patay"
|
stageEditorSetKillAmounts: "Maglagay ng halaga ng patay"
|
||||||
stageEditorSetEnchantAmounts: "Maglagay ng halaga ng gayuma"
|
stageEditorSetEnchantAmounts: "Maglagay ng halaga ng gayuma"
|
||||||
stageEditorSetMobAmounts: "Maglagay ng halaga ng mob"
|
stageEditorSetMobAmounts: "Maglagay ng halaga ng mob"
|
||||||
@ -197,11 +192,7 @@ stageEditorCustomAlreadyAdded: "Ang kasuotan na may layunin ay nailagay na!"
|
|||||||
stageEditorCustomCleared: "Kasuotan na may layunin ay malinis na."
|
stageEditorCustomCleared: "Kasuotan na may layunin ay malinis na."
|
||||||
stageEditorCustomDataPrompt: "Ilagay ang halaga ng <data>:"
|
stageEditorCustomDataPrompt: "Ilagay ang halaga ng <data>:"
|
||||||
stageEditorEnterBlockNames: "Ilagay ang harang na pangalan, <space>, <cancel>"
|
stageEditorEnterBlockNames: "Ilagay ang harang na pangalan, <space>, <cancel>"
|
||||||
stageEditorBreakBlocksPrompt: "Pindutin at sirain ang halaga (numbers), <space>, <cancel>"
|
stageEditorEnterBlockAmounts: "Enter block amounts, <space>, <cancel>"
|
||||||
stageEditorDamageBlocksPrompt: "Pindutin at sirain ang halaga (numbers), <space>, <cancel>"
|
|
||||||
stageEditorPlaceBlocksPrompt: "Pindutin at sirain ang halaga (numbers), <space>, <cancel>"
|
|
||||||
stageEditorUseBlocksPrompt: "Pindutin at sirain ang halaga (numbers), <space>, <cancel>"
|
|
||||||
stageEditorCutBlocksPrompt: "Pindutin at sirain ang halaga (numbers), <space>, <cancel>"
|
|
||||||
stageEditorEnterBlockDurability: "Pindutin at sirain ang halaga (numbers), <space>, <cancel>"
|
stageEditorEnterBlockDurability: "Pindutin at sirain ang halaga (numbers), <space>, <cancel>"
|
||||||
stageEditorCatchFishPrompt: "Pindutin ang bilang ng mga isdang nahuli, <clear>, <cancel>"
|
stageEditorCatchFishPrompt: "Pindutin ang bilang ng mga isdang nahuli, <clear>, <cancel>"
|
||||||
stageEditorKillPlayerPrompt: "Pindutin ang bilang ng mga isdang nahuli, <clear>, <cancel>"
|
stageEditorKillPlayerPrompt: "Pindutin ang bilang ng mga isdang nahuli, <clear>, <cancel>"
|
||||||
@ -601,16 +592,6 @@ timeZoneTitle: "- Time Zones -"
|
|||||||
enchantmentsTitle: "- Pagkaakit -"
|
enchantmentsTitle: "- Pagkaakit -"
|
||||||
questGUITitle: "- Ang Paglarawan sa Gamit ng GUI -"
|
questGUITitle: "- Ang Paglarawan sa Gamit ng GUI -"
|
||||||
questRegionTitle: "- Ang Rehiyon ng Pagsusulit -"
|
questRegionTitle: "- Ang Rehiyon ng Pagsusulit -"
|
||||||
effBlazeShoot: "Tunog nang Blaze na apoy"
|
|
||||||
effBowFire: "Tunog ng mababang apoy"
|
|
||||||
effClick1: "Pindutin ang tunog"
|
|
||||||
effClick2: "Ibat ibang uri ng pagpindut ng tunog"
|
|
||||||
effDoorToggle: "Tunog ng nagbubukas at nagsasaradong pinto"
|
|
||||||
effExtinguish: "Ang tunog ng apoy ay namatay na"
|
|
||||||
effGhastShoot: "Ang tunog ng pagpapaputok ng Ghast"
|
|
||||||
effGhastShriek: "Ang tunog ng Ghast shrieking"
|
|
||||||
effZombieWood: "Ang tunog ng Zombie na ngumunguya ng bakal na pinto"
|
|
||||||
effZombieIron: "Ang tunog ng Zombie na ngumunguya ng kahoy na pintuan"
|
|
||||||
effEnterName: "Ilagay ang pangalan ng epekto para idagdag ito sa listahan, <cancel>"
|
effEnterName: "Ilagay ang pangalan ng epekto para idagdag ito sa listahan, <cancel>"
|
||||||
cmdAdd: "magdagdag"
|
cmdAdd: "magdagdag"
|
||||||
strAdd: "pagkatapos ay ipasok ang '<command>' upang isama ito"
|
strAdd: "pagkatapos ay ipasok ang '<command>' upang isama ito"
|
||||||
|
@ -66,7 +66,6 @@ questEditorStages: "Modifier les étapes"
|
|||||||
questEditorRews: "Éditer les récompenses"
|
questEditorRews: "Éditer les récompenses"
|
||||||
questEditorOpts: "Modifier les Paramètres"
|
questEditorOpts: "Modifier les Paramètres"
|
||||||
questEditorEnterQuestName: "Entrée le nom de la quête (<cancel>)"
|
questEditorEnterQuestName: "Entrée le nom de la quête (<cancel>)"
|
||||||
questEditorEditEnterQuestName: "Entrée le nom de la quête pour la changer (<cancel>)"
|
|
||||||
questEditorEnterAskMessage: "Définir le message de demande (<cancel>)"
|
questEditorEnterAskMessage: "Définir le message de demande (<cancel>)"
|
||||||
questEditorEnterFinishMessage: "Entrée le message final de la quête (<cancel>)"
|
questEditorEnterFinishMessage: "Entrée le message final de la quête (<cancel>)"
|
||||||
questEditorEnterNPCStart: "Entrez l'ID du NPC, <clear>, <cancel>"
|
questEditorEnterNPCStart: "Entrez l'ID du NPC, <clear>, <cancel>"
|
||||||
@ -165,10 +164,6 @@ stageEditorDelete: "Supprimer l'étape"
|
|||||||
stageEditorSetBlockNames: "Défini les noms des blocs"
|
stageEditorSetBlockNames: "Défini les noms des blocs"
|
||||||
stageEditorSetBlockAmounts: "Défini le nombre de blocs"
|
stageEditorSetBlockAmounts: "Défini le nombre de blocs"
|
||||||
stageEditorSetBlockDurability: "Défini la durabilité du bloc"
|
stageEditorSetBlockDurability: "Défini la durabilité du bloc"
|
||||||
stageEditorSetDamageAmounts: "Définit le nombre de dégats"
|
|
||||||
stageEditorSetPlaceAmounts: "Définir le nombre de placements"
|
|
||||||
stageEditorSetUseAmounts: "Définir le nombre d'utilisation"
|
|
||||||
stageEditorSetCutAmounts: "Définir la quantité de coupe"
|
|
||||||
stageEditorSetKillAmounts: "Définir le nombre de mort"
|
stageEditorSetKillAmounts: "Définir le nombre de mort"
|
||||||
stageEditorSetEnchantAmounts: "Définir le nombre enchantements"
|
stageEditorSetEnchantAmounts: "Définir le nombre enchantements"
|
||||||
stageEditorSetMobAmounts: "Définir le nombre de monstres"
|
stageEditorSetMobAmounts: "Définir le nombre de monstres"
|
||||||
@ -197,11 +192,7 @@ stageEditorCustomAlreadyAdded: "Cet objectif customisé a déjà été ajouté !
|
|||||||
stageEditorCustomCleared: "Objectifs personnalisés effacés."
|
stageEditorCustomCleared: "Objectifs personnalisés effacés."
|
||||||
stageEditorCustomDataPrompt: "Entrez la valeur pour <data> :"
|
stageEditorCustomDataPrompt: "Entrez la valeur pour <data> :"
|
||||||
stageEditorEnterBlockNames: "Entrez les noms de blocs, <space>, <cancel>"
|
stageEditorEnterBlockNames: "Entrez les noms de blocs, <space>, <cancel>"
|
||||||
stageEditorBreakBlocksPrompt: "Entrez les montants de rupture (nombres), <space>, <cancel>"
|
stageEditorEnterBlockAmounts: "Enter block amounts, <space>, <cancel>"
|
||||||
stageEditorDamageBlocksPrompt: "Entrez les montants des dommages (nombres), <space>, <cancel>"
|
|
||||||
stageEditorPlaceBlocksPrompt: "Entrez les montants à placer (nombres), <space>, <cancel>"
|
|
||||||
stageEditorUseBlocksPrompt: "Entrez les montants d'utilisation (nombres), <space>, <cancel>"
|
|
||||||
stageEditorCutBlocksPrompt: "Entrez les montants coupés (nombres), <space>, <cancel>"
|
|
||||||
stageEditorEnterBlockDurability: "Entrez la durabilité du bloc (nombres), <space>, <cancel>"
|
stageEditorEnterBlockDurability: "Entrez la durabilité du bloc (nombres), <space>, <cancel>"
|
||||||
stageEditorCatchFishPrompt: "Entrez le nombre de poisson à pêcher, <clear>, <cancel>"
|
stageEditorCatchFishPrompt: "Entrez le nombre de poisson à pêcher, <clear>, <cancel>"
|
||||||
stageEditorKillPlayerPrompt: "Entrez le nombre de joueurs à tuer, <clear>, <cancel>"
|
stageEditorKillPlayerPrompt: "Entrez le nombre de joueurs à tuer, <clear>, <cancel>"
|
||||||
@ -601,16 +592,6 @@ timeZoneTitle: "- Fuseaux Horaires -"
|
|||||||
enchantmentsTitle: "- Enchantements -"
|
enchantmentsTitle: "- Enchantements -"
|
||||||
questGUITitle: "- Choisir le Bloc de L'interface -"
|
questGUITitle: "- Choisir le Bloc de L'interface -"
|
||||||
questRegionTitle: "- Région de la quête -"
|
questRegionTitle: "- Région de la quête -"
|
||||||
effBlazeShoot: "Bruit d’un tir de Blaze"
|
|
||||||
effBowFire: "Bruit d’un tir à l’arc"
|
|
||||||
effClick1: "Un bruit de clic"
|
|
||||||
effClick2: "Un son de clic différent"
|
|
||||||
effDoorToggle: "Bruit d'une porte qui s'ouvre ou qui se ferme"
|
|
||||||
effExtinguish: "Son de feu étant éteint"
|
|
||||||
effGhastShoot: "Bruit d’un tir de Ghast"
|
|
||||||
effGhastShriek: "Bruit d’un Ghast hurlant"
|
|
||||||
effZombieWood: "Bruit d’un Zombie à mâcher une porte de fer"
|
|
||||||
effZombieIron: "Bruit d’un Zombie à mâcher une porte en bois"
|
|
||||||
effEnterName: "Entrez un nom de l’effet à ajouter à la liste, <cancel>"
|
effEnterName: "Entrez un nom de l’effet à ajouter à la liste, <cancel>"
|
||||||
cmdAdd: "ajouter"
|
cmdAdd: "ajouter"
|
||||||
strAdd: "puis entrez « <command> » inscrire"
|
strAdd: "puis entrez « <command> » inscrire"
|
||||||
|
@ -66,7 +66,6 @@ questEditorStages: "Edit Stages"
|
|||||||
questEditorRews: "Edit Rewards"
|
questEditorRews: "Edit Rewards"
|
||||||
questEditorOpts: "Edit Options"
|
questEditorOpts: "Edit Options"
|
||||||
questEditorEnterQuestName: "Enter Quest name (<cancel>)"
|
questEditorEnterQuestName: "Enter Quest name (<cancel>)"
|
||||||
questEditorEditEnterQuestName: "Enter Quest name to edit (<cancel>)"
|
|
||||||
questEditorEnterAskMessage: "Enter ask message (<cancel>)"
|
questEditorEnterAskMessage: "Enter ask message (<cancel>)"
|
||||||
questEditorEnterFinishMessage: "Enter finish message (<cancel>)"
|
questEditorEnterFinishMessage: "Enter finish message (<cancel>)"
|
||||||
questEditorEnterNPCStart: "Enter NPC ID, <clear>, <cancel>"
|
questEditorEnterNPCStart: "Enter NPC ID, <clear>, <cancel>"
|
||||||
@ -165,10 +164,6 @@ stageEditorDelete: "Delete Stage"
|
|||||||
stageEditorSetBlockNames: "Set block names"
|
stageEditorSetBlockNames: "Set block names"
|
||||||
stageEditorSetBlockAmounts: "Set block amounts"
|
stageEditorSetBlockAmounts: "Set block amounts"
|
||||||
stageEditorSetBlockDurability: "Set block durability"
|
stageEditorSetBlockDurability: "Set block durability"
|
||||||
stageEditorSetDamageAmounts: "Set damage amounts"
|
|
||||||
stageEditorSetPlaceAmounts: "Set place amounts"
|
|
||||||
stageEditorSetUseAmounts: "Set use amounts"
|
|
||||||
stageEditorSetCutAmounts: "Set cut amounts"
|
|
||||||
stageEditorSetKillAmounts: "Set kill amounts"
|
stageEditorSetKillAmounts: "Set kill amounts"
|
||||||
stageEditorSetEnchantAmounts: "Set enchant amounts"
|
stageEditorSetEnchantAmounts: "Set enchant amounts"
|
||||||
stageEditorSetMobAmounts: "Set mob amounts"
|
stageEditorSetMobAmounts: "Set mob amounts"
|
||||||
@ -197,11 +192,7 @@ stageEditorCustomAlreadyAdded: "That custom objective has already been added!"
|
|||||||
stageEditorCustomCleared: "Custom objectives cleared."
|
stageEditorCustomCleared: "Custom objectives cleared."
|
||||||
stageEditorCustomDataPrompt: "Enter value for <data>:"
|
stageEditorCustomDataPrompt: "Enter value for <data>:"
|
||||||
stageEditorEnterBlockNames: "Enter block names, <space>, <cancel>"
|
stageEditorEnterBlockNames: "Enter block names, <space>, <cancel>"
|
||||||
stageEditorBreakBlocksPrompt: "Enter break amounts (numbers), <space>, <cancel>"
|
stageEditorEnterBlockAmounts: "Enter block amounts, <space>, <cancel>"
|
||||||
stageEditorDamageBlocksPrompt: "Enter damage amounts (numbers), <space>, <cancel>"
|
|
||||||
stageEditorPlaceBlocksPrompt: "Enter place amounts (numbers), <space>, <cancel>"
|
|
||||||
stageEditorUseBlocksPrompt: "Enter use amounts (numbers), <space>, <cancel>"
|
|
||||||
stageEditorCutBlocksPrompt: "Enter cut amounts (numbers), <space>, <cancel>"
|
|
||||||
stageEditorEnterBlockDurability: "Enter block durability (numbers), <space>, <cancel>"
|
stageEditorEnterBlockDurability: "Enter block durability (numbers), <space>, <cancel>"
|
||||||
stageEditorCatchFishPrompt: "Enter number of fish to catch, <clear>, <cancel>"
|
stageEditorCatchFishPrompt: "Enter number of fish to catch, <clear>, <cancel>"
|
||||||
stageEditorKillPlayerPrompt: "Enter number of players to kill, <clear>, <cancel>"
|
stageEditorKillPlayerPrompt: "Enter number of players to kill, <clear>, <cancel>"
|
||||||
@ -601,16 +592,6 @@ timeZoneTitle: "- Time Zones -"
|
|||||||
enchantmentsTitle: "- Enchantments -"
|
enchantmentsTitle: "- Enchantments -"
|
||||||
questGUITitle: "- GUI Item Display -"
|
questGUITitle: "- GUI Item Display -"
|
||||||
questRegionTitle: "- Quest Region -"
|
questRegionTitle: "- Quest Region -"
|
||||||
effBlazeShoot: "Sound of a Blaze firing"
|
|
||||||
effBowFire: "Sound of a bow firing"
|
|
||||||
effClick1: "A click sound"
|
|
||||||
effClick2: "A different click sound"
|
|
||||||
effDoorToggle: "Sound of a door opening or closing"
|
|
||||||
effExtinguish: "Sound of fire being extinguished"
|
|
||||||
effGhastShoot: "Sound of a Ghast firing"
|
|
||||||
effGhastShriek: "Sound of a Ghast shrieking"
|
|
||||||
effZombieWood: "Sound of a Zombie chewing an iron door"
|
|
||||||
effZombieIron: "Sound of a Zombie chewing a wooden door"
|
|
||||||
effEnterName: "Enter an effect name to add it to the list, <cancel>"
|
effEnterName: "Enter an effect name to add it to the list, <cancel>"
|
||||||
cmdAdd: "add"
|
cmdAdd: "add"
|
||||||
strAdd: "then enter '<command>' to include it"
|
strAdd: "then enter '<command>' to include it"
|
||||||
|
@ -66,7 +66,6 @@ questEditorStages: "Szakaszok szerkesztése"
|
|||||||
questEditorRews: "Jutalmak szerkesztése"
|
questEditorRews: "Jutalmak szerkesztése"
|
||||||
questEditorOpts: "Opciók szerkesztése"
|
questEditorOpts: "Opciók szerkesztése"
|
||||||
questEditorEnterQuestName: "Írd be a Küldetés nevét (<cancel>)"
|
questEditorEnterQuestName: "Írd be a Küldetés nevét (<cancel>)"
|
||||||
questEditorEditEnterQuestName: "Add meg a Küldetés nevét a szerkesztéshez (<cancel>)"
|
|
||||||
questEditorEnterAskMessage: "Írd be a kérő üzenetet (<cancel>)"
|
questEditorEnterAskMessage: "Írd be a kérő üzenetet (<cancel>)"
|
||||||
questEditorEnterFinishMessage: "Add meg a befejező üzenetet (<cancel>)"
|
questEditorEnterFinishMessage: "Add meg a befejező üzenetet (<cancel>)"
|
||||||
questEditorEnterNPCStart: "Add meg az NPC azonosítót, <clear>, <cancel>"
|
questEditorEnterNPCStart: "Add meg az NPC azonosítót, <clear>, <cancel>"
|
||||||
@ -165,10 +164,6 @@ stageEditorDelete: "A szakasz törlése"
|
|||||||
stageEditorSetBlockNames: "Blokknevek beállítása"
|
stageEditorSetBlockNames: "Blokknevek beállítása"
|
||||||
stageEditorSetBlockAmounts: "Blokkösszegek beállítása"
|
stageEditorSetBlockAmounts: "Blokkösszegek beállítása"
|
||||||
stageEditorSetBlockDurability: "Blokk tartósság beállítása"
|
stageEditorSetBlockDurability: "Blokk tartósság beállítása"
|
||||||
stageEditorSetDamageAmounts: "Sérülés mennyiségek beállítása"
|
|
||||||
stageEditorSetPlaceAmounts: "Hely mennyiségek beállítása"
|
|
||||||
stageEditorSetUseAmounts: "Használati mennyiségek beállítása"
|
|
||||||
stageEditorSetCutAmounts: "Vágás mennyiségek beállítása"
|
|
||||||
stageEditorSetKillAmounts: "Ölés mennyiség beállítása"
|
stageEditorSetKillAmounts: "Ölés mennyiség beállítása"
|
||||||
stageEditorSetEnchantAmounts: "Varázslat mennyiségek beállítása"
|
stageEditorSetEnchantAmounts: "Varázslat mennyiségek beállítása"
|
||||||
stageEditorSetMobAmounts: "Szörny mennyiségek beállítása"
|
stageEditorSetMobAmounts: "Szörny mennyiségek beállítása"
|
||||||
@ -197,11 +192,7 @@ stageEditorCustomAlreadyAdded: "Ez az egyéni cél már hozzá van adva!"
|
|||||||
stageEditorCustomCleared: "Egyéni célok törölve."
|
stageEditorCustomCleared: "Egyéni célok törölve."
|
||||||
stageEditorCustomDataPrompt: "Adja meg a(z) <data> értéket:"
|
stageEditorCustomDataPrompt: "Adja meg a(z) <data> értéket:"
|
||||||
stageEditorEnterBlockNames: "Add meg a blokkneveket, <space>, <cancel>"
|
stageEditorEnterBlockNames: "Add meg a blokkneveket, <space>, <cancel>"
|
||||||
stageEditorBreakBlocksPrompt: "Add meg a szünetek számát (számok), <space>, <cancel>"
|
stageEditorEnterBlockAmounts: "Add meg a blokk mennyiséget, <space>, <cancel>"
|
||||||
stageEditorDamageBlocksPrompt: "Add meg a sebzés összegeit (számok), <space>, <cancel>"
|
|
||||||
stageEditorPlaceBlocksPrompt: "Add meg a helyek mennyiségét (számokat), <space>, <cancel>"
|
|
||||||
stageEditorUseBlocksPrompt: "Add meg a felhasználási összegeket (számokat), <space>, <cancel>"
|
|
||||||
stageEditorCutBlocksPrompt: "Írd be a kivágott összegeket (számokat), <space>, <cancel>"
|
|
||||||
stageEditorEnterBlockDurability: "Add meg a blokk tartósságát (számok), <space>, <cancel>"
|
stageEditorEnterBlockDurability: "Add meg a blokk tartósságát (számok), <space>, <cancel>"
|
||||||
stageEditorCatchFishPrompt: "Add meg a halfogások számát, <clear>, <cancel>"
|
stageEditorCatchFishPrompt: "Add meg a halfogások számát, <clear>, <cancel>"
|
||||||
stageEditorKillPlayerPrompt: "Add meg a megölni kívánt játékosok számát, <clear>, <cancel>"
|
stageEditorKillPlayerPrompt: "Add meg a megölni kívánt játékosok számát, <clear>, <cancel>"
|
||||||
@ -601,16 +592,6 @@ timeZoneTitle: "- Időzónák -"
|
|||||||
enchantmentsTitle: "- Varázslatok -"
|
enchantmentsTitle: "- Varázslatok -"
|
||||||
questGUITitle: "- GUI elem megjelenítése -"
|
questGUITitle: "- GUI elem megjelenítése -"
|
||||||
questRegionTitle: "- Küldetés régió -"
|
questRegionTitle: "- Küldetés régió -"
|
||||||
effBlazeShoot: "A Blaze-tüzelés hangja"
|
|
||||||
effBowFire: "Az íj tüzelésének hangja"
|
|
||||||
effClick1: "Kattintás hang"
|
|
||||||
effClick2: "Egy másik kattintási hang"
|
|
||||||
effDoorToggle: "Az ajtó nyitásának vagy zárásának hangja"
|
|
||||||
effExtinguish: "A tűz megszűnik hang"
|
|
||||||
effGhastShoot: "A Ghast-tüzelés hangja"
|
|
||||||
effGhastShriek: "Ghast-sikoltozás hang"
|
|
||||||
effZombieWood: "Egy zombi hangja, amely egy vasajtót rág"
|
|
||||||
effZombieIron: "Egy zombi hangja, amely egy fából készült ajtót rág"
|
|
||||||
effEnterName: "Add meg a hatás nevét hogy hozzáadja a listához, <cancel>"
|
effEnterName: "Add meg a hatás nevét hogy hozzáadja a listához, <cancel>"
|
||||||
cmdAdd: "hozzáad"
|
cmdAdd: "hozzáad"
|
||||||
strAdd: "majd írd be a '<command>' kifejezést"
|
strAdd: "majd írd be a '<command>' kifejezést"
|
||||||
|
@ -66,7 +66,6 @@ questEditorStages: "Edit Tahapan"
|
|||||||
questEditorRews: "Edit Hadiah"
|
questEditorRews: "Edit Hadiah"
|
||||||
questEditorOpts: "Edit Opsi"
|
questEditorOpts: "Edit Opsi"
|
||||||
questEditorEnterQuestName: "Masukkan nama Quest (<cancel>)"
|
questEditorEnterQuestName: "Masukkan nama Quest (<cancel>)"
|
||||||
questEditorEditEnterQuestName: "Enter Quest name to edit (<cancel>)"
|
|
||||||
questEditorEnterAskMessage: "Masukkan pesan pertanyaan (<cancel>)"
|
questEditorEnterAskMessage: "Masukkan pesan pertanyaan (<cancel>)"
|
||||||
questEditorEnterFinishMessage: "Masukkan pesan selesai (<cancel>)"
|
questEditorEnterFinishMessage: "Masukkan pesan selesai (<cancel>)"
|
||||||
questEditorEnterNPCStart: "Masukkan NPC ID, <clear>, <cancel>"
|
questEditorEnterNPCStart: "Masukkan NPC ID, <clear>, <cancel>"
|
||||||
@ -165,10 +164,6 @@ stageEditorDelete: "Hapus Panggung"
|
|||||||
stageEditorSetBlockNames: "Tetapkan nama blok"
|
stageEditorSetBlockNames: "Tetapkan nama blok"
|
||||||
stageEditorSetBlockAmounts: "Tetapkan jumlah blok"
|
stageEditorSetBlockAmounts: "Tetapkan jumlah blok"
|
||||||
stageEditorSetBlockDurability: "Tetapkan ketahanan blok"
|
stageEditorSetBlockDurability: "Tetapkan ketahanan blok"
|
||||||
stageEditorSetDamageAmounts: "Tetapkan jumlah kerusakan"
|
|
||||||
stageEditorSetPlaceAmounts: "Atur jumlah tempat"
|
|
||||||
stageEditorSetUseAmounts: "Atur jumlah penggunaan"
|
|
||||||
stageEditorSetCutAmounts: "Atur jumlah potong"
|
|
||||||
stageEditorSetKillAmounts: "Atur jumlah pembunuhan"
|
stageEditorSetKillAmounts: "Atur jumlah pembunuhan"
|
||||||
stageEditorSetEnchantAmounts: "Atur jumlah mempesona"
|
stageEditorSetEnchantAmounts: "Atur jumlah mempesona"
|
||||||
stageEditorSetMobAmounts: "Atur jumlah mob"
|
stageEditorSetMobAmounts: "Atur jumlah mob"
|
||||||
@ -197,11 +192,7 @@ stageEditorCustomAlreadyAdded: "Tujuan khusus itu telah ditambahkan!"
|
|||||||
stageEditorCustomCleared: "Tujuan khusus dihapus."
|
stageEditorCustomCleared: "Tujuan khusus dihapus."
|
||||||
stageEditorCustomDataPrompt: "Masukkan nilai untuk <data>:"
|
stageEditorCustomDataPrompt: "Masukkan nilai untuk <data>:"
|
||||||
stageEditorEnterBlockNames: "Masukkan nama blok, <space>, <cancel>"
|
stageEditorEnterBlockNames: "Masukkan nama blok, <space>, <cancel>"
|
||||||
stageEditorBreakBlocksPrompt: "Masukkan jumlah istirahat (angka), <space>, <cancel>"
|
stageEditorEnterBlockAmounts: "Enter block amounts, <space>, <cancel>"
|
||||||
stageEditorDamageBlocksPrompt: "Masukkan jumlah kerusakan (angka), <space>, <cancel>"
|
|
||||||
stageEditorPlaceBlocksPrompt: "Masukkan jumlah tempat (angka), <space>, <cancel>"
|
|
||||||
stageEditorUseBlocksPrompt: "Masukkan jumlah pemakaian (angka), <space>, <cancel>"
|
|
||||||
stageEditorCutBlocksPrompt: "Masukkan jumlah memotong (angka), <space>, <cancel>"
|
|
||||||
stageEditorEnterBlockDurability: "Masukkan daya tahan blok (angka), <space>, <cancel>"
|
stageEditorEnterBlockDurability: "Masukkan daya tahan blok (angka), <space>, <cancel>"
|
||||||
stageEditorCatchFishPrompt: "Masukkan jumlah ikan untuk ditangkap, <clear>, <cancel>"
|
stageEditorCatchFishPrompt: "Masukkan jumlah ikan untuk ditangkap, <clear>, <cancel>"
|
||||||
stageEditorKillPlayerPrompt: "Masukkan jumlah pemain untuk membunuh, <clear>, <cancel>"
|
stageEditorKillPlayerPrompt: "Masukkan jumlah pemain untuk membunuh, <clear>, <cancel>"
|
||||||
@ -601,16 +592,6 @@ timeZoneTitle: "- Zona Waktu -"
|
|||||||
enchantmentsTitle: "- Pesona -"
|
enchantmentsTitle: "- Pesona -"
|
||||||
questGUITitle: "- GUI Tampilan Item -"
|
questGUITitle: "- GUI Tampilan Item -"
|
||||||
questRegionTitle: "- Daerah Pencarian -"
|
questRegionTitle: "- Daerah Pencarian -"
|
||||||
effBlazeShoot: "Suara tembakan Blaze"
|
|
||||||
effBowFire: "Suara busur ditembakkan"
|
|
||||||
effClick1: "Suara klik"
|
|
||||||
effClick2: "Klik Suara yang berbeda"
|
|
||||||
effDoorToggle: "Suara membuka atau menutup pintu"
|
|
||||||
effExtinguish: "Suara api padam"
|
|
||||||
effGhastShoot: "Suara tembakan Ghast"
|
|
||||||
effGhastShriek: "Suara jeritan yang menjijikkan"
|
|
||||||
effZombieWood: "Suara Zombie mengunyah pintu besi"
|
|
||||||
effZombieIron: "Suara Zombie mengunyah pintu kayu"
|
|
||||||
effEnterName: "Masukkan nama efek untuk ditambahkan ke daftar, <cancel>"
|
effEnterName: "Masukkan nama efek untuk ditambahkan ke daftar, <cancel>"
|
||||||
cmdAdd: "tambahkan"
|
cmdAdd: "tambahkan"
|
||||||
strAdd: "lalu masukkan '<command>' untuk memasukkannya"
|
strAdd: "lalu masukkan '<command>' untuk memasukkannya"
|
||||||
|
@ -66,7 +66,6 @@ questEditorStages: "Modifica Fasi"
|
|||||||
questEditorRews: "Modifica Premi"
|
questEditorRews: "Modifica Premi"
|
||||||
questEditorOpts: "Modifica Opzioni"
|
questEditorOpts: "Modifica Opzioni"
|
||||||
questEditorEnterQuestName: "Inserisci il nome della missione (<cancel>)"
|
questEditorEnterQuestName: "Inserisci il nome della missione (<cancel>)"
|
||||||
questEditorEditEnterQuestName: "Inserisci il nome della missione da modificare (<cancel>)"
|
|
||||||
questEditorEnterAskMessage: "Inserisci il messaggio di richiesta (<cancel>)"
|
questEditorEnterAskMessage: "Inserisci il messaggio di richiesta (<cancel>)"
|
||||||
questEditorEnterFinishMessage: "Inserisci il messaggio di completamento (<cancel>)"
|
questEditorEnterFinishMessage: "Inserisci il messaggio di completamento (<cancel>)"
|
||||||
questEditorEnterNPCStart: "Inserisci ID NPC, <clear>, <cancel>"
|
questEditorEnterNPCStart: "Inserisci ID NPC, <clear>, <cancel>"
|
||||||
@ -165,10 +164,6 @@ stageEditorDelete: "Elimina Fase"
|
|||||||
stageEditorSetBlockNames: "Imposta nomi dei blocchi"
|
stageEditorSetBlockNames: "Imposta nomi dei blocchi"
|
||||||
stageEditorSetBlockAmounts: "Imposta la quantità di blocchi"
|
stageEditorSetBlockAmounts: "Imposta la quantità di blocchi"
|
||||||
stageEditorSetBlockDurability: "Imposta la durabilità del blocco"
|
stageEditorSetBlockDurability: "Imposta la durabilità del blocco"
|
||||||
stageEditorSetDamageAmounts: "Imposta la quantità di danno"
|
|
||||||
stageEditorSetPlaceAmounts: "Imposta la quantità di posti"
|
|
||||||
stageEditorSetUseAmounts: "Imposta la quantità di utilizzi"
|
|
||||||
stageEditorSetCutAmounts: "Imposta la quantità di tagli"
|
|
||||||
stageEditorSetKillAmounts: "Imposta la quantità di uccisioni"
|
stageEditorSetKillAmounts: "Imposta la quantità di uccisioni"
|
||||||
stageEditorSetEnchantAmounts: "Imposta la quantità di incantesimi"
|
stageEditorSetEnchantAmounts: "Imposta la quantità di incantesimi"
|
||||||
stageEditorSetMobAmounts: "Imposta la quantità di creature"
|
stageEditorSetMobAmounts: "Imposta la quantità di creature"
|
||||||
@ -197,11 +192,7 @@ stageEditorCustomAlreadyAdded: "Quell'obiettivo personalizzato è già stato agg
|
|||||||
stageEditorCustomCleared: "Obiettivi personalizzati cancellati."
|
stageEditorCustomCleared: "Obiettivi personalizzati cancellati."
|
||||||
stageEditorCustomDataPrompt: "Inserisci il valore per <data>:"
|
stageEditorCustomDataPrompt: "Inserisci il valore per <data>:"
|
||||||
stageEditorEnterBlockNames: "Inserisci i nomi dei blocchi, <space>, <cancel>"
|
stageEditorEnterBlockNames: "Inserisci i nomi dei blocchi, <space>, <cancel>"
|
||||||
stageEditorBreakBlocksPrompt: "Inserisci le quantità di rotture blocchi (numeri), <space>, <cancel>"
|
stageEditorEnterBlockAmounts: "Inserisci la quantità di blocchi, <space>, <cancel>"
|
||||||
stageEditorDamageBlocksPrompt: "Inserisci le quantità di danni (numeri), <space>, <cancel>"
|
|
||||||
stageEditorPlaceBlocksPrompt: "Inserisci le quantità di posizioni (numeri), <space>, <cancel>"
|
|
||||||
stageEditorUseBlocksPrompt: "Inserisci le quantità di utilizzi (numeri), <space>, <cancel>"
|
|
||||||
stageEditorCutBlocksPrompt: "Inserisci le quantità di tagli (numeri), <space>, <cancel>"
|
|
||||||
stageEditorEnterBlockDurability: "Inserisci le durabilità dei blocchi (numeri), <space>, <cancel>"
|
stageEditorEnterBlockDurability: "Inserisci le durabilità dei blocchi (numeri), <space>, <cancel>"
|
||||||
stageEditorCatchFishPrompt: "Inserisci il numero di pesci da pescare, <clear>, <cancel>"
|
stageEditorCatchFishPrompt: "Inserisci il numero di pesci da pescare, <clear>, <cancel>"
|
||||||
stageEditorKillPlayerPrompt: "Inserisci il numero di giocatori da uccidere, <clear>, <cancel>"
|
stageEditorKillPlayerPrompt: "Inserisci il numero di giocatori da uccidere, <clear>, <cancel>"
|
||||||
@ -427,197 +418,187 @@ reqHeroesSetSecondary: "Imposta la classe secondaria"
|
|||||||
reqMoneyPrompt: "Inserisci l'importo di <money>, <clear>, <cancel>"
|
reqMoneyPrompt: "Inserisci l'importo di <money>, <clear>, <cancel>"
|
||||||
reqQuestPointsPrompt: "Inserisci la quantità di punti missione, <clear>, <cancel>"
|
reqQuestPointsPrompt: "Inserisci la quantità di punti missione, <clear>, <cancel>"
|
||||||
reqQuestListTitle: "- Missioni Disponibili -"
|
reqQuestListTitle: "- Missioni Disponibili -"
|
||||||
reqQuestPrompt: "Inserisci un elenco di nomi di ricerca, <semicolon>, <clear>, <cancel>"
|
reqQuestPrompt: "Inserisci una lista di missioni, <semicolon>, <clear>, <cancel>"
|
||||||
reqRemoveItemsPrompt: "Inserire una lista di valori vero/falso, <space>, <cancel>"
|
reqRemoveItemsPrompt: "Inserisci una lista di valori vero/falso, <space>, <cancel>"
|
||||||
reqPermissionsPrompt: "Immettere i requisiti di autorizzazione, <space>, <clear>, <cancel>"
|
reqPermissionsPrompt: "Inserisci i permessi richiesti, <space>, <clear>, <cancel>"
|
||||||
reqCustomPrompt: "Inserisci il nome di un requisito personalizzato da aggiungere, <clear>, <cancel>"
|
reqCustomPrompt: "Inserisci il nome di un requisito personalizzato da aggiungere, <clear>, <cancel>"
|
||||||
reqMcMMOPrompt: "Inserisci le abilità mcMMO, <space>, <clear>, <cancel>"
|
reqMcMMOPrompt: "Inserisci le abilità mcMMO Classic, <space>, <clear>, <cancel>"
|
||||||
reqMcMMOAmountsPrompt: "Inserisci gli importi delle abilità mcMMO, <space>, <clear>, <cancel>"
|
reqMcMMOAmountsPrompt: "Inserisci la quantità di abilità mcMMO Classic, <space>, <clear>, <cancel>"
|
||||||
reqHeroesPrimaryPrompt: "Inserisci il nome di una classe primaria di Heroes, <clear>, <cancel>"
|
reqHeroesPrimaryPrompt: "Inserisci il nome di una classe primaria di Heroes, <clear>, <cancel>"
|
||||||
reqHeroesSecondaryPrompt: "Inserisci il nome di una seconda classe di Heroes, <clear>, <cancel>"
|
reqHeroesSecondaryPrompt: "Inserisci il nome di una classe secondaria di Heroes, <clear>, <cancel>"
|
||||||
reqFailMessagePrompt: "Inserisci il messaggio sui requisiti di errore, <cancel>"
|
reqFailMessagePrompt: "Inserisci il messaggio d'errore sui requisiti, <cancel>"
|
||||||
reqAddItem: "Aggiungi articolo"
|
reqAddItem: "Aggiungi oggetto"
|
||||||
reqSetRemoveItems: "Imposta elementi rimuove"
|
reqSetRemoveItems: "Imposta rimozione oggetti"
|
||||||
reqNoItemsSet: "Nessun elemento impostato"
|
reqNoItemsSet: "Nessun oggetto impostato"
|
||||||
reqNoValuesSet: "Nessun valore impostato"
|
reqNoValuesSet: "Nessun valore impostato"
|
||||||
reqHeroesPrimaryDisplay: "Classe primaria:"
|
reqHeroesPrimaryDisplay: "Classe primaria:"
|
||||||
reqHeroesSecondaryDisplay: "Classe secondaria:"
|
reqHeroesSecondaryDisplay: "Classe secondaria:"
|
||||||
reqNotAQuestName: "<quest>non è un nome di missione!"
|
reqNotAQuestName: "<quest> non è il nome di una missione!"
|
||||||
reqItemCleared: "Requisiti dell'articolo cancellati."
|
reqItemCleared: "Requisiti oggetti cancellati."
|
||||||
reqTrueFalseError: '<input>non è un valore vero o falso!%b%Esempio: vero falso vero vero'
|
reqTrueFalseError: '<input> non è un valore vero/falso!%br%Esempio: vero falso vero vero'
|
||||||
reqCustomAlreadyAdded: "Quel requisito personalizzato è già stato aggiunto!"
|
reqCustomAlreadyAdded: "Quel requisito personalizzato è già stato aggiunto!"
|
||||||
reqCustomNotFound: "Modulo dei requisiti personalizzati non trovato."
|
reqCustomNotFound: "Modulo dei requisiti personalizzati non trovato."
|
||||||
reqCustomCleared: "Requisiti personalizzati cancellati."
|
reqCustomCleared: "Requisiti personalizzati cancellati."
|
||||||
reqMcMMOError: "<input>non è un nome di abilità di mcMMO!"
|
reqMcMMOError: "<input> non è il nome di un'abilità di mcMMO Classic!"
|
||||||
reqMcMMOCleared: "requisiti di abilità mcMMO cancellati."
|
reqMcMMOCleared: "Requisiti abilità di mcMMO Classic cancellati."
|
||||||
reqMcMMOAmountsCleared: "requiiti i quantità di abilità mcMMO azzerati."
|
reqMcMMOAmountsCleared: "Requisiti numero d'abilità di mcMMO Classic cancellati."
|
||||||
reqHeroesNotPrimary: "La classe<class>non è primaria!"
|
reqHeroesNotPrimary: "La classe <class> non è primaria!"
|
||||||
reqHeroesPrimaryCleared: "Requisito di classe primaria Heroes eliminato."
|
reqHeroesPrimaryCleared: "Requisito classe primaria di Heroes cancellato."
|
||||||
reqHeroesNotSecondary: "La classe<class> non è secondaria!"
|
reqHeroesNotSecondary: "La classe <class> non è secondaria!"
|
||||||
reqHeroesSecondaryCleared: "Requisito di classe secondaria Heroes eliminata."
|
reqHeroesSecondaryCleared: "Requisito classe secondaria di Heroes cancellato."
|
||||||
reqHeroesClassNotFound: "Classe non trovata!"
|
reqHeroesClassNotFound: "Classe non trovata!"
|
||||||
reqNone: "Nessun requisito impostato"
|
reqNone: "Nessun requisito impostato"
|
||||||
reqNotANumber: "<input>non è un numero!"
|
reqNotANumber: "<input> non è un numero!"
|
||||||
reqMustAddItem: "Devi prima aggiungere almeno un oggetto!"
|
reqMustAddItem: "È necessario aggiungere un oggetto prima!"
|
||||||
reqNoMessage: "È necessario impostare un messaggio sui requisti di errore!"
|
reqNoMessage: "È necessario impostare un messaggio sui requisti di errore!"
|
||||||
plnStart: "Imposta la data di inizio"
|
plnStart: "Imposta la data di inizio"
|
||||||
plnEnd: "Imposta la data di fine"
|
plnEnd: "Imposta la data di fine"
|
||||||
plnRepeat: "Imposta ciclo di ripetizione"
|
plnRepeat: "Imposta ciclo di ripetizione"
|
||||||
plnCooldown: "Imposta il tempo di recupero del giocatore"
|
plnCooldown: "Imposta il tempo di recupero del giocatore"
|
||||||
plnTooEarly: "<quest> sarà attivo in <time>."
|
plnTooEarly: "<quest> sarà attiva in <time>."
|
||||||
plnTooLate: "<quest> era l'ultima volta <time> fa."
|
plnTooLate: "<quest> era attiva l'ultima volta <time> fa."
|
||||||
optGeneral: "Generale"
|
optGeneral: "Generale"
|
||||||
optMultiplayer: "Multiplayer"
|
optMultiplayer: "Multigiocatore"
|
||||||
optBooleanPrompt: "Inserisci '<true>' o '<false>', <clear>, <cancel>"
|
optBooleanPrompt: "Inserisci '<true>' o '<false>', <clear>, <cancel>"
|
||||||
optNumberPrompt: "Inserire un livello (numero) per il monitoraggio dei progressi, <clear>, <cancel>"
|
optNumberPrompt: "Inserisci un livello (numero) per il monitoraggio dei progressi, <clear>, <cancel>"
|
||||||
optAllowCommands: "Consenti comandi durante la missione"
|
optAllowCommands: "Consenti l'utilizzo dei comandi durante la missione"
|
||||||
optAllowQuitting: "Consenti smetteri durante la missione"
|
optAllowQuitting: "Consenti la disconnessione durante la missione"
|
||||||
optCommandsDenied: "Non puoi usare i comandi durante <quest>."
|
optCommandsDenied: "Non puoi usare i comandi durante <quest>."
|
||||||
optUseDungeonsXLPlugin: "Utilizza il plug-in DungeonsXL"
|
optUseDungeonsXLPlugin: "Utilizza il plugin DungeonsXL"
|
||||||
optUsePartiesPlugin: "Utilizza il plug-in Parties"
|
optUsePartiesPlugin: "Utilizza il plugin Parties"
|
||||||
optShareProgressLevel: "Livello di condivisione dei progressi"
|
optShareProgressLevel: "Livello di condivisione dei progressi"
|
||||||
optRequireSameQuest: "Richiede la stessa missione"
|
optRequireSameQuest: "Richiedi la stessa missione"
|
||||||
rewSetMoney: "Imposta la ricompensa in denaro"
|
rewSetMoney: "Imposta la ricompensa in denaro"
|
||||||
rewSetQuestPoints: "Imposta la ricompensa dei Punti missioni"
|
rewSetQuestPoints: "Imposta la ricompensa in punti missione"
|
||||||
rewSetItems: "Imposta i premi per gli oggetti"
|
rewSetItems: "Imposta la ricompensa in oggetti"
|
||||||
rewSetExperience: "Imposta la ricompensa per l'esperienza"
|
rewSetExperience: "Imposta la ricompensa in esperienza"
|
||||||
rewSetCommands: "Imposta i premi di comando"
|
rewSetCommands: "Imposta la ricompensa in comandi"
|
||||||
rewCommands: "Premi di comando"
|
rewCommands: "Ricompensa in comandi"
|
||||||
rewSetCommandsOverrides: "Imposta le sovrascritture del display di comando"
|
rewSetCommandsOverrides: "Imposta la sovrascrittura del comando"
|
||||||
rewCommandsCleared: "I premi di comando sono stati cancellati."
|
rewCommandsCleared: "La ricompensa in comandi cancellata."
|
||||||
rewCommandsOverridePrompt: "Immettere comando sovrascrivi, <clear>, <cancel>"
|
rewCommandsOverridePrompt: "Inserisci sovrascrizione comando, <clear>, <cancel>"
|
||||||
rewCommandsOverrideHint: "(Questo override mostrerà il tuo testo come ricompensa)"
|
rewCommandsOverrideHint: "(Questo override mostrerà il tuo testo come ricompensa)"
|
||||||
rewNoCommands: "Devi prima impostare i comandi!"
|
rewNoCommands: "È necessario impostare i comandi prima!"
|
||||||
rewSetPermission: "Imposta i premi delle autorizzazioni"
|
rewSetPermission: "Imposta permesso come ricompensa"
|
||||||
rewSetMcMMO: "Imposta ricompense delle abilità mcMMO"
|
rewSetMcMMO: "Imposta l'abilità mcMMO Classic come ricompensa"
|
||||||
rewSetHeroes: "Imposta la ricompensa in esperienza per gli Eroi"
|
rewSetHeroes: "Imposta l'esperienza Heroes come ricompensa"
|
||||||
rewSetPhat: "Imposta i ricompense di PhatLoot"
|
rewSetPhat: "Imposta PhatLoot come ricompensa"
|
||||||
rewSetCustom: "Imposta premi personalizzati"
|
rewSetCustom: "Imposta ricompensa personalizzata"
|
||||||
rewSetHeroesClasses: "Imposta classi"
|
rewSetHeroesClasses: "Imposta classi"
|
||||||
rewSetHeroesAmounts: "Imposta quantità di esperienza"
|
rewSetHeroesAmounts: "Imposta la quantità di esperienza"
|
||||||
rewMoneyPrompt: "Inserisci l'importo di<money>, <clear>, <cancel>"
|
rewMoneyPrompt: "Inserisci l'importo di <money>, <clear>, <cancel>"
|
||||||
rewExperiencePrompt: "Inserisci la quantità di esperienza, <clear>, <cancel>"
|
rewExperiencePrompt: "Inserisci la quantità di esperienza, <clear>, <cancel>"
|
||||||
rewCommandPrompt: "Inserisci i premi di comando, <semicolon>, <clear>, <cancel>"
|
rewCommandPrompt: "Inserisci le ricompense in comandi, <semicolon>, <clear>, <cancel>"
|
||||||
rewCommandPromptHint: 'Nota: Puoi mettere<player> per specificare il giocatore che ha completato la missione.per esempio: colpisci<player>'
|
rewCommandPromptHint: 'Nota: Puoi aggiungere <player> per specificare il giocatore che ha completato la missione. Per esempio: colpisci <player>'
|
||||||
rewPermissionsPrompt: "Inserisci i premi di autorizzazione, <space>, <clear>, <cancel>"
|
rewPermissionsPrompt: "Inserisci i permessi come ricompensa, <space>, <clear>, <cancel>"
|
||||||
rewQuestPointsPrompt: "Inserisci la quantità di punti missione, <clear>, <cancel>"
|
rewQuestPointsPrompt: "Inserisci la quantità di punti missione, <clear>, <cancel>"
|
||||||
rewMcMMOPrompt: "Inserisci il abilità di mcMMO, <space>, <cancel>"
|
rewMcMMOPrompt: "Inserisci le abilità di mcMMO Classic, <space>, <cancel>"
|
||||||
rewMcMMOPromptHint: "Nota: Digitando 'All' fornirai i livelli a tutte le abilità."
|
rewMcMMOPromptHint: "Nota: Digitando 'All' fornirai i livelli a tutte le abilità."
|
||||||
rewHeroesClassesPrompt: "Inserisci il lezioni di Heroes, <space>, <cancel>"
|
rewHeroesClassesPrompt: "Inserisci le classi di Heroes, <space>, <cancel>"
|
||||||
rewHeroesExperiencePrompt: "Inserisci il numero di esperienza (numeri, decimali sono ammessi), <space>, <cancel>"
|
rewHeroesExperiencePrompt: "Inserisci il numero di esperienza (numeri, i decimali sono ammessi), <space>, <cancel>"
|
||||||
rewPhatLootsPrompt: "Inserisci il PhatLoots, <space>, <clear>, <cancel>"
|
rewPhatLootsPrompt: "Inserisci PhatLoots, <space>, <clear>, <cancel>"
|
||||||
rewCustomRewardPrompt: "Inserisci il nome di una ricompensa personalizzata da aggiungere, <clear>, <cancel>"
|
rewCustomRewardPrompt: "Inserisci il nome di una ricompensa personalizzata da aggiungere, <clear>, <cancel>"
|
||||||
rewItemsCleared: "Ricompense di elemento cancellato."
|
rewItemsCleared: "Ricompense oggetti cancellate."
|
||||||
rewNoMcMMOSkills: "Senza abilità consolidate"
|
rewNoMcMMOSkills: "Nessuna abilità impostata"
|
||||||
rewNoHeroesClasses: "Non ci sono classi stabilite"
|
rewNoHeroesClasses: "Nessuna classe impostata"
|
||||||
rewSetMcMMOSkillsFirst: "Devi prima stabilire le abilità!"
|
rewSetMcMMOSkillsFirst: "È necessario impostare le abilità prima!"
|
||||||
rewMcMMOCleared: "ricompense mcMMO cancellate."
|
rewMcMMOCleared: "Ricompense mcMMO Classic cancellate."
|
||||||
rewSetHeroesClassesFirst: "Devi prima stabilire le classi!"
|
rewSetHeroesClassesFirst: "È necessario impostare le classi prima!"
|
||||||
rewHeroesCleared: "Le ricompense degli eroi sono state cancellate."
|
rewHeroesCleared: "Ricompense Heroes cancellate."
|
||||||
rewHeroesInvalidClass: "<input> non è un nome di classe valido di eroi!"
|
rewHeroesInvalidClass: "<input> non è un nome di classe Heroes valida!"
|
||||||
rewPhatLootsInvalid: "<input>non è un nome valido di PhatLoot!"
|
rewPhatLootsInvalid: "<input> non è un nome di PhatLoot valido!"
|
||||||
rewPhatLootsCleared: "PhatLoots ricompensa deselezionata."
|
rewPhatLootsCleared: "Ricompense PhatLoots cancellate."
|
||||||
rewCustomAlreadyAdded: "Quel ricompensa personalizzato è già stato aggiunto!"
|
rewCustomAlreadyAdded: "Quella ricompensa personalizzata è stata già aggiunta!"
|
||||||
rewCustomNotFound: "Modulo premio personalizzato non trovato."
|
rewCustomNotFound: "Modulo ricompense personalizzate non trovato."
|
||||||
rewCustomCleared: "Ricompense di personalizzati cancellato."
|
rewCustomCleared: "Ricompense personalizzate cancellate."
|
||||||
itemCreateLoadHand: "Carico elemento in mano"
|
itemCreateLoadHand: "Carica oggetto in mano"
|
||||||
itemCreateSetName: "Imposta nome"
|
itemCreateSetName: "Imposta nome"
|
||||||
itemCreateSetAmount: "Imposta quantità"
|
itemCreateSetAmount: "Imposta quantità"
|
||||||
itemCreateSetDurab: "Imposta la durabilità"
|
itemCreateSetDurab: "Imposta durabilità"
|
||||||
itemCreateSetEnchs: "Aggiungi/ eliminare incantesimi"
|
itemCreateSetEnchs: "Aggiungi incantesimi"
|
||||||
itemCreateSetDisplay: "Imposta nome di visualizzazione"
|
itemCreateSetDisplay: "Imposta nome da visualizzare"
|
||||||
itemCreateSetLore: "Stabilire la tradizione"
|
itemCreateSetLore: "Imposta descrizione"
|
||||||
itemCreateSetClearMeta: "Cancella dati extra"
|
itemCreateSetClearMeta: "Cancella dati extra"
|
||||||
itemCreateEnterName: "Inserisci il nome dell'oggetto, <cancel>"
|
itemCreateEnterName: "Inserisci il nome di un oggetto, <cancel>"
|
||||||
itemCreateEnterAmount: "Inserisci la quantità di oggetti (max. 64), <cancel>"
|
itemCreateEnterAmount: "Inserisci la quantità (max. 64), <cancel>"
|
||||||
itemCreateEnterDurab: "Inserisci la durabilità dell'oggetto, <clear>, <cancel>"
|
itemCreateEnterDurab: "Inserisci la durabilità, <clear>, <cancel>"
|
||||||
itemCreateEnterEnch: "Inserisci il nome di un incanto, <clear>, <cancel>"
|
itemCreateEnterEnch: "Inserisci il nome di un incantesimo, <clear>, <cancel>"
|
||||||
itemCreateEnterLevel: "Inserisci un livello (numero) per <enchantment>"
|
itemCreateEnterLevel: "Inserisci il livello (numero) di <enchantment>"
|
||||||
itemCreateEnterDisplay: "Inserisci la nome dell'oggetto, <clear>, <cancel>"
|
itemCreateEnterDisplay: "Inserisci il nome da visualizzare, <clear>, <cancel>"
|
||||||
itemCreateEnterLore: "Inserisci la conoscenza dell'oggetto, <semicolon>, <clear>, <cancel>"
|
itemCreateEnterLore: "Inserisci la descrizione, <semicolon>, <clear>, <cancel>"
|
||||||
itemCreateLoaded: "Oggetto caricato."
|
itemCreateLoaded: "Oggetto caricato."
|
||||||
itemCreateNoItem: "Nessun oggetto in mano!"
|
itemCreateNoItem: "Nessun oggetto in mano!"
|
||||||
itemCreateNoName: "Devi prima stabilire un nome!"
|
itemCreateNoName: "È necessario impostare un nome prima!"
|
||||||
itemCreateInvalidName: "Nome di oggetto non valido!"
|
itemCreateInvalidName: "Nome oggetto non valido!"
|
||||||
itemCreateInvalidDurab: "Durabilità dell'oggetto non valida!"
|
itemCreateInvalidDurab: "Durabilità oggetto non valida!"
|
||||||
itemCreateInvalidEnch: "Nome incantamento non valido!"
|
itemCreateInvalidEnch: "Nome incantamento non valido!"
|
||||||
itemCreateInvalidInput: "Inserimento non valido!"
|
itemCreateInvalidInput: "Immissione non valida!"
|
||||||
itemCreateNoNameAmount: "Devi prima impostare un nome e un importo!"
|
itemCreateNoNameAmount: "È necessario impostare un nome e la quantità prima!"
|
||||||
itemCreateCriticalError: "Si è verificato un errore critico."
|
itemCreateCriticalError: "Si è verificato un errore critico."
|
||||||
dateCreateEnterDay: "Inserire un giorno (massimo 31), <cancel>"
|
dateCreateEnterDay: "Inserisci un giorno (massimo 31), <cancel>"
|
||||||
dateCreateEnterMonth: "Inserisci un mese (massimo 12), <cancel>"
|
dateCreateEnterMonth: "Inserisci un mese (massimo 12), <cancel>"
|
||||||
dateCreateEnterYear: "Immettere un anno (massimo 9999), <cancel>"
|
dateCreateEnterYear: "Inserisci un anno (massimo 9999), <cancel>"
|
||||||
dateCreateEnterHour: "Immettere un'ora (massimo 23), <cancel>"
|
dateCreateEnterHour: "Inserisci un'ora (massimo 23), <cancel>"
|
||||||
dateCreateEnterMinute: "Immettere un minuto (massimo 59), <cancel>"
|
dateCreateEnterMinute: "Inserisci un minuto (massimo 59), <cancel>"
|
||||||
dateCreateEnterSecond: "Immettere un secondo (massimo 59), <cancel>"
|
dateCreateEnterSecond: "Inserisci un secondo (massimo 59), <cancel>"
|
||||||
dateCreateEnterOffset: "Immettere uno scostamento orario UTC (massimo 14), <cancel>"
|
dateCreateEnterOffset: "Inserisci lo scostamento orario UTC (massimo 14), <cancel>"
|
||||||
dateCreateEnterZone: "Inserisci un fuso orario UTC, <cancel>"
|
dateCreateEnterZone: "Inserisci il fuso orario UTC, <cancel>"
|
||||||
dateCreateNoYearAmount: "È necessario impostare un anno prima!"
|
dateCreateNoYearAmount: "È necessario impostare un anno prima!"
|
||||||
questObjectivesTitle: "---(<quest>)---"
|
questObjectivesTitle: "---(<quest>)---"
|
||||||
questCompleteTitle: '**RICERCA COMPLETA: <quest>**'
|
questCompleteTitle: '**MISSIONE COMPLETATA: <quest>**'
|
||||||
questRewardsTitle: "Premi:"
|
questRewardsTitle: "Ricompense:"
|
||||||
questFailed: "*MISSIONE FALLITA*"
|
questFailed: "*MISSIONE FALLITA*"
|
||||||
questMaxAllowed: "Potresti avere fino a <number> missioni."
|
questMaxAllowed: "Puoi avere fino a <number> missioni."
|
||||||
questAlreadyOn: "Sei già su questa missione!"
|
questAlreadyOn: "Sei già su questa missione!"
|
||||||
questTooEarly: "Non puoi fare <quest> ancora per <time>."
|
questTooEarly: "Non puoi fare nuovamente <quest> per <time>."
|
||||||
questAlreadyCompleted: "Hai già completato <quest>."
|
questAlreadyCompleted: "Hai già completato <quest>."
|
||||||
questInvalidLocation: "Non puoi fare <quest> in questa posizione."
|
questInvalidLocation: "Non puoi prendere <quest> da questa posizione."
|
||||||
questInvalidDeliveryItem: "<item> non è richiesto per questa missione!"
|
questInvalidDeliveryItem: "<item> non è un oggetto richiesto per questa missione!"
|
||||||
questSelectedLocation: "Posizione selezionata"
|
questSelectedLocation: "Posizione selezionata"
|
||||||
questListTitle: "- Missioni -"
|
questListTitle: "- Lista Missioni -"
|
||||||
questHelpTitle: "- Missioni -"
|
questHelpTitle: "- Aiuto Missioni -"
|
||||||
questDisplayHelp: "- Visualizza questa guida"
|
questDisplayHelp: "- Visualizza questa pagina d'aiuto"
|
||||||
questNPCListTitle: "- Missioni | <npc> -"
|
questNPCListTitle: "- Missioni | <npc> -"
|
||||||
questAdminHelpTitle: "- Questadmin -"
|
questAdminHelpTitle: "- Questadmin -"
|
||||||
questEditorTitle: "- Editor Ricerca -"
|
questEditorTitle: "- Editor Missione -"
|
||||||
eventEditorTitle: "- Editor Eventi - "
|
eventEditorTitle: "- Editor Azione - "
|
||||||
questCreateTitle: "- Crea una Missione -"
|
questCreateTitle: "- Crea Missione -"
|
||||||
questEditTitle: "- Modificare Ricerca -"
|
questEditTitle: "- Modifica Missione -"
|
||||||
questDeleteTitle: "- Eliminare la Ricerca -"
|
questDeleteTitle: "- Elimina Missione -"
|
||||||
requirementsTitle: "- <quest> | Requisiti -"
|
requirementsTitle: "- <quest> | Requisiti -"
|
||||||
rewardsTitle: "- <quest> | Premi -"
|
rewardsTitle: "- <quest> | Ricompense -"
|
||||||
plannerTitle: "- <quest> | Pianificatore -"
|
plannerTitle: "- <quest> | Pianificatore -"
|
||||||
optionsTitle: "- <quest> | Opzioni -"
|
optionsTitle: "- <quest> | Opzioni -"
|
||||||
itemRequirementsTitle: "- Requisiti per L'oggetto -"
|
itemRequirementsTitle: "- Oggetti Requisiti -"
|
||||||
itemRewardsTitle: "- Ricompensa Oggetti -"
|
itemRewardsTitle: "- Oggetti Ricompensa -"
|
||||||
mcMMORequirementsTitle: "- mcMMO Requisiti -"
|
mcMMORequirementsTitle: "- Requisiti mcMMO Classic -"
|
||||||
mcMMORewardsTitle: "- mcMMO Premi -"
|
mcMMORewardsTitle: "- Ricompense mcMMO Classic -"
|
||||||
heroesRequirementsTitle: "- Requisiti Heroes -"
|
heroesRequirementsTitle: "- Requisiti Heroes -"
|
||||||
heroesRewardsTitle: "- Ricompense Heroes -"
|
heroesRewardsTitle: "- Ricompense Heroes -"
|
||||||
heroesClassesTitle: "- Classi Heroes -"
|
heroesClassesTitle: "- Classi Heroes -"
|
||||||
heroesExperienceTitle: "- Esperienza di Heroes -"
|
heroesExperienceTitle: "- Esperienza Heroes -"
|
||||||
heroesPrimaryTitle: "- Classe Primaria -"
|
heroesPrimaryTitle: "- Classi Primarie -"
|
||||||
heroesSecondaryTitle: "- Classe Secondaria -"
|
heroesSecondaryTitle: "- Classi Secondarie -"
|
||||||
phatLootsRewardsTitle: "- Ricompense PhatLoots -"
|
phatLootsRewardsTitle: "- Ricompense PhatLoots -"
|
||||||
customRequirementsTitle: "- Requisiti Personalizzati -"
|
customRequirementsTitle: "- Requisiti Personalizzati -"
|
||||||
customRewardsTitle: "- Premi Personalizzati -"
|
customRewardsTitle: "- Ricompense Personalizzate -"
|
||||||
skillListTitle: "- Lista delle Abilità -"
|
skillListTitle: "- Lista Abilità -"
|
||||||
eventTitle: "- Eventi -"
|
eventTitle: "- Azione -"
|
||||||
completedQuestsTitle: "- Missioni Completate -"
|
completedQuestsTitle: "- Missioni Completate -"
|
||||||
topQuestersTitle: "- Superiore <number> Questers -"
|
topQuestersTitle: "- Top <number> Questers -"
|
||||||
createItemTitle: "- Crea Elemento -"
|
createItemTitle: "- Crea Oggetto -"
|
||||||
dateTimeTitle: "- Data e Ora -"
|
dateTimeTitle: "- Data e Ora -"
|
||||||
timeZoneTitle: "- Fusi Orari -"
|
timeZoneTitle: "- Fusi Orari -"
|
||||||
enchantmentsTitle: "- Incantesimi -"
|
enchantmentsTitle: "- Incantesimi -"
|
||||||
questGUITitle: "- Display Articoli GUI -"
|
questGUITitle: "- Oggetto GUI Visualizzato -"
|
||||||
questRegionTitle: "- Regione Ricerca -"
|
questRegionTitle: "- Regione Missione -"
|
||||||
effBlazeShoot: "Suono del Blaze che attacca"
|
effEnterName: "Inserisci il nome di un effetto per aggiungerlo alla lista, <cancel>"
|
||||||
effBowFire: "Suono di un arco che attacca"
|
|
||||||
effClick1: "Il suono di un click"
|
|
||||||
effClick2: "Un suono differente di un click"
|
|
||||||
effDoorToggle: "Suono di una porta che si apre o chiude"
|
|
||||||
effExtinguish: "Suono del fuoco che viene spento"
|
|
||||||
effGhastShoot: "Suono di un Ghast che attacca"
|
|
||||||
effGhastShriek: "Suono di un Ghast urlante"
|
|
||||||
effZombieWood: "Suono di uno Zombie da masticare una porta di ferro"
|
|
||||||
effZombieIron: "Suono di uno Zombie da masticare una porta di legno"
|
|
||||||
effEnterName: "Scrivi un \"nome effetto\" per aggiungerlo alla lista, <cancel>"
|
|
||||||
cmdAdd: "aggiungi"
|
cmdAdd: "aggiungi"
|
||||||
strAdd: "quindi inserisci '<command>' per includerlo"
|
strAdd: "poi inserisci '<command>' per includerlo"
|
||||||
cmdClear: "cancella"
|
cmdClear: "cancella"
|
||||||
strClear: "o '<command>' per cancellare tutti i dati"
|
strClear: "o '<command>' per cancellare tutti i dati"
|
||||||
cmdCancel: "cancella"
|
cmdCancel: "cancella"
|
||||||
strCancel: "o '<command>' per tornare"
|
strCancel: "o '<command>' per tornare indietro"
|
||||||
cmdDone: "fatto"
|
cmdDone: "fatto"
|
||||||
strDone: "quindi immettere '<command>' per salvare"
|
strDone: "quindi immettere '<command>' per salvare"
|
||||||
strSpace: "separando ogni da uno spazio"
|
strSpace: "separando ogni da uno spazio"
|
||||||
@ -731,7 +712,7 @@ ENCHANTMENT_CHANNELING: "Channeling"
|
|||||||
ENCHANTMENT_DAMAGE_ALL: "Nitidezza"
|
ENCHANTMENT_DAMAGE_ALL: "Nitidezza"
|
||||||
ENCHANTMENT_DAMAGE_ARTHROPODS: "BandeDiArtropodi"
|
ENCHANTMENT_DAMAGE_ARTHROPODS: "BandeDiArtropodi"
|
||||||
ENCHANTMENT_DEPTH_STRIDER: "ProfonditàGirello"
|
ENCHANTMENT_DEPTH_STRIDER: "ProfonditàGirello"
|
||||||
ENCHANTMENT_DAMAGE_UNDEAD: "Colpire"
|
ENCHANTMENT_DAMAGE_UNDEAD: "Colpisci"
|
||||||
ENCHANTMENT_DIG_SPEED: "Efficienza"
|
ENCHANTMENT_DIG_SPEED: "Efficienza"
|
||||||
ENCHANTMENT_DURABILITY: "Dipanarsi"
|
ENCHANTMENT_DURABILITY: "Dipanarsi"
|
||||||
ENCHANTMENT_FIRE_ASPECT: "AspettoDelFuoco"
|
ENCHANTMENT_FIRE_ASPECT: "AspettoDelFuoco"
|
||||||
|
@ -66,7 +66,6 @@ questEditorStages: "編集段階"
|
|||||||
questEditorRews: "報酬を編集"
|
questEditorRews: "報酬を編集"
|
||||||
questEditorOpts: "Edit Options"
|
questEditorOpts: "Edit Options"
|
||||||
questEditorEnterQuestName: "クエスト名を入力してください(<cancel>)"
|
questEditorEnterQuestName: "クエスト名を入力してください(<cancel>)"
|
||||||
questEditorEditEnterQuestName: "クエスト名を入力してください(<cancel>)"
|
|
||||||
questEditorEnterAskMessage: "尋ねるメッセージを入力してください(<cancel>)"
|
questEditorEnterAskMessage: "尋ねるメッセージを入力してください(<cancel>)"
|
||||||
questEditorEnterFinishMessage: "終了メッセージを入力してください(<cancel>)"
|
questEditorEnterFinishMessage: "終了メッセージを入力してください(<cancel>)"
|
||||||
questEditorEnterNPCStart: "Enter NPC ID, <clear>, <cancel>"
|
questEditorEnterNPCStart: "Enter NPC ID, <clear>, <cancel>"
|
||||||
@ -165,10 +164,6 @@ stageEditorDelete: "Delete Stage"
|
|||||||
stageEditorSetBlockNames: "Set block names"
|
stageEditorSetBlockNames: "Set block names"
|
||||||
stageEditorSetBlockAmounts: "Set block amounts"
|
stageEditorSetBlockAmounts: "Set block amounts"
|
||||||
stageEditorSetBlockDurability: "Set block durability"
|
stageEditorSetBlockDurability: "Set block durability"
|
||||||
stageEditorSetDamageAmounts: "Set damage amounts"
|
|
||||||
stageEditorSetPlaceAmounts: "Set place amounts"
|
|
||||||
stageEditorSetUseAmounts: "Set use amounts"
|
|
||||||
stageEditorSetCutAmounts: "Set cut amounts"
|
|
||||||
stageEditorSetKillAmounts: "Set kill amounts"
|
stageEditorSetKillAmounts: "Set kill amounts"
|
||||||
stageEditorSetEnchantAmounts: "Set enchant amounts"
|
stageEditorSetEnchantAmounts: "Set enchant amounts"
|
||||||
stageEditorSetMobAmounts: "Set mob amounts"
|
stageEditorSetMobAmounts: "Set mob amounts"
|
||||||
@ -197,11 +192,7 @@ stageEditorCustomAlreadyAdded: "That custom objective has already been added!"
|
|||||||
stageEditorCustomCleared: "Custom objectives cleared."
|
stageEditorCustomCleared: "Custom objectives cleared."
|
||||||
stageEditorCustomDataPrompt: "Enter value for <data>:"
|
stageEditorCustomDataPrompt: "Enter value for <data>:"
|
||||||
stageEditorEnterBlockNames: "Enter block names, <space>, <cancel>"
|
stageEditorEnterBlockNames: "Enter block names, <space>, <cancel>"
|
||||||
stageEditorBreakBlocksPrompt: "Enter break amounts (numbers), <space>, <cancel>"
|
stageEditorEnterBlockAmounts: "Enter block amounts, <space>, <cancel>"
|
||||||
stageEditorDamageBlocksPrompt: "Enter damage amounts (numbers), <space>, <cancel>"
|
|
||||||
stageEditorPlaceBlocksPrompt: "Enter place amounts (numbers), <space>, <cancel>"
|
|
||||||
stageEditorUseBlocksPrompt: "Enter use amounts (numbers), <space>, <cancel>"
|
|
||||||
stageEditorCutBlocksPrompt: "Enter cut amounts (numbers), <space>, <cancel>"
|
|
||||||
stageEditorEnterBlockDurability: "Enter block durability (numbers), <space>, <cancel>"
|
stageEditorEnterBlockDurability: "Enter block durability (numbers), <space>, <cancel>"
|
||||||
stageEditorCatchFishPrompt: "Enter number of fish to catch, <clear>, <cancel>"
|
stageEditorCatchFishPrompt: "Enter number of fish to catch, <clear>, <cancel>"
|
||||||
stageEditorKillPlayerPrompt: "Enter number of players to kill, <clear>, <cancel>"
|
stageEditorKillPlayerPrompt: "Enter number of players to kill, <clear>, <cancel>"
|
||||||
@ -601,16 +592,6 @@ timeZoneTitle: "- Time Zones -"
|
|||||||
enchantmentsTitle: "- Enchantments -"
|
enchantmentsTitle: "- Enchantments -"
|
||||||
questGUITitle: "- GUI Item Display -"
|
questGUITitle: "- GUI Item Display -"
|
||||||
questRegionTitle: "- Quest Region -"
|
questRegionTitle: "- Quest Region -"
|
||||||
effBlazeShoot: "Sound of a Blaze firing"
|
|
||||||
effBowFire: "Sound of a bow firing"
|
|
||||||
effClick1: "A click sound"
|
|
||||||
effClick2: "A different click sound"
|
|
||||||
effDoorToggle: "Sound of a door opening or closing"
|
|
||||||
effExtinguish: "Sound of fire being extinguished"
|
|
||||||
effGhastShoot: "Sound of a Ghast firing"
|
|
||||||
effGhastShriek: "Sound of a Ghast shrieking"
|
|
||||||
effZombieWood: "Sound of a Zombie chewing an iron door"
|
|
||||||
effZombieIron: "Sound of a Zombie chewing a wooden door"
|
|
||||||
effEnterName: "Enter an effect name to add it to the list, <cancel>"
|
effEnterName: "Enter an effect name to add it to the list, <cancel>"
|
||||||
cmdAdd: "追加"
|
cmdAdd: "追加"
|
||||||
strAdd: "then enter '<command>' to include it"
|
strAdd: "then enter '<command>' to include it"
|
||||||
|
@ -66,7 +66,6 @@ questEditorStages: "단계 수정"
|
|||||||
questEditorRews: "보상 수정"
|
questEditorRews: "보상 수정"
|
||||||
questEditorOpts: "옵션 수정"
|
questEditorOpts: "옵션 수정"
|
||||||
questEditorEnterQuestName: "퀘스트 이름 입력 (<cancel>)"
|
questEditorEnterQuestName: "퀘스트 이름 입력 (<cancel>)"
|
||||||
questEditorEditEnterQuestName: "수정을 위한 퀘스트 이름 입력 (<cancel>)"
|
|
||||||
questEditorEnterAskMessage: "질문 입력 (<cancel>)"
|
questEditorEnterAskMessage: "질문 입력 (<cancel>)"
|
||||||
questEditorEnterFinishMessage: "마지막메시지 입력 (<cancel>)"
|
questEditorEnterFinishMessage: "마지막메시지 입력 (<cancel>)"
|
||||||
questEditorEnterNPCStart: "NPC 이름 입력, <clear>, <cancel>"
|
questEditorEnterNPCStart: "NPC 이름 입력, <clear>, <cancel>"
|
||||||
@ -165,10 +164,6 @@ stageEditorDelete: "삭제 스테이지"
|
|||||||
stageEditorSetBlockNames: "블록 이름 설정"
|
stageEditorSetBlockNames: "블록 이름 설정"
|
||||||
stageEditorSetBlockAmounts: "블록 갯수 설정"
|
stageEditorSetBlockAmounts: "블록 갯수 설정"
|
||||||
stageEditorSetBlockDurability: "블록 내구성 설정"
|
stageEditorSetBlockDurability: "블록 내구성 설정"
|
||||||
stageEditorSetDamageAmounts: "데미지 양 설정"
|
|
||||||
stageEditorSetPlaceAmounts: "놓는 양 설정"
|
|
||||||
stageEditorSetUseAmounts: "사용할 양 설정"
|
|
||||||
stageEditorSetCutAmounts: "벨 양 설정"
|
|
||||||
stageEditorSetKillAmounts: "죽일 양 설정"
|
stageEditorSetKillAmounts: "죽일 양 설정"
|
||||||
stageEditorSetEnchantAmounts: "인챈트 양 설정"
|
stageEditorSetEnchantAmounts: "인챈트 양 설정"
|
||||||
stageEditorSetMobAmounts: "몬스터 양 설정"
|
stageEditorSetMobAmounts: "몬스터 양 설정"
|
||||||
@ -197,11 +192,7 @@ stageEditorCustomAlreadyAdded: "그 커스텀 목표는 이미 추가되었습
|
|||||||
stageEditorCustomCleared: "사용자 정의 목표가 삭제되었습니다."
|
stageEditorCustomCleared: "사용자 정의 목표가 삭제되었습니다."
|
||||||
stageEditorCustomDataPrompt: "값 입력 <data>:"
|
stageEditorCustomDataPrompt: "값 입력 <data>:"
|
||||||
stageEditorEnterBlockNames: "블록 이름 입력, <space>, <cancel>"
|
stageEditorEnterBlockNames: "블록 이름 입력, <space>, <cancel>"
|
||||||
stageEditorBreakBlocksPrompt: "부술 양(숫자) 입력, <space>, <cancel>"
|
stageEditorEnterBlockAmounts: "Enter block amounts, <space>, <cancel>"
|
||||||
stageEditorDamageBlocksPrompt: "데미지 양(숫자) 입력, <space>, <cancel>"
|
|
||||||
stageEditorPlaceBlocksPrompt: "놓을 양 입력 (숫자), <space>, <cancel>"
|
|
||||||
stageEditorUseBlocksPrompt: "사용 량 입력 (숫자), <space>, <cancel>"
|
|
||||||
stageEditorCutBlocksPrompt: "삭제 량 입력 (숫자), <space>, <cancel>"
|
|
||||||
stageEditorEnterBlockDurability: "블록 내구량 입력 (숫자), <space>, <cancel>"
|
stageEditorEnterBlockDurability: "블록 내구량 입력 (숫자), <space>, <cancel>"
|
||||||
stageEditorCatchFishPrompt: "물고기 잡을 수량 입력, <clear>, <cancel>"
|
stageEditorCatchFishPrompt: "물고기 잡을 수량 입력, <clear>, <cancel>"
|
||||||
stageEditorKillPlayerPrompt: "죽이려는 플레이어 수를 입력하십시오, <clear>, <cancel>"
|
stageEditorKillPlayerPrompt: "죽이려는 플레이어 수를 입력하십시오, <clear>, <cancel>"
|
||||||
@ -601,16 +592,6 @@ timeZoneTitle: "- 시간대 -"
|
|||||||
enchantmentsTitle: "-인챈트-"
|
enchantmentsTitle: "-인챈트-"
|
||||||
questGUITitle: "- GUI 항목 표시 -"
|
questGUITitle: "- GUI 항목 표시 -"
|
||||||
questRegionTitle: "- 퀘스트 지역 -"
|
questRegionTitle: "- 퀘스트 지역 -"
|
||||||
effBlazeShoot: "블레이즈 발사 소리"
|
|
||||||
effBowFire: "활 발사 소리"
|
|
||||||
effClick1: "클릭 소리"
|
|
||||||
effClick2: "다른 클릭 소리"
|
|
||||||
effDoorToggle: "문 열림 또는 닫음 소리"
|
|
||||||
effExtinguish: "불 꺼지는 소리"
|
|
||||||
effGhastShoot: "가스트 발사 소리"
|
|
||||||
effGhastShriek: "가스트 울음 소리"
|
|
||||||
effZombieWood: "철제 문을 때리는 좀비 소리"
|
|
||||||
effZombieIron: "나무 문을 때리는 좀비 소리"
|
|
||||||
effEnterName: "효과 이름을 입력하여 목록에 추가, <cancel>"
|
effEnterName: "효과 이름을 입력하여 목록에 추가, <cancel>"
|
||||||
cmdAdd: "추가"
|
cmdAdd: "추가"
|
||||||
strAdd: "'<command>' 를 입력하여 그것을 포함 시키십시오"
|
strAdd: "'<command>' 를 입력하여 그것을 포함 시키십시오"
|
||||||
|
@ -66,7 +66,6 @@ questEditorStages: "Werk de Fasen bij"
|
|||||||
questEditorRews: "Werk de Beloningen bij"
|
questEditorRews: "Werk de Beloningen bij"
|
||||||
questEditorOpts: "Wijzig Opties"
|
questEditorOpts: "Wijzig Opties"
|
||||||
questEditorEnterQuestName: "Voer de naam van de Quest in (<cancel>)"
|
questEditorEnterQuestName: "Voer de naam van de Quest in (<cancel>)"
|
||||||
questEditorEditEnterQuestName: "Voer de naam van de Quest in om te bewerken (<cancel>)"
|
|
||||||
questEditorEnterAskMessage: "Voer het vraag-bericht in (<cancel>)"
|
questEditorEnterAskMessage: "Voer het vraag-bericht in (<cancel>)"
|
||||||
questEditorEnterFinishMessage: "Voer het eind-bericht in (<cancel>)"
|
questEditorEnterFinishMessage: "Voer het eind-bericht in (<cancel>)"
|
||||||
questEditorEnterNPCStart: "Voer NPC ID in, <clear>, <cancel>"
|
questEditorEnterNPCStart: "Voer NPC ID in, <clear>, <cancel>"
|
||||||
@ -123,8 +122,8 @@ stageEditorCutBlocks: "Blokken Knippen"
|
|||||||
stageEditorItems: "Voorwerpen"
|
stageEditorItems: "Voorwerpen"
|
||||||
stageEditorCraftItems: "Voorwerpen maken"
|
stageEditorCraftItems: "Voorwerpen maken"
|
||||||
stageEditorSmeltItems: "Smelt items"
|
stageEditorSmeltItems: "Smelt items"
|
||||||
stageEditorEnchantItems: "Betover Items"
|
stageEditorEnchantItems: "Betover items"
|
||||||
stageEditorBrewPotions: "Brew potions"
|
stageEditorBrewPotions: "Brouw drankjes"
|
||||||
stageEditorNPCs: "NPC's"
|
stageEditorNPCs: "NPC's"
|
||||||
stageEditorDeliverItems: "Breng Spullen"
|
stageEditorDeliverItems: "Breng Spullen"
|
||||||
stageEditorTalkToNPCs: "Praat met NPC's"
|
stageEditorTalkToNPCs: "Praat met NPC's"
|
||||||
@ -165,10 +164,6 @@ stageEditorDelete: "Verwijder Fase"
|
|||||||
stageEditorSetBlockNames: "Geef blok namen"
|
stageEditorSetBlockNames: "Geef blok namen"
|
||||||
stageEditorSetBlockAmounts: "Zet blok aantallen"
|
stageEditorSetBlockAmounts: "Zet blok aantallen"
|
||||||
stageEditorSetBlockDurability: "Geef de blok sterkte"
|
stageEditorSetBlockDurability: "Geef de blok sterkte"
|
||||||
stageEditorSetDamageAmounts: "Geef de vastgestelde schade"
|
|
||||||
stageEditorSetPlaceAmounts: "Zet de hoeveelheid plaatsen"
|
|
||||||
stageEditorSetUseAmounts: "Geef de aantal keer dat je het kan gebruiken"
|
|
||||||
stageEditorSetCutAmounts: "Geef de keren dat je mag snijden"
|
|
||||||
stageEditorSetKillAmounts: "Geef de aantal kills"
|
stageEditorSetKillAmounts: "Geef de aantal kills"
|
||||||
stageEditorSetEnchantAmounts: "Geef de aantal betoverde spullen aan"
|
stageEditorSetEnchantAmounts: "Geef de aantal betoverde spullen aan"
|
||||||
stageEditorSetMobAmounts: "Geef de aantal monsters in"
|
stageEditorSetMobAmounts: "Geef de aantal monsters in"
|
||||||
@ -197,11 +192,7 @@ stageEditorCustomAlreadyAdded: "Die custom Quest is al geadd!"
|
|||||||
stageEditorCustomCleared: "Custom Quest cleared."
|
stageEditorCustomCleared: "Custom Quest cleared."
|
||||||
stageEditorCustomDataPrompt: "Typ waarde voor <data>:"
|
stageEditorCustomDataPrompt: "Typ waarde voor <data>:"
|
||||||
stageEditorEnterBlockNames: "Typ blok namen, <space>, <cancel>"
|
stageEditorEnterBlockNames: "Typ blok namen, <space>, <cancel>"
|
||||||
stageEditorBreakBlocksPrompt: "Typ aantal dat gebroken moet worden (nummers), <space>, <cancel>"
|
stageEditorEnterBlockAmounts: "Enter block amounts, <space>, <cancel>"
|
||||||
stageEditorDamageBlocksPrompt: "Typ aanvallen die moeten worden gedaan (nummers), <space>, <cancel>"
|
|
||||||
stageEditorPlaceBlocksPrompt: "Typ aantal geplaatste (nummers), <space>, <cancel>"
|
|
||||||
stageEditorUseBlocksPrompt: "Typ gebruikt aantal (nummers), <space>, <cancel>"
|
|
||||||
stageEditorCutBlocksPrompt: "Typ aantal geschoren (nummers), <space>, <cancel>"
|
|
||||||
stageEditorEnterBlockDurability: "Typ blok duurzaamheid (nummers), <space>, <cancel>"
|
stageEditorEnterBlockDurability: "Typ blok duurzaamheid (nummers), <space>, <cancel>"
|
||||||
stageEditorCatchFishPrompt: "Voer de hoeveelheid vis in die gevangen moet worden, <clear>, <cancel>"
|
stageEditorCatchFishPrompt: "Voer de hoeveelheid vis in die gevangen moet worden, <clear>, <cancel>"
|
||||||
stageEditorKillPlayerPrompt: "Voer het aantal te vermoorden spelers in, <clear>, <cancel>"
|
stageEditorKillPlayerPrompt: "Voer het aantal te vermoorden spelers in, <clear>, <cancel>"
|
||||||
@ -242,7 +233,7 @@ stageEditorObjectiveOverrideCleared: "Objectieve weergave overschrijven uitgesch
|
|||||||
stageEditorDeliveryAddItem: "Voeg item toe"
|
stageEditorDeliveryAddItem: "Voeg item toe"
|
||||||
stageEditorDeliveryNPCs: "Stel NPD IDs in"
|
stageEditorDeliveryNPCs: "Stel NPD IDs in"
|
||||||
stageEditorDeliveryMessages: "Stel bezorg bericht in"
|
stageEditorDeliveryMessages: "Stel bezorg bericht in"
|
||||||
stageEditorNotSolid: "is not a solid block!"
|
stageEditorNotSolid: "is geen solide blok!"
|
||||||
stageEditorInvalidBlockName: "is geen geldige blok naam!"
|
stageEditorInvalidBlockName: "is geen geldige blok naam!"
|
||||||
stageEditorInvalidEnchantment: "is niet de naam van een geldige betovering!"
|
stageEditorInvalidEnchantment: "is niet de naam van een geldige betovering!"
|
||||||
stageEditorInvalidNPC: "is geen NPC ID!"
|
stageEditorInvalidNPC: "is geen NPC ID!"
|
||||||
@ -421,8 +412,8 @@ reqSetHeroes: "Stel Heroes vereisten"
|
|||||||
reqSetCustom: "Stel vereisten in"
|
reqSetCustom: "Stel vereisten in"
|
||||||
reqSetFail: "Stel melding mislukte vereisten in"
|
reqSetFail: "Stel melding mislukte vereisten in"
|
||||||
reqSetSkills: "Stel vaardigheden in"
|
reqSetSkills: "Stel vaardigheden in"
|
||||||
reqSetSkillAmounts: "Set skill amounts"
|
reqSetSkillAmounts: "Stel hoeveelheid vaardigheid in"
|
||||||
reqHeroesSetPrimary: "Set Primary Class"
|
reqHeroesSetPrimary: "Stel Primaire klasse in"
|
||||||
reqHeroesSetSecondary: "Set Secondary Class"
|
reqHeroesSetSecondary: "Set Secondary Class"
|
||||||
reqMoneyPrompt: "Enter amount of <money>, <clear>, <cancel>"
|
reqMoneyPrompt: "Enter amount of <money>, <clear>, <cancel>"
|
||||||
reqQuestPointsPrompt: "Enter amount of Quest Points, <clear>, <cancel>"
|
reqQuestPointsPrompt: "Enter amount of Quest Points, <clear>, <cancel>"
|
||||||
@ -601,16 +592,6 @@ timeZoneTitle: "- Tijdzones -"
|
|||||||
enchantmentsTitle: "- Betoveringen -"
|
enchantmentsTitle: "- Betoveringen -"
|
||||||
questGUITitle: "- GUI Item Weergave -"
|
questGUITitle: "- GUI Item Weergave -"
|
||||||
questRegionTitle: "- Opdracht Regio -"
|
questRegionTitle: "- Opdracht Regio -"
|
||||||
effBlazeShoot: "Geluid van een Blaze die schiet"
|
|
||||||
effBowFire: "Geluid van een boog die schiet"
|
|
||||||
effClick1: "Een klik geluid"
|
|
||||||
effClick2: "Een ander klik geluid"
|
|
||||||
effDoorToggle: "Geluid van een deur die opent of sluit"
|
|
||||||
effExtinguish: "Geluid van vuur dat geblust wordt"
|
|
||||||
effGhastShoot: "Geluid van een Ghast die schiet"
|
|
||||||
effGhastShriek: "Geluid van een krimp van Ghast"
|
|
||||||
effZombieWood: "Geluid van een Zombie die op een ijzeren deur kauwt"
|
|
||||||
effZombieIron: "Geluid van een Zombie die op een houten deur kauwt"
|
|
||||||
effEnterName: "Voer een effect naam in om het toe te voegen aan de lijst, <cancel>"
|
effEnterName: "Voer een effect naam in om het toe te voegen aan de lijst, <cancel>"
|
||||||
cmdAdd: "toevoegen"
|
cmdAdd: "toevoegen"
|
||||||
strAdd: "voer dan '<command>' in om het op te nemen"
|
strAdd: "voer dan '<command>' in om het op te nemen"
|
||||||
|
@ -66,7 +66,6 @@ questEditorStages: "Edytuj Etapy"
|
|||||||
questEditorRews: "Edytuj nagrody"
|
questEditorRews: "Edytuj nagrody"
|
||||||
questEditorOpts: "Edytuj Opcje"
|
questEditorOpts: "Edytuj Opcje"
|
||||||
questEditorEnterQuestName: "Wprowadź nazwę Zadania (<cancel>)"
|
questEditorEnterQuestName: "Wprowadź nazwę Zadania (<cancel>)"
|
||||||
questEditorEditEnterQuestName: "Wprowadź nazwe Zadania aby edytować (<cancel>)"
|
|
||||||
questEditorEnterAskMessage: "Wprowadź wiadomość zapytanie (<cancel>)"
|
questEditorEnterAskMessage: "Wprowadź wiadomość zapytanie (<cancel>)"
|
||||||
questEditorEnterFinishMessage: "Wprowadź nazwę wiadomości (<cancel>)"
|
questEditorEnterFinishMessage: "Wprowadź nazwę wiadomości (<cancel>)"
|
||||||
questEditorEnterNPCStart: "Wprowadź NPC ID, <clear>, <cancel>"
|
questEditorEnterNPCStart: "Wprowadź NPC ID, <clear>, <cancel>"
|
||||||
@ -165,10 +164,6 @@ stageEditorDelete: "Usuń Etap"
|
|||||||
stageEditorSetBlockNames: "Ustaw nazwy bloków"
|
stageEditorSetBlockNames: "Ustaw nazwy bloków"
|
||||||
stageEditorSetBlockAmounts: "Ustaw cenę bloku"
|
stageEditorSetBlockAmounts: "Ustaw cenę bloku"
|
||||||
stageEditorSetBlockDurability: "Ustaw trwałość bloku"
|
stageEditorSetBlockDurability: "Ustaw trwałość bloku"
|
||||||
stageEditorSetDamageAmounts: "Ustaw kwotę uszkodzenia"
|
|
||||||
stageEditorSetPlaceAmounts: "Ustaw kwotę miejsca"
|
|
||||||
stageEditorSetUseAmounts: "Ustaw kwotę za używanie"
|
|
||||||
stageEditorSetCutAmounts: "Ustaw koszty cięcia"
|
|
||||||
stageEditorSetKillAmounts: "Ustaw kwotę zabójstwa"
|
stageEditorSetKillAmounts: "Ustaw kwotę zabójstwa"
|
||||||
stageEditorSetEnchantAmounts: "Ustaw koszty zaczarowania"
|
stageEditorSetEnchantAmounts: "Ustaw koszty zaczarowania"
|
||||||
stageEditorSetMobAmounts: "Ustaw koszty potwora"
|
stageEditorSetMobAmounts: "Ustaw koszty potwora"
|
||||||
@ -197,11 +192,7 @@ stageEditorCustomAlreadyAdded: "Ten niestandardowy cel został już dodany!"
|
|||||||
stageEditorCustomCleared: "Niestandardowe cele wyczyszczone."
|
stageEditorCustomCleared: "Niestandardowe cele wyczyszczone."
|
||||||
stageEditorCustomDataPrompt: "Wprowadź wartość dla <data>:"
|
stageEditorCustomDataPrompt: "Wprowadź wartość dla <data>:"
|
||||||
stageEditorEnterBlockNames: "Wpisz nazwę bloku, <space>, <cancel>"
|
stageEditorEnterBlockNames: "Wpisz nazwę bloku, <space>, <cancel>"
|
||||||
stageEditorBreakBlocksPrompt: "Wpisz liczbę zużycia (numery), <space>, <cancel>"
|
stageEditorEnterBlockAmounts: "Enter block amounts, <space>, <cancel>"
|
||||||
stageEditorDamageBlocksPrompt: "Wpisz liczbę obrażeń (numery), <space>, <cancel>"
|
|
||||||
stageEditorPlaceBlocksPrompt: "Wpisz liczbę miejsc (numery), <space>, <cancel>"
|
|
||||||
stageEditorUseBlocksPrompt: "Wpisz liczbę użyć (numery), <space>, <cancel>"
|
|
||||||
stageEditorCutBlocksPrompt: "Wprowadź liczbę cięć (numery), <space>, <cancel>"
|
|
||||||
stageEditorEnterBlockDurability: "Wpisz wytrzymałość bloku (numery), <space>, <cancel>"
|
stageEditorEnterBlockDurability: "Wpisz wytrzymałość bloku (numery), <space>, <cancel>"
|
||||||
stageEditorCatchFishPrompt: "Wpisz liczbę ryb do złapania, <clear>, <cancel>"
|
stageEditorCatchFishPrompt: "Wpisz liczbę ryb do złapania, <clear>, <cancel>"
|
||||||
stageEditorKillPlayerPrompt: "Wpisz liczbę graczy do zabicia, <clear>, <cancel>"
|
stageEditorKillPlayerPrompt: "Wpisz liczbę graczy do zabicia, <clear>, <cancel>"
|
||||||
@ -601,16 +592,6 @@ timeZoneTitle: "- Strefy Czasowe -"
|
|||||||
enchantmentsTitle: "- Ulepszenia magiczne -"
|
enchantmentsTitle: "- Ulepszenia magiczne -"
|
||||||
questGUITitle: "- Wyświetlanie GUI przedmiotów -"
|
questGUITitle: "- Wyświetlanie GUI przedmiotów -"
|
||||||
questRegionTitle: "- Region Misji -"
|
questRegionTitle: "- Region Misji -"
|
||||||
effBlazeShoot: "Dźwięk strzelania Blaze'a"
|
|
||||||
effBowFire: "Dźwięk strzelania z łuku"
|
|
||||||
effClick1: "Dźwięk klikania"
|
|
||||||
effClick2: "Inny dźwięk klikania"
|
|
||||||
effDoorToggle: "Dźwięk otwierania lub zamykania drzwi"
|
|
||||||
effExtinguish: "Odgłos gaszenia pożaru"
|
|
||||||
effGhastShoot: "Dźwięk strzelania Ghasta"
|
|
||||||
effGhastShriek: "Dźwięk krzyku Ghasta"
|
|
||||||
effZombieWood: "Dźwięk zombie przeżuwającego żelazne drzwi"
|
|
||||||
effZombieIron: "Dźwięk zombie przeżuwającego drewniane drzwi"
|
|
||||||
effEnterName: "Wprowadź nazwę efektu, aby dodać ją do listy, <cancel>"
|
effEnterName: "Wprowadź nazwę efektu, aby dodać ją do listy, <cancel>"
|
||||||
cmdAdd: "dodaj"
|
cmdAdd: "dodaj"
|
||||||
strAdd: "potem wpisz '<command>' aby dodać go"
|
strAdd: "potem wpisz '<command>' aby dodać go"
|
||||||
|
@ -66,7 +66,6 @@ questEditorStages: "Edite os Estágios"
|
|||||||
questEditorRews: "Edite as Recompensas"
|
questEditorRews: "Edite as Recompensas"
|
||||||
questEditorOpts: "Editar Opções"
|
questEditorOpts: "Editar Opções"
|
||||||
questEditorEnterQuestName: "Digite o nome da Quest (<cancel>)"
|
questEditorEnterQuestName: "Digite o nome da Quest (<cancel>)"
|
||||||
questEditorEditEnterQuestName: "Digite o nome da Quest para editar (<cancel>)"
|
|
||||||
questEditorEnterAskMessage: "Digite a mensagem de pergunta (<cancel>)"
|
questEditorEnterAskMessage: "Digite a mensagem de pergunta (<cancel>)"
|
||||||
questEditorEnterFinishMessage: "Digite a mensagem final (<cancel>)"
|
questEditorEnterFinishMessage: "Digite a mensagem final (<cancel>)"
|
||||||
questEditorEnterNPCStart: "Coloque o ID do NPC, <clear>, <cancel>"
|
questEditorEnterNPCStart: "Coloque o ID do NPC, <clear>, <cancel>"
|
||||||
@ -165,10 +164,6 @@ stageEditorDelete: "Deletar Estágio"
|
|||||||
stageEditorSetBlockNames: "Definir nomes de blocos"
|
stageEditorSetBlockNames: "Definir nomes de blocos"
|
||||||
stageEditorSetBlockAmounts: "Definir quantidades de bloco"
|
stageEditorSetBlockAmounts: "Definir quantidades de bloco"
|
||||||
stageEditorSetBlockDurability: "Definir a validade do bloco"
|
stageEditorSetBlockDurability: "Definir a validade do bloco"
|
||||||
stageEditorSetDamageAmounts: "Definir a quantidade de danos"
|
|
||||||
stageEditorSetPlaceAmounts: "Definir valores de local"
|
|
||||||
stageEditorSetUseAmounts: "Definir valores de uso"
|
|
||||||
stageEditorSetCutAmounts: "Definir quantidades cortadas"
|
|
||||||
stageEditorSetKillAmounts: "Definir quantidades de kill"
|
stageEditorSetKillAmounts: "Definir quantidades de kill"
|
||||||
stageEditorSetEnchantAmounts: "Definir quantias de encantamento"
|
stageEditorSetEnchantAmounts: "Definir quantias de encantamento"
|
||||||
stageEditorSetMobAmounts: "Definir quantidades máximas"
|
stageEditorSetMobAmounts: "Definir quantidades máximas"
|
||||||
@ -197,11 +192,7 @@ stageEditorCustomAlreadyAdded: "Esse objetivo personalizado já foi adicionado!"
|
|||||||
stageEditorCustomCleared: "Objetivos personalizados limpos."
|
stageEditorCustomCleared: "Objetivos personalizados limpos."
|
||||||
stageEditorCustomDataPrompt: "Digite o valor para <data>:"
|
stageEditorCustomDataPrompt: "Digite o valor para <data>:"
|
||||||
stageEditorEnterBlockNames: "Digite o nome dos blocos (ou IDs), <space>, <cancel>"
|
stageEditorEnterBlockNames: "Digite o nome dos blocos (ou IDs), <space>, <cancel>"
|
||||||
stageEditorBreakBlocksPrompt: "Insira valores de quebra (números), <space>, <cancel>"
|
stageEditorEnterBlockAmounts: "Enter block amounts, <space>, <cancel>"
|
||||||
stageEditorDamageBlocksPrompt: "Insira valores de danos (números), <space>, <cancel>"
|
|
||||||
stageEditorPlaceBlocksPrompt: "Insira valores de locais (números), <space>, <cancel>"
|
|
||||||
stageEditorUseBlocksPrompt: "Digite valores de uso (números), <space>, <cancel>"
|
|
||||||
stageEditorCutBlocksPrompt: "Digite valores de corte (números), <space>, <cancel>"
|
|
||||||
stageEditorEnterBlockDurability: "Digite a durabilidade do bloco (números), <space>, <cancel>"
|
stageEditorEnterBlockDurability: "Digite a durabilidade do bloco (números), <space>, <cancel>"
|
||||||
stageEditorCatchFishPrompt: "Digite o número de peixes a capturar, <clear>, <cancel>"
|
stageEditorCatchFishPrompt: "Digite o número de peixes a capturar, <clear>, <cancel>"
|
||||||
stageEditorKillPlayerPrompt: "Insira o número de jogadores para matar, <clear>, <cancel>"
|
stageEditorKillPlayerPrompt: "Insira o número de jogadores para matar, <clear>, <cancel>"
|
||||||
@ -601,16 +592,6 @@ timeZoneTitle: "- Fuso horário -"
|
|||||||
enchantmentsTitle: "- Encantamentos -"
|
enchantmentsTitle: "- Encantamentos -"
|
||||||
questGUITitle: "- Exibição de Item GUI -"
|
questGUITitle: "- Exibição de Item GUI -"
|
||||||
questRegionTitle: "- Região da Missão -"
|
questRegionTitle: "- Região da Missão -"
|
||||||
effBlazeShoot: "Som da bola de fogo do Blaze"
|
|
||||||
effBowFire: "Som de um tiro de arco"
|
|
||||||
effClick1: "Som de um clique"
|
|
||||||
effClick2: "Um som de clique diferente"
|
|
||||||
effDoorToggle: "Som de uma abertura ou fechamento de porta"
|
|
||||||
effExtinguish: "Som de fogo extinguido"
|
|
||||||
effGhastShoot: "Som de um tiro de Ghast"
|
|
||||||
effGhastShriek: "Som de um tiro de choro de Ghast"
|
|
||||||
effZombieWood: "Som de um Zumbi mastigando uma porta de ferro"
|
|
||||||
effZombieIron: "Som de um Zumbi mastigando uma porta de madeira"
|
|
||||||
effEnterName: "Digite um nome de efeito para adicioná-lo à lista, <cancel>"
|
effEnterName: "Digite um nome de efeito para adicioná-lo à lista, <cancel>"
|
||||||
cmdAdd: "adicionar"
|
cmdAdd: "adicionar"
|
||||||
strAdd: "então insira '<command>' para incluí-lo"
|
strAdd: "então insira '<command>' para incluí-lo"
|
||||||
|
@ -66,7 +66,6 @@ questEditorStages: "Editar Estágios"
|
|||||||
questEditorRews: "Editar Recompensas"
|
questEditorRews: "Editar Recompensas"
|
||||||
questEditorOpts: "Edit Options"
|
questEditorOpts: "Edit Options"
|
||||||
questEditorEnterQuestName: "Introduzir o nome da Quest (<cancel>)"
|
questEditorEnterQuestName: "Introduzir o nome da Quest (<cancel>)"
|
||||||
questEditorEditEnterQuestName: "Introduzir o nome da Quest para editar (<cancel>)"
|
|
||||||
questEditorEnterAskMessage: "Introduzir mensagem final (<cancel>)"
|
questEditorEnterAskMessage: "Introduzir mensagem final (<cancel>)"
|
||||||
questEditorEnterFinishMessage: "Introduzir mensagem final (<cancel>)"
|
questEditorEnterFinishMessage: "Introduzir mensagem final (<cancel>)"
|
||||||
questEditorEnterNPCStart: "Enter NPC ID, <clear>, <cancel>"
|
questEditorEnterNPCStart: "Enter NPC ID, <clear>, <cancel>"
|
||||||
@ -165,10 +164,6 @@ stageEditorDelete: "Eliminar Estágio"
|
|||||||
stageEditorSetBlockNames: "Definir nomes dos blocos"
|
stageEditorSetBlockNames: "Definir nomes dos blocos"
|
||||||
stageEditorSetBlockAmounts: "Definir quantidades dos blocos"
|
stageEditorSetBlockAmounts: "Definir quantidades dos blocos"
|
||||||
stageEditorSetBlockDurability: "Definir durabilidade do bloco"
|
stageEditorSetBlockDurability: "Definir durabilidade do bloco"
|
||||||
stageEditorSetDamageAmounts: "Definir quantidades de danos"
|
|
||||||
stageEditorSetPlaceAmounts: "Definir montantes do local"
|
|
||||||
stageEditorSetUseAmounts: "Definir quantidades de uso"
|
|
||||||
stageEditorSetCutAmounts: "Definir quantidades cortadas"
|
|
||||||
stageEditorSetKillAmounts: "Set kill amounts"
|
stageEditorSetKillAmounts: "Set kill amounts"
|
||||||
stageEditorSetEnchantAmounts: "Set enchant amounts"
|
stageEditorSetEnchantAmounts: "Set enchant amounts"
|
||||||
stageEditorSetMobAmounts: "Set mob amounts"
|
stageEditorSetMobAmounts: "Set mob amounts"
|
||||||
@ -197,11 +192,7 @@ stageEditorCustomAlreadyAdded: "That custom objective has already been added!"
|
|||||||
stageEditorCustomCleared: "Custom objectives cleared."
|
stageEditorCustomCleared: "Custom objectives cleared."
|
||||||
stageEditorCustomDataPrompt: "Introduzir valor para <data>:"
|
stageEditorCustomDataPrompt: "Introduzir valor para <data>:"
|
||||||
stageEditorEnterBlockNames: "Introduzir nomes dos blocos (ou IDs), <space>,<cancel>"
|
stageEditorEnterBlockNames: "Introduzir nomes dos blocos (ou IDs), <space>,<cancel>"
|
||||||
stageEditorBreakBlocksPrompt: "Enter break amounts (numbers), <space>, <cancel>"
|
stageEditorEnterBlockAmounts: "Enter block amounts, <space>, <cancel>"
|
||||||
stageEditorDamageBlocksPrompt: "Introduzir quantidades de dano (números), <space>,<cancel>"
|
|
||||||
stageEditorPlaceBlocksPrompt: "Enter place amounts (numbers), <space>, <cancel>"
|
|
||||||
stageEditorUseBlocksPrompt: "Enter use amounts (numbers), <space>, <cancel>"
|
|
||||||
stageEditorCutBlocksPrompt: "Enter cut amounts (numbers), <space>, <cancel>"
|
|
||||||
stageEditorEnterBlockDurability: "Introduzir a durabilidade do bloco (números), <space>, <cancel>"
|
stageEditorEnterBlockDurability: "Introduzir a durabilidade do bloco (números), <space>, <cancel>"
|
||||||
stageEditorCatchFishPrompt: "Enter number of fish to catch, <clear>, <cancel>"
|
stageEditorCatchFishPrompt: "Enter number of fish to catch, <clear>, <cancel>"
|
||||||
stageEditorKillPlayerPrompt: "Enter number of players to kill, <clear>, <cancel>"
|
stageEditorKillPlayerPrompt: "Enter number of players to kill, <clear>, <cancel>"
|
||||||
@ -601,16 +592,6 @@ timeZoneTitle: "- Time Zones -"
|
|||||||
enchantmentsTitle: "- Enchantments -"
|
enchantmentsTitle: "- Enchantments -"
|
||||||
questGUITitle: "- GUI Item Display -"
|
questGUITitle: "- GUI Item Display -"
|
||||||
questRegionTitle: "- Quest Region -"
|
questRegionTitle: "- Quest Region -"
|
||||||
effBlazeShoot: "Sound of a Blaze firing"
|
|
||||||
effBowFire: "Sound of a bow firing"
|
|
||||||
effClick1: "A click sound"
|
|
||||||
effClick2: "A different click sound"
|
|
||||||
effDoorToggle: "Sound of a door opening or closing"
|
|
||||||
effExtinguish: "Sound of fire being extinguished"
|
|
||||||
effGhastShoot: "Sound of a Ghast firing"
|
|
||||||
effGhastShriek: "Sound of a Ghast shrieking"
|
|
||||||
effZombieWood: "Sound of a Zombie chewing an iron door"
|
|
||||||
effZombieIron: "Sound of a Zombie chewing a wooden door"
|
|
||||||
effEnterName: "Enter an effect name to add it to the list, <cancel>"
|
effEnterName: "Enter an effect name to add it to the list, <cancel>"
|
||||||
cmdAdd: "add"
|
cmdAdd: "add"
|
||||||
strAdd: "então introduza '<command>' para inclui-lo"
|
strAdd: "então introduza '<command>' para inclui-lo"
|
||||||
|
@ -66,7 +66,6 @@ questEditorStages: "Editare Etape"
|
|||||||
questEditorRews: "Editare Recompense"
|
questEditorRews: "Editare Recompense"
|
||||||
questEditorOpts: "Editeaza Optiuni"
|
questEditorOpts: "Editeaza Optiuni"
|
||||||
questEditorEnterQuestName: "Introduceţi numele de căutare (<cancel>)"
|
questEditorEnterQuestName: "Introduceţi numele de căutare (<cancel>)"
|
||||||
questEditorEditEnterQuestName: "Introduceţi numele de căutare să editaţi (<cancel>)"
|
|
||||||
questEditorEnterAskMessage: "Introduceţi mesaj cerere (<cancel>)"
|
questEditorEnterAskMessage: "Introduceţi mesaj cerere (<cancel>)"
|
||||||
questEditorEnterFinishMessage: "Introduceţi mesajul de finisaj (<cancel>)"
|
questEditorEnterFinishMessage: "Introduceţi mesajul de finisaj (<cancel>)"
|
||||||
questEditorEnterNPCStart: "Introduceţi ID-ul de NPC, <clear>, <cancel>"
|
questEditorEnterNPCStart: "Introduceţi ID-ul de NPC, <clear>, <cancel>"
|
||||||
@ -165,10 +164,6 @@ stageEditorDelete: "Şterge scenă"
|
|||||||
stageEditorSetBlockNames: "Setaţi numele blocul-lui"
|
stageEditorSetBlockNames: "Setaţi numele blocul-lui"
|
||||||
stageEditorSetBlockAmounts: "Setaţi numarul de bloc-uri"
|
stageEditorSetBlockAmounts: "Setaţi numarul de bloc-uri"
|
||||||
stageEditorSetBlockDurability: "Setaţi durabilitatea blocul-lui"
|
stageEditorSetBlockDurability: "Setaţi durabilitatea blocul-lui"
|
||||||
stageEditorSetDamageAmounts: "Setaţi damage-ul"
|
|
||||||
stageEditorSetPlaceAmounts: "Setați numărul de poziții"
|
|
||||||
stageEditorSetUseAmounts: "Setaţi numarul de utilizari"
|
|
||||||
stageEditorSetCutAmounts: "Setaţi numarul de taieri"
|
|
||||||
stageEditorSetKillAmounts: "Setaţi numarul de ucideri"
|
stageEditorSetKillAmounts: "Setaţi numarul de ucideri"
|
||||||
stageEditorSetEnchantAmounts: "Setați numărul de enchant-uri"
|
stageEditorSetEnchantAmounts: "Setați numărul de enchant-uri"
|
||||||
stageEditorSetMobAmounts: "Setați numărul de monștrii"
|
stageEditorSetMobAmounts: "Setați numărul de monștrii"
|
||||||
@ -197,11 +192,7 @@ stageEditorCustomAlreadyAdded: "Acest obiectiv personalizat a fost deja adăugat
|
|||||||
stageEditorCustomCleared: "Obiective personalizate șterse."
|
stageEditorCustomCleared: "Obiective personalizate șterse."
|
||||||
stageEditorCustomDataPrompt: "Introdu valoarea pentru <data>:"
|
stageEditorCustomDataPrompt: "Introdu valoarea pentru <data>:"
|
||||||
stageEditorEnterBlockNames: "Introdu numele blocurilor, <space>, <cancel>"
|
stageEditorEnterBlockNames: "Introdu numele blocurilor, <space>, <cancel>"
|
||||||
stageEditorBreakBlocksPrompt: "Introdu sumele de spargere (numere), <space>, <cancel>"
|
stageEditorEnterBlockAmounts: "Enter block amounts, <space>, <cancel>"
|
||||||
stageEditorDamageBlocksPrompt: "Introdu sumele de lovire (numere), <space>, <cancel>"
|
|
||||||
stageEditorPlaceBlocksPrompt: "Introdu sumele de punere (numere), <space>, <cancel>"
|
|
||||||
stageEditorUseBlocksPrompt: "Introdu sumele de folosire (numere), <space>, <cancel>"
|
|
||||||
stageEditorCutBlocksPrompt: "Introdu sumele de tăiere (numere), <space>, <cancel>"
|
|
||||||
stageEditorEnterBlockDurability: "Introdu durabilitatea blocurilor (numere), <space>, <cancel>"
|
stageEditorEnterBlockDurability: "Introdu durabilitatea blocurilor (numere), <space>, <cancel>"
|
||||||
stageEditorCatchFishPrompt: "Introdu câți pești să fie prinși, <clear>, <cancel>"
|
stageEditorCatchFishPrompt: "Introdu câți pești să fie prinși, <clear>, <cancel>"
|
||||||
stageEditorKillPlayerPrompt: "Introdu numărul de jucători omorâți, <clear>, <cancel>"
|
stageEditorKillPlayerPrompt: "Introdu numărul de jucători omorâți, <clear>, <cancel>"
|
||||||
@ -601,16 +592,6 @@ timeZoneTitle: "- Time Zones -"
|
|||||||
enchantmentsTitle: "- Enchantments -"
|
enchantmentsTitle: "- Enchantments -"
|
||||||
questGUITitle: "- GUI Item Display -"
|
questGUITitle: "- GUI Item Display -"
|
||||||
questRegionTitle: "- Quest Region -"
|
questRegionTitle: "- Quest Region -"
|
||||||
effBlazeShoot: "Sound of a Blaze firing"
|
|
||||||
effBowFire: "Sound of a bow firing"
|
|
||||||
effClick1: "A click sound"
|
|
||||||
effClick2: "A different click sound"
|
|
||||||
effDoorToggle: "Sound of a door opening or closing"
|
|
||||||
effExtinguish: "Sound of fire being extinguished"
|
|
||||||
effGhastShoot: "Sound of a Ghast firing"
|
|
||||||
effGhastShriek: "Sound of a Ghast shrieking"
|
|
||||||
effZombieWood: "Sound of a Zombie chewing an iron door"
|
|
||||||
effZombieIron: "Sound of a Zombie chewing a wooden door"
|
|
||||||
effEnterName: "Enter an effect name to add it to the list, <cancel>"
|
effEnterName: "Enter an effect name to add it to the list, <cancel>"
|
||||||
cmdAdd: "add"
|
cmdAdd: "add"
|
||||||
strAdd: "then enter '<command>' to include it"
|
strAdd: "then enter '<command>' to include it"
|
||||||
|
@ -66,7 +66,6 @@ questEditorStages: "Изменить этапы"
|
|||||||
questEditorRews: "Изменить награду"
|
questEditorRews: "Изменить награду"
|
||||||
questEditorOpts: "Изменить опции"
|
questEditorOpts: "Изменить опции"
|
||||||
questEditorEnterQuestName: "Введите имя квеста (<cancel>)"
|
questEditorEnterQuestName: "Введите имя квеста (<cancel>)"
|
||||||
questEditorEditEnterQuestName: "Введите имя квеста для изменения (<cancel>)"
|
|
||||||
questEditorEnterAskMessage: "Введите сообщение перед началом квеста (<cancel>)"
|
questEditorEnterAskMessage: "Введите сообщение перед началом квеста (<cancel>)"
|
||||||
questEditorEnterFinishMessage: "Введите заключительное сообщение (<cancel>)"
|
questEditorEnterFinishMessage: "Введите заключительное сообщение (<cancel>)"
|
||||||
questEditorEnterNPCStart: "Введите ID нпс'а, <clear>, <cancel>"
|
questEditorEnterNPCStart: "Введите ID нпс'а, <clear>, <cancel>"
|
||||||
@ -165,10 +164,6 @@ stageEditorDelete: "Удалить Стадию"
|
|||||||
stageEditorSetBlockNames: "Задать имена блока"
|
stageEditorSetBlockNames: "Задать имена блока"
|
||||||
stageEditorSetBlockAmounts: "Задать количества блока"
|
stageEditorSetBlockAmounts: "Задать количества блока"
|
||||||
stageEditorSetBlockDurability: "Задать прочность блока"
|
stageEditorSetBlockDurability: "Задать прочность блока"
|
||||||
stageEditorSetDamageAmounts: "Задать количество урона"
|
|
||||||
stageEditorSetPlaceAmounts: "Задать количество установок блока"
|
|
||||||
stageEditorSetUseAmounts: "Задать количество использований"
|
|
||||||
stageEditorSetCutAmounts: "Задать количество стрижек"
|
|
||||||
stageEditorSetKillAmounts: "Задать количество убийств"
|
stageEditorSetKillAmounts: "Задать количество убийств"
|
||||||
stageEditorSetEnchantAmounts: "Задать количество зачарований"
|
stageEditorSetEnchantAmounts: "Задать количество зачарований"
|
||||||
stageEditorSetMobAmounts: "Задать количество мобов"
|
stageEditorSetMobAmounts: "Задать количество мобов"
|
||||||
@ -197,11 +192,7 @@ stageEditorCustomAlreadyAdded: "Эта пользовательская цель
|
|||||||
stageEditorCustomCleared: "Пользовательские цели очищены."
|
stageEditorCustomCleared: "Пользовательские цели очищены."
|
||||||
stageEditorCustomDataPrompt: "Введите значение для <data>:"
|
stageEditorCustomDataPrompt: "Введите значение для <data>:"
|
||||||
stageEditorEnterBlockNames: "Введите названия блоков, <space>, <cancel>"
|
stageEditorEnterBlockNames: "Введите названия блоков, <space>, <cancel>"
|
||||||
stageEditorBreakBlocksPrompt: "Введите количества (числа) для разрушения, <space>, <cancel>"
|
stageEditorEnterBlockAmounts: "Enter block amounts, <space>, <cancel>"
|
||||||
stageEditorDamageBlocksPrompt: "Введите количества (числа) для разрушения, <space>, <cancel>"
|
|
||||||
stageEditorPlaceBlocksPrompt: "Введите количества (числа) для установки блоков, <space>, <cancel>"
|
|
||||||
stageEditorUseBlocksPrompt: "Введите количества (число) использований, <space>, <cancel>"
|
|
||||||
stageEditorCutBlocksPrompt: "Введите количества (число) срезаний блоков, <space>, <cancel>"
|
|
||||||
stageEditorEnterBlockDurability: "Введите прочность блока (числа), <space>, <cancel>"
|
stageEditorEnterBlockDurability: "Введите прочность блока (числа), <space>, <cancel>"
|
||||||
stageEditorCatchFishPrompt: "Введите количество рыбы, которую необходимо поймать, <clear>, <cancel>"
|
stageEditorCatchFishPrompt: "Введите количество рыбы, которую необходимо поймать, <clear>, <cancel>"
|
||||||
stageEditorKillPlayerPrompt: "Введите количество игроков, которых необходимо убить, <clear>, <cancel>"
|
stageEditorKillPlayerPrompt: "Введите количество игроков, которых необходимо убить, <clear>, <cancel>"
|
||||||
@ -601,16 +592,6 @@ timeZoneTitle: "- Часовые Пояса -"
|
|||||||
enchantmentsTitle: "- Зачарования -"
|
enchantmentsTitle: "- Зачарования -"
|
||||||
questGUITitle: "- Дисплей Предметов -"
|
questGUITitle: "- Дисплей Предметов -"
|
||||||
questRegionTitle: "- Регион Квеста -"
|
questRegionTitle: "- Регион Квеста -"
|
||||||
effBlazeShoot: "Звук пламени"
|
|
||||||
effBowFire: "Звук выстрела из лука"
|
|
||||||
effClick1: "Звук щелчка"
|
|
||||||
effClick2: "Другой звук щелчка"
|
|
||||||
effDoorToggle: "Звук открывания/закрывания двери"
|
|
||||||
effExtinguish: "Звук тушения огня"
|
|
||||||
effGhastShoot: "Звук фаербола гаста"
|
|
||||||
effGhastShriek: "Звук крика гаста"
|
|
||||||
effZombieWood: "Звук зомби, ломающего железную дверь"
|
|
||||||
effZombieIron: "Звук зомби, ломающего деревянную дверь"
|
|
||||||
effEnterName: "Введите имя эффекта, чтобы добавить его в список, <cancel>"
|
effEnterName: "Введите имя эффекта, чтобы добавить его в список, <cancel>"
|
||||||
cmdAdd: "добавить"
|
cmdAdd: "добавить"
|
||||||
strAdd: "затем введите команду '<command>', чтобы включить это"
|
strAdd: "затем введите команду '<command>', чтобы включить это"
|
||||||
|
@ -66,7 +66,6 @@ questEditorStages: "Edit Stages"
|
|||||||
questEditorRews: "Edit Rewards"
|
questEditorRews: "Edit Rewards"
|
||||||
questEditorOpts: "Edit Options"
|
questEditorOpts: "Edit Options"
|
||||||
questEditorEnterQuestName: "Enter Quest name (<cancel>)"
|
questEditorEnterQuestName: "Enter Quest name (<cancel>)"
|
||||||
questEditorEditEnterQuestName: "Enter Quest name to edit (<cancel>)"
|
|
||||||
questEditorEnterAskMessage: "Enter ask message (<cancel>)"
|
questEditorEnterAskMessage: "Enter ask message (<cancel>)"
|
||||||
questEditorEnterFinishMessage: "Enter finish message (<cancel>)"
|
questEditorEnterFinishMessage: "Enter finish message (<cancel>)"
|
||||||
questEditorEnterNPCStart: "Enter NPC ID, <clear>, <cancel>"
|
questEditorEnterNPCStart: "Enter NPC ID, <clear>, <cancel>"
|
||||||
@ -165,10 +164,6 @@ stageEditorDelete: "Delete Stage"
|
|||||||
stageEditorSetBlockNames: "Set block names"
|
stageEditorSetBlockNames: "Set block names"
|
||||||
stageEditorSetBlockAmounts: "Set block amounts"
|
stageEditorSetBlockAmounts: "Set block amounts"
|
||||||
stageEditorSetBlockDurability: "Set block durability"
|
stageEditorSetBlockDurability: "Set block durability"
|
||||||
stageEditorSetDamageAmounts: "Set damage amounts"
|
|
||||||
stageEditorSetPlaceAmounts: "Set place amounts"
|
|
||||||
stageEditorSetUseAmounts: "Set use amounts"
|
|
||||||
stageEditorSetCutAmounts: "Set cut amounts"
|
|
||||||
stageEditorSetKillAmounts: "Set kill amounts"
|
stageEditorSetKillAmounts: "Set kill amounts"
|
||||||
stageEditorSetEnchantAmounts: "Set enchant amounts"
|
stageEditorSetEnchantAmounts: "Set enchant amounts"
|
||||||
stageEditorSetMobAmounts: "Set mob amounts"
|
stageEditorSetMobAmounts: "Set mob amounts"
|
||||||
@ -197,11 +192,7 @@ stageEditorCustomAlreadyAdded: "That custom objective has already been added!"
|
|||||||
stageEditorCustomCleared: "Custom objectives cleared."
|
stageEditorCustomCleared: "Custom objectives cleared."
|
||||||
stageEditorCustomDataPrompt: "Enter value for <data>:"
|
stageEditorCustomDataPrompt: "Enter value for <data>:"
|
||||||
stageEditorEnterBlockNames: "Enter block names, <space>, <cancel>"
|
stageEditorEnterBlockNames: "Enter block names, <space>, <cancel>"
|
||||||
stageEditorBreakBlocksPrompt: "Enter break amounts (numbers), <space>, <cancel>"
|
stageEditorEnterBlockAmounts: "Enter block amounts, <space>, <cancel>"
|
||||||
stageEditorDamageBlocksPrompt: "Enter damage amounts (numbers), <space>, <cancel>"
|
|
||||||
stageEditorPlaceBlocksPrompt: "Enter place amounts (numbers), <space>, <cancel>"
|
|
||||||
stageEditorUseBlocksPrompt: "Enter use amounts (numbers), <space>, <cancel>"
|
|
||||||
stageEditorCutBlocksPrompt: "Enter cut amounts (numbers), <space>, <cancel>"
|
|
||||||
stageEditorEnterBlockDurability: "Enter block durability (numbers), <space>, <cancel>"
|
stageEditorEnterBlockDurability: "Enter block durability (numbers), <space>, <cancel>"
|
||||||
stageEditorCatchFishPrompt: "Enter number of fish to catch, <clear>, <cancel>"
|
stageEditorCatchFishPrompt: "Enter number of fish to catch, <clear>, <cancel>"
|
||||||
stageEditorKillPlayerPrompt: "Enter number of players to kill, <clear>, <cancel>"
|
stageEditorKillPlayerPrompt: "Enter number of players to kill, <clear>, <cancel>"
|
||||||
@ -601,16 +592,6 @@ timeZoneTitle: "- Time Zones -"
|
|||||||
enchantmentsTitle: "- Enchantments -"
|
enchantmentsTitle: "- Enchantments -"
|
||||||
questGUITitle: "- GUI Item Display -"
|
questGUITitle: "- GUI Item Display -"
|
||||||
questRegionTitle: "- Quest Region -"
|
questRegionTitle: "- Quest Region -"
|
||||||
effBlazeShoot: "Sound of a Blaze firing"
|
|
||||||
effBowFire: "Sound of a bow firing"
|
|
||||||
effClick1: "A click sound"
|
|
||||||
effClick2: "A different click sound"
|
|
||||||
effDoorToggle: "Sound of a door opening or closing"
|
|
||||||
effExtinguish: "Sound of fire being extinguished"
|
|
||||||
effGhastShoot: "Sound of a Ghast firing"
|
|
||||||
effGhastShriek: "Sound of a Ghast shrieking"
|
|
||||||
effZombieWood: "Sound of a Zombie chewing an iron door"
|
|
||||||
effZombieIron: "Sound of a Zombie chewing a wooden door"
|
|
||||||
effEnterName: "Enter an effect name to add it to the list, <cancel>"
|
effEnterName: "Enter an effect name to add it to the list, <cancel>"
|
||||||
cmdAdd: "add"
|
cmdAdd: "add"
|
||||||
strAdd: "then enter '<command>' to include it"
|
strAdd: "then enter '<command>' to include it"
|
||||||
|
@ -66,7 +66,6 @@ questEditorStages: "Edit Stages"
|
|||||||
questEditorRews: "Edit Rewards"
|
questEditorRews: "Edit Rewards"
|
||||||
questEditorOpts: "Edit Options"
|
questEditorOpts: "Edit Options"
|
||||||
questEditorEnterQuestName: "Enter Quest name (<cancel>)"
|
questEditorEnterQuestName: "Enter Quest name (<cancel>)"
|
||||||
questEditorEditEnterQuestName: "Enter Quest name to edit (<cancel>)"
|
|
||||||
questEditorEnterAskMessage: "Enter ask message (<cancel>)"
|
questEditorEnterAskMessage: "Enter ask message (<cancel>)"
|
||||||
questEditorEnterFinishMessage: "Enter finish message (<cancel>)"
|
questEditorEnterFinishMessage: "Enter finish message (<cancel>)"
|
||||||
questEditorEnterNPCStart: "Enter NPC ID, <clear>, <cancel>"
|
questEditorEnterNPCStart: "Enter NPC ID, <clear>, <cancel>"
|
||||||
@ -165,10 +164,6 @@ stageEditorDelete: "Delete Stage"
|
|||||||
stageEditorSetBlockNames: "Set block names"
|
stageEditorSetBlockNames: "Set block names"
|
||||||
stageEditorSetBlockAmounts: "Set block amounts"
|
stageEditorSetBlockAmounts: "Set block amounts"
|
||||||
stageEditorSetBlockDurability: "Set block durability"
|
stageEditorSetBlockDurability: "Set block durability"
|
||||||
stageEditorSetDamageAmounts: "Set damage amounts"
|
|
||||||
stageEditorSetPlaceAmounts: "Set place amounts"
|
|
||||||
stageEditorSetUseAmounts: "Set use amounts"
|
|
||||||
stageEditorSetCutAmounts: "Set cut amounts"
|
|
||||||
stageEditorSetKillAmounts: "Set kill amounts"
|
stageEditorSetKillAmounts: "Set kill amounts"
|
||||||
stageEditorSetEnchantAmounts: "Set enchant amounts"
|
stageEditorSetEnchantAmounts: "Set enchant amounts"
|
||||||
stageEditorSetMobAmounts: "Set mob amounts"
|
stageEditorSetMobAmounts: "Set mob amounts"
|
||||||
@ -197,11 +192,7 @@ stageEditorCustomAlreadyAdded: "That custom objective has already been added!"
|
|||||||
stageEditorCustomCleared: "Custom objectives cleared."
|
stageEditorCustomCleared: "Custom objectives cleared."
|
||||||
stageEditorCustomDataPrompt: "Enter value for <data>:"
|
stageEditorCustomDataPrompt: "Enter value for <data>:"
|
||||||
stageEditorEnterBlockNames: "Enter block names, <space>, <cancel>"
|
stageEditorEnterBlockNames: "Enter block names, <space>, <cancel>"
|
||||||
stageEditorBreakBlocksPrompt: "Enter break amounts (numbers), <space>, <cancel>"
|
stageEditorEnterBlockAmounts: "Enter block amounts, <space>, <cancel>"
|
||||||
stageEditorDamageBlocksPrompt: "Enter damage amounts (numbers), <space>, <cancel>"
|
|
||||||
stageEditorPlaceBlocksPrompt: "Enter place amounts (numbers), <space>, <cancel>"
|
|
||||||
stageEditorUseBlocksPrompt: "Enter use amounts (numbers), <space>, <cancel>"
|
|
||||||
stageEditorCutBlocksPrompt: "Enter cut amounts (numbers), <space>, <cancel>"
|
|
||||||
stageEditorEnterBlockDurability: "Enter block durability (numbers), <space>, <cancel>"
|
stageEditorEnterBlockDurability: "Enter block durability (numbers), <space>, <cancel>"
|
||||||
stageEditorCatchFishPrompt: "Enter number of fish to catch, <clear>, <cancel>"
|
stageEditorCatchFishPrompt: "Enter number of fish to catch, <clear>, <cancel>"
|
||||||
stageEditorKillPlayerPrompt: "Enter number of players to kill, <clear>, <cancel>"
|
stageEditorKillPlayerPrompt: "Enter number of players to kill, <clear>, <cancel>"
|
||||||
@ -601,16 +592,6 @@ timeZoneTitle: "- Time Zones -"
|
|||||||
enchantmentsTitle: "- Enchantments -"
|
enchantmentsTitle: "- Enchantments -"
|
||||||
questGUITitle: "- GUI Item Display -"
|
questGUITitle: "- GUI Item Display -"
|
||||||
questRegionTitle: "- Quest Region -"
|
questRegionTitle: "- Quest Region -"
|
||||||
effBlazeShoot: "Sound of a Blaze firing"
|
|
||||||
effBowFire: "Sound of a bow firing"
|
|
||||||
effClick1: "A click sound"
|
|
||||||
effClick2: "A different click sound"
|
|
||||||
effDoorToggle: "Sound of a door opening or closing"
|
|
||||||
effExtinguish: "Sound of fire being extinguished"
|
|
||||||
effGhastShoot: "Sound of a Ghast firing"
|
|
||||||
effGhastShriek: "Sound of a Ghast shrieking"
|
|
||||||
effZombieWood: "Sound of a Zombie chewing an iron door"
|
|
||||||
effZombieIron: "Sound of a Zombie chewing a wooden door"
|
|
||||||
effEnterName: "Enter an effect name to add it to the list, <cancel>"
|
effEnterName: "Enter an effect name to add it to the list, <cancel>"
|
||||||
cmdAdd: "add"
|
cmdAdd: "add"
|
||||||
strAdd: "then enter '<command>' to include it"
|
strAdd: "then enter '<command>' to include it"
|
||||||
|
@ -66,7 +66,6 @@ questEditorStages: "Redigera etapper"
|
|||||||
questEditorRews: "Redigera belöningar"
|
questEditorRews: "Redigera belöningar"
|
||||||
questEditorOpts: "Redigera Alternativ"
|
questEditorOpts: "Redigera Alternativ"
|
||||||
questEditorEnterQuestName: "Ange uppdragsnamn (<cancel>)"
|
questEditorEnterQuestName: "Ange uppdragsnamn (<cancel>)"
|
||||||
questEditorEditEnterQuestName: "Ange uppdrag att redigera (<cancel>)"
|
|
||||||
questEditorEnterAskMessage: "Skriv in meddelandet som ska frågas (<cancel>)"
|
questEditorEnterAskMessage: "Skriv in meddelandet som ska frågas (<cancel>)"
|
||||||
questEditorEnterFinishMessage: "Skriv in avslutande meddelande (<cancel>)"
|
questEditorEnterFinishMessage: "Skriv in avslutande meddelande (<cancel>)"
|
||||||
questEditorEnterNPCStart: "Skriv in ID för NPC, <clear>, <cancel>"
|
questEditorEnterNPCStart: "Skriv in ID för NPC, <clear>, <cancel>"
|
||||||
@ -165,10 +164,6 @@ stageEditorDelete: "Ta bort scenen"
|
|||||||
stageEditorSetBlockNames: "Ställa in block namnen"
|
stageEditorSetBlockNames: "Ställa in block namnen"
|
||||||
stageEditorSetBlockAmounts: "Ställa in block belopp"
|
stageEditorSetBlockAmounts: "Ställa in block belopp"
|
||||||
stageEditorSetBlockDurability: "Ställa in block hållbarhet"
|
stageEditorSetBlockDurability: "Ställa in block hållbarhet"
|
||||||
stageEditorSetDamageAmounts: "Ställ in antal skador"
|
|
||||||
stageEditorSetPlaceAmounts: "Ställ in placerings mängden"
|
|
||||||
stageEditorSetUseAmounts: "Ställ in mängder"
|
|
||||||
stageEditorSetCutAmounts: "Ställ in klippta mängder"
|
|
||||||
stageEditorSetKillAmounts: "Ställ in dödade mängder"
|
stageEditorSetKillAmounts: "Ställ in dödade mängder"
|
||||||
stageEditorSetEnchantAmounts: "Ställ in förtrollade mängder"
|
stageEditorSetEnchantAmounts: "Ställ in förtrollade mängder"
|
||||||
stageEditorSetMobAmounts: "Ställ in monster mängder"
|
stageEditorSetMobAmounts: "Ställ in monster mängder"
|
||||||
@ -197,11 +192,7 @@ stageEditorCustomAlreadyAdded: "Detta anpassade mål har redan lagts till!"
|
|||||||
stageEditorCustomCleared: "Anpassade mål har rensats."
|
stageEditorCustomCleared: "Anpassade mål har rensats."
|
||||||
stageEditorCustomDataPrompt: "Ange värdet för <data>:"
|
stageEditorCustomDataPrompt: "Ange värdet för <data>:"
|
||||||
stageEditorEnterBlockNames: "Ange block namn, <space>, <cancel>"
|
stageEditorEnterBlockNames: "Ange block namn, <space>, <cancel>"
|
||||||
stageEditorBreakBlocksPrompt: "Ange rastbelopp (nummer), <space>, <cancel>"
|
stageEditorEnterBlockAmounts: "Enter block amounts, <space>, <cancel>"
|
||||||
stageEditorDamageBlocksPrompt: "Ange skada (nummer), <space>, <cancel>"
|
|
||||||
stageEditorPlaceBlocksPrompt: "Ange platsmängder (nummer), <space>, <cancel>"
|
|
||||||
stageEditorUseBlocksPrompt: "Ange användningsbelopp (nummer), <space>, <cancel>"
|
|
||||||
stageEditorCutBlocksPrompt: "Enter cut amounts (numbers), <space>, <cancel>"
|
|
||||||
stageEditorEnterBlockDurability: "Enter block durability (numbers), <space>, <cancel>"
|
stageEditorEnterBlockDurability: "Enter block durability (numbers), <space>, <cancel>"
|
||||||
stageEditorCatchFishPrompt: "Enter number of fish to catch, <clear>, <cancel>"
|
stageEditorCatchFishPrompt: "Enter number of fish to catch, <clear>, <cancel>"
|
||||||
stageEditorKillPlayerPrompt: "Enter number of players to kill, <clear>, <cancel>"
|
stageEditorKillPlayerPrompt: "Enter number of players to kill, <clear>, <cancel>"
|
||||||
@ -601,16 +592,6 @@ timeZoneTitle: "- Time Zones -"
|
|||||||
enchantmentsTitle: "- Enchantments -"
|
enchantmentsTitle: "- Enchantments -"
|
||||||
questGUITitle: "- GUI Item Display -"
|
questGUITitle: "- GUI Item Display -"
|
||||||
questRegionTitle: "- Quest Region -"
|
questRegionTitle: "- Quest Region -"
|
||||||
effBlazeShoot: "Sound of a Blaze firing"
|
|
||||||
effBowFire: "Sound of a bow firing"
|
|
||||||
effClick1: "A click sound"
|
|
||||||
effClick2: "A different click sound"
|
|
||||||
effDoorToggle: "Sound of a door opening or closing"
|
|
||||||
effExtinguish: "Sound of fire being extinguished"
|
|
||||||
effGhastShoot: "Sound of a Ghast firing"
|
|
||||||
effGhastShriek: "Sound of a Ghast shrieking"
|
|
||||||
effZombieWood: "Sound of a Zombie chewing an iron door"
|
|
||||||
effZombieIron: "Sound of a Zombie chewing a wooden door"
|
|
||||||
effEnterName: "Enter an effect name to add it to the list, <cancel>"
|
effEnterName: "Enter an effect name to add it to the list, <cancel>"
|
||||||
cmdAdd: "add"
|
cmdAdd: "add"
|
||||||
strAdd: "then enter '<command>' to include it"
|
strAdd: "then enter '<command>' to include it"
|
||||||
|
@ -66,7 +66,6 @@ questEditorStages: "แก้ไขขั้นตอน"
|
|||||||
questEditorRews: "แก้ไขรางวัล"
|
questEditorRews: "แก้ไขรางวัล"
|
||||||
questEditorOpts: "Edit Options"
|
questEditorOpts: "Edit Options"
|
||||||
questEditorEnterQuestName: "ป้อนชื่อเควส (<cancel>)"
|
questEditorEnterQuestName: "ป้อนชื่อเควส (<cancel>)"
|
||||||
questEditorEditEnterQuestName: "ป้อนชื่อเควสที่จะแก้ไข (<cancel>)"
|
|
||||||
questEditorEnterAskMessage: "ป้อนข้อความที่ต้องการ (<cancel>)"
|
questEditorEnterAskMessage: "ป้อนข้อความที่ต้องการ (<cancel>)"
|
||||||
questEditorEnterFinishMessage: "ป้อนข้อความที่ต้องการ (<cancel>)"
|
questEditorEnterFinishMessage: "ป้อนข้อความที่ต้องการ (<cancel>)"
|
||||||
questEditorEnterNPCStart: "ป้อนไอดีของ NPC <clear>,<cancel>"
|
questEditorEnterNPCStart: "ป้อนไอดีของ NPC <clear>,<cancel>"
|
||||||
@ -165,10 +164,6 @@ stageEditorDelete: "ลบขั้นตอน"
|
|||||||
stageEditorSetBlockNames: "ตั้งชื่อบล็อก"
|
stageEditorSetBlockNames: "ตั้งชื่อบล็อก"
|
||||||
stageEditorSetBlockAmounts: "ตั้งค่าจำนวนบล็อค"
|
stageEditorSetBlockAmounts: "ตั้งค่าจำนวนบล็อค"
|
||||||
stageEditorSetBlockDurability: "กำหนดความทนทานของบล็อก"
|
stageEditorSetBlockDurability: "กำหนดความทนทานของบล็อก"
|
||||||
stageEditorSetDamageAmounts: "กำหนดจำนวนความเสียหาย"
|
|
||||||
stageEditorSetPlaceAmounts: "ตั้งค่าจำนวนสถานที่"
|
|
||||||
stageEditorSetUseAmounts: "ตั้งค่าจำนวนที่ใช้"
|
|
||||||
stageEditorSetCutAmounts: "ตั้งค่าจำนวนที่ตัด"
|
|
||||||
stageEditorSetKillAmounts: "ตั้งค่าจำนวนที่ฆ่า"
|
stageEditorSetKillAmounts: "ตั้งค่าจำนวนที่ฆ่า"
|
||||||
stageEditorSetEnchantAmounts: "ตั้งค่าจำนวนที่เสน่ห์"
|
stageEditorSetEnchantAmounts: "ตั้งค่าจำนวนที่เสน่ห์"
|
||||||
stageEditorSetMobAmounts: "ตั้งค่าม็อบ"
|
stageEditorSetMobAmounts: "ตั้งค่าม็อบ"
|
||||||
@ -197,11 +192,7 @@ stageEditorCustomAlreadyAdded: "เป้าหมายที่กำหนด
|
|||||||
stageEditorCustomCleared: "ล้างเป้าหมายที่กำหนดเองแล้ว"
|
stageEditorCustomCleared: "ล้างเป้าหมายที่กำหนดเองแล้ว"
|
||||||
stageEditorCustomDataPrompt: "ค่าใช้จ่ายสำหรับ <data>:"
|
stageEditorCustomDataPrompt: "ค่าใช้จ่ายสำหรับ <data>:"
|
||||||
stageEditorEnterBlockNames: "ใส่ชื่อบล็อก <space> <cancel>"
|
stageEditorEnterBlockNames: "ใส่ชื่อบล็อก <space> <cancel>"
|
||||||
stageEditorBreakBlocksPrompt: "ป้อนยอดเงินแบ่ง (ตัวเลข) <space> <cancel>"
|
stageEditorEnterBlockAmounts: "Enter block amounts, <space>, <cancel>"
|
||||||
stageEditorDamageBlocksPrompt: "ใส่ตัวเลขความจำ (จำนวน) <space> <cancel>"
|
|
||||||
stageEditorPlaceBlocksPrompt: "ป้อนจำนวนเงินที่ต้องการ (แยกตามแต่ละช่อง) <space> <cancel>"
|
|
||||||
stageEditorUseBlocksPrompt: "ป้อนจำนวนเงินที่ใช้ (ตัวเลข) <space> <cancel>"
|
|
||||||
stageEditorCutBlocksPrompt: "ป้อนจำนวนเงินที่ตัด (ตัวเลข) <space> <cancel>"
|
|
||||||
stageEditorEnterBlockDurability: "ป้อนความทนทานของบล็อก (ตัวเลข) <space> <cancel>"
|
stageEditorEnterBlockDurability: "ป้อนความทนทานของบล็อก (ตัวเลข) <space> <cancel>"
|
||||||
stageEditorCatchFishPrompt: "ป้อนจำนวนของปลาที่ต้องจับ <clear>,<cancel>"
|
stageEditorCatchFishPrompt: "ป้อนจำนวนของปลาที่ต้องจับ <clear>,<cancel>"
|
||||||
stageEditorKillPlayerPrompt: "ป้อนจำนวนของผู้เล่นที่ต้องทำการฆ่า <clear>,<cancel>"
|
stageEditorKillPlayerPrompt: "ป้อนจำนวนของผู้เล่นที่ต้องทำการฆ่า <clear>,<cancel>"
|
||||||
@ -601,16 +592,6 @@ timeZoneTitle: "- Time Zones -"
|
|||||||
enchantmentsTitle: "- เวทมนตร์ -"
|
enchantmentsTitle: "- เวทมนตร์ -"
|
||||||
questGUITitle: "- จอแสดงผลรายการ GUI -"
|
questGUITitle: "- จอแสดงผลรายการ GUI -"
|
||||||
questRegionTitle: "- ภูมิภาค Quest -"
|
questRegionTitle: "- ภูมิภาค Quest -"
|
||||||
effBlazeShoot: "เสียงของการยิงเปลวไฟ"
|
|
||||||
effBowFire: "เสียงของการยิงธนู"
|
|
||||||
effClick1: "เสียงคลิก"
|
|
||||||
effClick2: "เสียงคลิกที่แตกต่างกัน"
|
|
||||||
effDoorToggle: "เสียงประตูเปิดหรือปิด"
|
|
||||||
effExtinguish: "มีเสียงดับเพลิง"
|
|
||||||
effGhastShoot: "เสียงของการยิง Ghast"
|
|
||||||
effGhastShriek: "เสียงของ Ghast กรีดร้อง"
|
|
||||||
effZombieWood: "เสียงของผีดิบเคี้ยวมีประตูเหล็ก"
|
|
||||||
effZombieIron: "เสียงของผีดิบเคี้ยวประตูไม้"
|
|
||||||
effEnterName: "Enter an effect name to add it to the list, <cancel>"
|
effEnterName: "Enter an effect name to add it to the list, <cancel>"
|
||||||
cmdAdd: "เพิ่ม"
|
cmdAdd: "เพิ่ม"
|
||||||
strAdd: "then enter '<command>' to include it"
|
strAdd: "then enter '<command>' to include it"
|
||||||
|
@ -66,7 +66,6 @@ questEditorStages: "Etapları Düzenle"
|
|||||||
questEditorRews: "Ödülleri Düzenle"
|
questEditorRews: "Ödülleri Düzenle"
|
||||||
questEditorOpts: "Ayarları Düzenle"
|
questEditorOpts: "Ayarları Düzenle"
|
||||||
questEditorEnterQuestName: "Görev adını gir (<cancel>)"
|
questEditorEnterQuestName: "Görev adını gir (<cancel>)"
|
||||||
questEditorEditEnterQuestName: "Yeni görev adını girin (<cancel>)"
|
|
||||||
questEditorEnterAskMessage: "Başlangıç mesajını girin (<cancel>)"
|
questEditorEnterAskMessage: "Başlangıç mesajını girin (<cancel>)"
|
||||||
questEditorEnterFinishMessage: "Bitiriş mesajını girin (<cancel>)"
|
questEditorEnterFinishMessage: "Bitiriş mesajını girin (<cancel>)"
|
||||||
questEditorEnterNPCStart: "NPC ID'sini girin, <clear>, <cancel>"
|
questEditorEnterNPCStart: "NPC ID'sini girin, <clear>, <cancel>"
|
||||||
@ -165,10 +164,6 @@ stageEditorDelete: "Etabı Sil"
|
|||||||
stageEditorSetBlockNames: "Blok adını düzenle"
|
stageEditorSetBlockNames: "Blok adını düzenle"
|
||||||
stageEditorSetBlockAmounts: "Blok miktarını ayarla"
|
stageEditorSetBlockAmounts: "Blok miktarını ayarla"
|
||||||
stageEditorSetBlockDurability: "Blok dayanıklılığını ayarla"
|
stageEditorSetBlockDurability: "Blok dayanıklılığını ayarla"
|
||||||
stageEditorSetDamageAmounts: "Hasar miktarını ayarla"
|
|
||||||
stageEditorSetPlaceAmounts: "Yerleşim yerini ayarla"
|
|
||||||
stageEditorSetUseAmounts: "Kullanım miktarını ayarla"
|
|
||||||
stageEditorSetCutAmounts: "Darbe miktarını ayarla"
|
|
||||||
stageEditorSetKillAmounts: "Öldürme sayısını ayarla"
|
stageEditorSetKillAmounts: "Öldürme sayısını ayarla"
|
||||||
stageEditorSetEnchantAmounts: "Büyüleme sayısını ayarla"
|
stageEditorSetEnchantAmounts: "Büyüleme sayısını ayarla"
|
||||||
stageEditorSetMobAmounts: "Mob miktarını ayarla"
|
stageEditorSetMobAmounts: "Mob miktarını ayarla"
|
||||||
@ -197,11 +192,7 @@ stageEditorCustomAlreadyAdded: "Bu özel nesne zaten mevcut!"
|
|||||||
stageEditorCustomCleared: "Özel nesneler silindi."
|
stageEditorCustomCleared: "Özel nesneler silindi."
|
||||||
stageEditorCustomDataPrompt: "<data> için değer girin:"
|
stageEditorCustomDataPrompt: "<data> için değer girin:"
|
||||||
stageEditorEnterBlockNames: "Blok adlarını girin, <space>, <cancel>"
|
stageEditorEnterBlockNames: "Blok adlarını girin, <space>, <cancel>"
|
||||||
stageEditorBreakBlocksPrompt: "Kırılacak miktarını girin (sayı olarak), <space>, <cancel>"
|
stageEditorEnterBlockAmounts: "Enter block amounts, <space>, <cancel>"
|
||||||
stageEditorDamageBlocksPrompt: "Hasar miktarını girin (sayı olarak), <space>, <cancel>"
|
|
||||||
stageEditorPlaceBlocksPrompt: "Yerleştirme miktarını girin (sayı olarak), <space>, <cancel>"
|
|
||||||
stageEditorUseBlocksPrompt: "Kullanım miktarlarını girin (sayı olarak), <space>, <cancel>"
|
|
||||||
stageEditorCutBlocksPrompt: "Kesme miktarını girin (sayı olarak), <space>, <cancel>"
|
|
||||||
stageEditorEnterBlockDurability: "Block sağlığını girin (sayı olarak), <space>, <cancel>"
|
stageEditorEnterBlockDurability: "Block sağlığını girin (sayı olarak), <space>, <cancel>"
|
||||||
stageEditorCatchFishPrompt: "Tutulacak balık miktarını girin, <clear>, <cancel>"
|
stageEditorCatchFishPrompt: "Tutulacak balık miktarını girin, <clear>, <cancel>"
|
||||||
stageEditorKillPlayerPrompt: "Öldürülecek oyuncu sayısını girin, <clear>, <cancel>"
|
stageEditorKillPlayerPrompt: "Öldürülecek oyuncu sayısını girin, <clear>, <cancel>"
|
||||||
@ -601,16 +592,6 @@ timeZoneTitle: "- Saat Dilimleri -"
|
|||||||
enchantmentsTitle: "- Büyüler -"
|
enchantmentsTitle: "- Büyüler -"
|
||||||
questGUITitle: "- GUI İtem Göstergesi -"
|
questGUITitle: "- GUI İtem Göstergesi -"
|
||||||
questRegionTitle: "- Görev Bölgesi -"
|
questRegionTitle: "- Görev Bölgesi -"
|
||||||
effBlazeShoot: "Blaze ateş atma sesi"
|
|
||||||
effBowFire: "Ok atma sesi"
|
|
||||||
effClick1: "Tıklama sesi"
|
|
||||||
effClick2: "Farklı bir tıklama sesi"
|
|
||||||
effDoorToggle: "Kapı açılış ya da kapanış sesi"
|
|
||||||
effExtinguish: "Söndürülen yangın sesi"
|
|
||||||
effGhastShoot: "Ghast ateş atma sesi"
|
|
||||||
effGhastShriek: "Ghast ağlama sesi"
|
|
||||||
effZombieWood: "Demir kapıyı çiğneyen bir zombi sesi"
|
|
||||||
effZombieIron: "Ahşap bir kapı çiğneyen zombi sesi"
|
|
||||||
effEnterName: "Listeye eklemek için bir etki ismi girin, <cancel>"
|
effEnterName: "Listeye eklemek için bir etki ismi girin, <cancel>"
|
||||||
cmdAdd: "ekle"
|
cmdAdd: "ekle"
|
||||||
strAdd: "sonra eklemek için '<command>' komutunu girin"
|
strAdd: "sonra eklemek için '<command>' komutunu girin"
|
||||||
|
@ -66,7 +66,6 @@ questEditorStages: "Điểu chỉnh giai đoạn"
|
|||||||
questEditorRews: "Điểu chỉnh phần thưởng"
|
questEditorRews: "Điểu chỉnh phần thưởng"
|
||||||
questEditorOpts: "Chỉnh sửa tùy chọn"
|
questEditorOpts: "Chỉnh sửa tùy chọn"
|
||||||
questEditorEnterQuestName: "Nhập tên nhiệm vụ (<cancel>)"
|
questEditorEnterQuestName: "Nhập tên nhiệm vụ (<cancel>)"
|
||||||
questEditorEditEnterQuestName: "Nhập tên nhiệm vụ để chỉnh sửa (<cancel>)"
|
|
||||||
questEditorEnterAskMessage: "Nhập thông báo yêu cầu (<cancel>)"
|
questEditorEnterAskMessage: "Nhập thông báo yêu cầu (<cancel>)"
|
||||||
questEditorEnterFinishMessage: "Nhập thông báo hoàn thành (<cancel>)"
|
questEditorEnterFinishMessage: "Nhập thông báo hoàn thành (<cancel>)"
|
||||||
questEditorEnterNPCStart: "Nhập ID của NPC, <clear>, <cancel>"
|
questEditorEnterNPCStart: "Nhập ID của NPC, <clear>, <cancel>"
|
||||||
@ -165,10 +164,6 @@ stageEditorDelete: "Xóa Giai đoạn"
|
|||||||
stageEditorSetBlockNames: "Thiết lập khối tên"
|
stageEditorSetBlockNames: "Thiết lập khối tên"
|
||||||
stageEditorSetBlockAmounts: "Thiết lập số lượng khối tên"
|
stageEditorSetBlockAmounts: "Thiết lập số lượng khối tên"
|
||||||
stageEditorSetBlockDurability: "Thiết lập độ bền khối"
|
stageEditorSetBlockDurability: "Thiết lập độ bền khối"
|
||||||
stageEditorSetDamageAmounts: "Thiếp lập số lượng thiệt hại"
|
|
||||||
stageEditorSetPlaceAmounts: "Thiết lập số lượng vị trí"
|
|
||||||
stageEditorSetUseAmounts: "Thiết lập số lượng sử dụng"
|
|
||||||
stageEditorSetCutAmounts: "Thiết lập số lượng cắt hạ"
|
|
||||||
stageEditorSetKillAmounts: "Thiết lập số lượng giết hại"
|
stageEditorSetKillAmounts: "Thiết lập số lượng giết hại"
|
||||||
stageEditorSetEnchantAmounts: "Thiết lập số lượng phù phép"
|
stageEditorSetEnchantAmounts: "Thiết lập số lượng phù phép"
|
||||||
stageEditorSetMobAmounts: "Thiết lập số lượng mob"
|
stageEditorSetMobAmounts: "Thiết lập số lượng mob"
|
||||||
@ -197,11 +192,7 @@ stageEditorCustomAlreadyAdded: "Mục tiêu tùy chỉnh này đã được thê
|
|||||||
stageEditorCustomCleared: "Mục tiêu tùy chỉnh đã được xóa."
|
stageEditorCustomCleared: "Mục tiêu tùy chỉnh đã được xóa."
|
||||||
stageEditorCustomDataPrompt: "Nhập giá trị cho <data>:"
|
stageEditorCustomDataPrompt: "Nhập giá trị cho <data>:"
|
||||||
stageEditorEnterBlockNames: "Nhập tên khối, <space>, <cancel>"
|
stageEditorEnterBlockNames: "Nhập tên khối, <space>, <cancel>"
|
||||||
stageEditorBreakBlocksPrompt: "Nhập lượng khối cần phá vỡ (số), <space>, <cancel>"
|
stageEditorEnterBlockAmounts: "Nhập số lượng khối,<space>,<cancel>"
|
||||||
stageEditorDamageBlocksPrompt: "Nhập lượng sát thương (số), <space>, <cancel>"
|
|
||||||
stageEditorPlaceBlocksPrompt: "Nhập lượng khối đặt ra (số), <space>, <cancel>"
|
|
||||||
stageEditorUseBlocksPrompt: "Nhập lượng khối cần dùng (số), <space>, <cancel>"
|
|
||||||
stageEditorCutBlocksPrompt: "Nhập lượng khối cần chặt/hạ (số), <space>, <cancel>"
|
|
||||||
stageEditorEnterBlockDurability: "Nhập độ bền của khối (số), <space>, <cancel>"
|
stageEditorEnterBlockDurability: "Nhập độ bền của khối (số), <space>, <cancel>"
|
||||||
stageEditorCatchFishPrompt: "Nhập số lượng cá cần bắt, <clear>, <cancel>"
|
stageEditorCatchFishPrompt: "Nhập số lượng cá cần bắt, <clear>, <cancel>"
|
||||||
stageEditorKillPlayerPrompt: "Nhập số lượng người cần giết, <clear>, <cancel>"
|
stageEditorKillPlayerPrompt: "Nhập số lượng người cần giết, <clear>, <cancel>"
|
||||||
@ -601,16 +592,6 @@ timeZoneTitle: "- Múi Giờ -"
|
|||||||
enchantmentsTitle: "- Phù phép -"
|
enchantmentsTitle: "- Phù phép -"
|
||||||
questGUITitle: "- GUI Hiển thị Item -"
|
questGUITitle: "- GUI Hiển thị Item -"
|
||||||
questRegionTitle: "- Khu vực Nhiệm vụ -"
|
questRegionTitle: "- Khu vực Nhiệm vụ -"
|
||||||
effBlazeShoot: "Âm thanh của Blaze đang cháy"
|
|
||||||
effBowFire: "Âm thanh của cái cung đang cháy"
|
|
||||||
effClick1: "Âm thanh khi click"
|
|
||||||
effClick2: "Âm thanh khác nhau khi click"
|
|
||||||
effDoorToggle: "Tiếng cửa đóng hoặc mở"
|
|
||||||
effExtinguish: "Tiếng ngọn lửa bắt đầu bị dạp tắt"
|
|
||||||
effGhastShoot: "Tiếng ma địa ngục khóc"
|
|
||||||
effGhastShriek: "Tiếng ma địa ngục hét"
|
|
||||||
effZombieWood: "Tiếng của thây ma đang gặm cửa sắt"
|
|
||||||
effZombieIron: "Tiếng của thây ma đang đập cửa gỗ"
|
|
||||||
effEnterName: "Điền tên một hiệu ứng để thêm vào danh sách, <cancel>"
|
effEnterName: "Điền tên một hiệu ứng để thêm vào danh sách, <cancel>"
|
||||||
cmdAdd: "thêm"
|
cmdAdd: "thêm"
|
||||||
strAdd: "rồi nhập '<command>' cho nó"
|
strAdd: "rồi nhập '<command>' cho nó"
|
||||||
|
@ -66,7 +66,6 @@ questEditorStages: "编辑阶段"
|
|||||||
questEditorRews: "编辑奖励"
|
questEditorRews: "编辑奖励"
|
||||||
questEditorOpts: "编辑选项"
|
questEditorOpts: "编辑选项"
|
||||||
questEditorEnterQuestName: "输入任务名称(<cancel>)"
|
questEditorEnterQuestName: "输入任务名称(<cancel>)"
|
||||||
questEditorEditEnterQuestName: "输入任务名称进行编辑(<cancel>)"
|
|
||||||
questEditorEnterAskMessage: "输入询问信息(<cancel>)"
|
questEditorEnterAskMessage: "输入询问信息(<cancel>)"
|
||||||
questEditorEnterFinishMessage: "输入结束信息(<cancel>)"
|
questEditorEnterFinishMessage: "输入结束信息(<cancel>)"
|
||||||
questEditorEnterNPCStart: "输入NPC的ID,<clear>,<cancel>"
|
questEditorEnterNPCStart: "输入NPC的ID,<clear>,<cancel>"
|
||||||
@ -165,10 +164,6 @@ stageEditorDelete: "删除阶段"
|
|||||||
stageEditorSetBlockNames: "设置方块名称"
|
stageEditorSetBlockNames: "设置方块名称"
|
||||||
stageEditorSetBlockAmounts: "设置方块数量"
|
stageEditorSetBlockAmounts: "设置方块数量"
|
||||||
stageEditorSetBlockDurability: "设置方块的耐久度"
|
stageEditorSetBlockDurability: "设置方块的耐久度"
|
||||||
stageEditorSetDamageAmounts: "设置伤害数量"
|
|
||||||
stageEditorSetPlaceAmounts: "设置放置数量"
|
|
||||||
stageEditorSetUseAmounts: "设置使用数量"
|
|
||||||
stageEditorSetCutAmounts: "设置裁剪数量"
|
|
||||||
stageEditorSetKillAmounts: "设置击杀数量"
|
stageEditorSetKillAmounts: "设置击杀数量"
|
||||||
stageEditorSetEnchantAmounts: "设置附魔数量"
|
stageEditorSetEnchantAmounts: "设置附魔数量"
|
||||||
stageEditorSetMobAmounts: "设置怪物数量"
|
stageEditorSetMobAmounts: "设置怪物数量"
|
||||||
@ -197,11 +192,7 @@ stageEditorCustomAlreadyAdded: "自定义目标已经被添加过了!"
|
|||||||
stageEditorCustomCleared: "自定义目标已清除。"
|
stageEditorCustomCleared: "自定义目标已清除。"
|
||||||
stageEditorCustomDataPrompt: "请输入 <data> 值:"
|
stageEditorCustomDataPrompt: "请输入 <data> 值:"
|
||||||
stageEditorEnterBlockNames: "请输入方块名,<space>,<cancel>"
|
stageEditorEnterBlockNames: "请输入方块名,<space>,<cancel>"
|
||||||
stageEditorBreakBlocksPrompt: "请输入逾时值 (数字),<space>,<cancel>"
|
stageEditorEnterBlockAmounts: "Enter block amounts, <space>, <cancel>"
|
||||||
stageEditorDamageBlocksPrompt: "请输入伤害值 (数字),<space>,<cancel>"
|
|
||||||
stageEditorPlaceBlocksPrompt: "请输入放置值 (数字),<space>,<cancel>"
|
|
||||||
stageEditorUseBlocksPrompt: "请输入使用值 (数字),<space>,<cancel>"
|
|
||||||
stageEditorCutBlocksPrompt: "请输入削减值 (数字),<space>,<cancel>"
|
|
||||||
stageEditorEnterBlockDurability: "请输入方块耐久度 (数字),<space>,<cancel>"
|
stageEditorEnterBlockDurability: "请输入方块耐久度 (数字),<space>,<cancel>"
|
||||||
stageEditorCatchFishPrompt: "输入需要捕捉鱼的数量,<clear>,<cancel>"
|
stageEditorCatchFishPrompt: "输入需要捕捉鱼的数量,<clear>,<cancel>"
|
||||||
stageEditorKillPlayerPrompt: "输入需要杀死玩家的数量,<clear>,<cancel>"
|
stageEditorKillPlayerPrompt: "输入需要杀死玩家的数量,<clear>,<cancel>"
|
||||||
@ -476,7 +467,7 @@ optCommandsDenied: "你不能在任务 <quest> 中使用命令。"
|
|||||||
optUseDungeonsXLPlugin: "使用DungeonsXL插件"
|
optUseDungeonsXLPlugin: "使用DungeonsXL插件"
|
||||||
optUsePartiesPlugin: "使用Parties插件"
|
optUsePartiesPlugin: "使用Parties插件"
|
||||||
optShareProgressLevel: "Level of progress sharing"
|
optShareProgressLevel: "Level of progress sharing"
|
||||||
optRequireSameQuest: "Require same quest"
|
optRequireSameQuest: "需要相同的任务"
|
||||||
rewSetMoney: "设置金钱奖励"
|
rewSetMoney: "设置金钱奖励"
|
||||||
rewSetQuestPoints: "设置任务点奖励"
|
rewSetQuestPoints: "设置任务点奖励"
|
||||||
rewSetItems: "设置物品奖励"
|
rewSetItems: "设置物品奖励"
|
||||||
@ -601,16 +592,6 @@ timeZoneTitle: "- 时间区 -"
|
|||||||
enchantmentsTitle: "- 附魔 -"
|
enchantmentsTitle: "- 附魔 -"
|
||||||
questGUITitle: "- GUI 项目显示 -"
|
questGUITitle: "- GUI 项目显示 -"
|
||||||
questRegionTitle: "- 任务区 -"
|
questRegionTitle: "- 任务区 -"
|
||||||
effBlazeShoot: "爆破声音"
|
|
||||||
effBowFire: "弓射声"
|
|
||||||
effClick1: "点击声音"
|
|
||||||
effClick2: "另一次点击声音"
|
|
||||||
effDoorToggle: "门打开或闭合的声音"
|
|
||||||
effExtinguish: "灭火的声音"
|
|
||||||
effGhastShoot: "恶魂发射声"
|
|
||||||
effGhastShriek: "恶魂发射声"
|
|
||||||
effZombieWood: "僵尸猛烈打了一个铁门声音"
|
|
||||||
effZombieIron: "僵尸声音带动木门"
|
|
||||||
effEnterName: "输入一个效果名称来添加到列表中, <cancel>"
|
effEnterName: "输入一个效果名称来添加到列表中, <cancel>"
|
||||||
cmdAdd: "添加"
|
cmdAdd: "添加"
|
||||||
strAdd: "然后输入 '<command>', '以添加指令"
|
strAdd: "然后输入 '<command>', '以添加指令"
|
||||||
@ -659,7 +640,7 @@ mcMMOLevel: "等级"
|
|||||||
haveCompleted: "您已完成 <quest>"
|
haveCompleted: "您已完成 <quest>"
|
||||||
cannotComplete: "无法完成 <quest>"
|
cannotComplete: "无法完成 <quest>"
|
||||||
questNotFound: "找不到该任务。"
|
questNotFound: "找不到该任务。"
|
||||||
alreadyConversing: "You already are in a conversation!"
|
alreadyConversing: "您已经在一场对话中!"
|
||||||
inputNum: "输入值必须为数字。"
|
inputNum: "输入值必须为数字。"
|
||||||
inputPosNum: "输入值必须是一个正数。"
|
inputPosNum: "输入值必须是一个正数。"
|
||||||
questModified: "Your active Quest <quest> has been modified. You have been forced to quit the Quest."
|
questModified: "Your active Quest <quest> has been modified. You have been forced to quit the Quest."
|
||||||
@ -673,9 +654,9 @@ questNoCraft: "您不能合成任务物品。"
|
|||||||
questNoEquip: "您不能装备任务物品。"
|
questNoEquip: "您不能装备任务物品。"
|
||||||
questNoDispense: "您不能将任务物品放入发射器。"
|
questNoDispense: "您不能将任务物品放入发射器。"
|
||||||
questNoEnchant: "您不能附魔任务物品。"
|
questNoEnchant: "您不能附魔任务物品。"
|
||||||
questNoSmelt: "You may not smelt using Quest items."
|
questNoSmelt: "您不能熔炼任务物品。"
|
||||||
pageSelectionNum: "Page selection must be a number."
|
pageSelectionNum: "选择页面数必须是一个数字。"
|
||||||
pageSelectionPosNum: "Page selection must be a positive number."
|
pageSelectionPosNum: "选择页面数必须是一个正整数。"
|
||||||
questTakeDisabled: "已禁用通过命令进行任务。"
|
questTakeDisabled: "已禁用通过命令进行任务。"
|
||||||
questQuit: "您已放弃任务 <quest>"
|
questQuit: "您已放弃任务 <quest>"
|
||||||
questQuitDisabled: "已禁用退出此任务。"
|
questQuitDisabled: "已禁用退出此任务。"
|
||||||
@ -684,10 +665,10 @@ pageNotExist: "页面不存在。"
|
|||||||
pageFooter: "- 页面 <current> / <all> -"
|
pageFooter: "- 页面 <current> / <all> -"
|
||||||
questsReloaded: "已重新加载任务插件。"
|
questsReloaded: "已重新加载任务插件。"
|
||||||
numQuestsLoaded: "已加载<number>任务。"
|
numQuestsLoaded: "已加载<number>任务。"
|
||||||
questForceTake: "<player> has forcibly started the Quest <quest>."
|
questForceTake: "<player> 已被强制接受任务 <quest>。"
|
||||||
questForcedTake: "<player> has forced you to take the Quest <quest>."
|
questForcedTake: "<player> 强制你接受任务 <quest>。"
|
||||||
questForceQuit: "<player> has forcibly quit the Quest <quest>."
|
questForceQuit: "<player> 已被强制放弃任务 <quest>。"
|
||||||
questForcedQuit: "<player> has forced you to quit the Quest <quest>."
|
questForcedQuit: "<player> 强制你放弃任务 <quest>。"
|
||||||
questForceFinish: "<player> has forcibly finished their Quest <quest>."
|
questForceFinish: "<player> has forcibly finished their Quest <quest>."
|
||||||
questForcedFinish: "<player> has forced you to finish your Quest <quest>."
|
questForcedFinish: "<player> has forced you to finish your Quest <quest>."
|
||||||
questForceNextStage: "<player> has advanced to the next Stage in the Quest <quest>."
|
questForceNextStage: "<player> has advanced to the next Stage in the Quest <quest>."
|
||||||
|
@ -66,7 +66,6 @@ questEditorStages: "編輯任務階段"
|
|||||||
questEditorRews: "編輯任務獎勵"
|
questEditorRews: "編輯任務獎勵"
|
||||||
questEditorOpts: "編輯選項"
|
questEditorOpts: "編輯選項"
|
||||||
questEditorEnterQuestName: "輸入任務名稱 (<cancel>)"
|
questEditorEnterQuestName: "輸入任務名稱 (<cancel>)"
|
||||||
questEditorEditEnterQuestName: "編輯任務名稱 (<cancel>)"
|
|
||||||
questEditorEnterAskMessage: "編輯任務對話內容 (<cancel>)"
|
questEditorEnterAskMessage: "編輯任務對話內容 (<cancel>)"
|
||||||
questEditorEnterFinishMessage: "編輯完成任務對話內容 (<cancel>)"
|
questEditorEnterFinishMessage: "編輯完成任務對話內容 (<cancel>)"
|
||||||
questEditorEnterNPCStart: "輸入 NPC ID, <clear>, <cancel>"
|
questEditorEnterNPCStart: "輸入 NPC ID, <clear>, <cancel>"
|
||||||
@ -165,10 +164,6 @@ stageEditorDelete: "刪除階段"
|
|||||||
stageEditorSetBlockNames: "設置方塊名稱"
|
stageEditorSetBlockNames: "設置方塊名稱"
|
||||||
stageEditorSetBlockAmounts: "設置方塊數量"
|
stageEditorSetBlockAmounts: "設置方塊數量"
|
||||||
stageEditorSetBlockDurability: "設置方塊耐久性"
|
stageEditorSetBlockDurability: "設置方塊耐久性"
|
||||||
stageEditorSetDamageAmounts: "設置擊殺次數"
|
|
||||||
stageEditorSetPlaceAmounts: "設置放置次數"
|
|
||||||
stageEditorSetUseAmounts: "設置使用次數"
|
|
||||||
stageEditorSetCutAmounts: "設置使用次數"
|
|
||||||
stageEditorSetKillAmounts: "設置擊殺次數"
|
stageEditorSetKillAmounts: "設置擊殺次數"
|
||||||
stageEditorSetEnchantAmounts: "設置附魔次數"
|
stageEditorSetEnchantAmounts: "設置附魔次數"
|
||||||
stageEditorSetMobAmounts: "設置殺怪數"
|
stageEditorSetMobAmounts: "設置殺怪數"
|
||||||
@ -197,11 +192,7 @@ stageEditorCustomAlreadyAdded: "自訂目標已添加!"
|
|||||||
stageEditorCustomCleared: "已清除自訂目標."
|
stageEditorCustomCleared: "已清除自訂目標."
|
||||||
stageEditorCustomDataPrompt: "輸入 <data> 的價值:"
|
stageEditorCustomDataPrompt: "輸入 <data> 的價值:"
|
||||||
stageEditorEnterBlockNames: "輸入方塊名稱 (或 ID), <space>, <cancel>"
|
stageEditorEnterBlockNames: "輸入方塊名稱 (或 ID), <space>, <cancel>"
|
||||||
stageEditorBreakBlocksPrompt: "輸入使用次數 (0-9), <space>, <cancel>"
|
stageEditorEnterBlockAmounts: "Enter block amounts, <space>, <cancel>"
|
||||||
stageEditorDamageBlocksPrompt: "輸入擊殺次數 (0-9), <space>, <cancel>"
|
|
||||||
stageEditorPlaceBlocksPrompt: "輸入放置次數 (0-9), <space>, <cancel>"
|
|
||||||
stageEditorUseBlocksPrompt: "輸入使用次數 (0-9), <space>, <cancel>"
|
|
||||||
stageEditorCutBlocksPrompt: "輸入削減次數 (0-9), <space>, <cancel>"
|
|
||||||
stageEditorEnterBlockDurability: "輸入塊耐久性 (0-9), <space>, <cancel>"
|
stageEditorEnterBlockDurability: "輸入塊耐久性 (0-9), <space>, <cancel>"
|
||||||
stageEditorCatchFishPrompt: "輸入要捕獲的魚的數量, <clear>, <cancel>"
|
stageEditorCatchFishPrompt: "輸入要捕獲的魚的數量, <clear>, <cancel>"
|
||||||
stageEditorKillPlayerPrompt: "輸入要擊殺玩家的數量, <clear>, <cancel>"
|
stageEditorKillPlayerPrompt: "輸入要擊殺玩家的數量, <clear>, <cancel>"
|
||||||
@ -601,16 +592,6 @@ timeZoneTitle: "- Time Zones -"
|
|||||||
enchantmentsTitle: "- Enchantments -"
|
enchantmentsTitle: "- Enchantments -"
|
||||||
questGUITitle: "- GUI Item Display -"
|
questGUITitle: "- GUI Item Display -"
|
||||||
questRegionTitle: "- Quest Region -"
|
questRegionTitle: "- Quest Region -"
|
||||||
effBlazeShoot: "Sound of a Blaze firing"
|
|
||||||
effBowFire: "Sound of a bow firing"
|
|
||||||
effClick1: "A click sound"
|
|
||||||
effClick2: "A different click sound"
|
|
||||||
effDoorToggle: "Sound of a door opening or closing"
|
|
||||||
effExtinguish: "Sound of fire being extinguished"
|
|
||||||
effGhastShoot: "Sound of a Ghast firing"
|
|
||||||
effGhastShriek: "Sound of a Ghast shrieking"
|
|
||||||
effZombieWood: "Sound of a Zombie chewing an iron door"
|
|
||||||
effZombieIron: "Sound of a Zombie chewing a wooden door"
|
|
||||||
effEnterName: "Enter an effect name to add it to the list, <cancel>"
|
effEnterName: "Enter an effect name to add it to the list, <cancel>"
|
||||||
cmdAdd: "add"
|
cmdAdd: "add"
|
||||||
strAdd: "then enter '<command>' to include it"
|
strAdd: "then enter '<command>' to include it"
|
||||||
|
@ -64,10 +64,9 @@ questEditorPln: "Edit Planner"
|
|||||||
questEditorStages: "Edit Stages"
|
questEditorStages: "Edit Stages"
|
||||||
questEditorRews: "Edit Rewards"
|
questEditorRews: "Edit Rewards"
|
||||||
questEditorOpts: "Edit Options"
|
questEditorOpts: "Edit Options"
|
||||||
questEditorEnterQuestName: "Enter Quest name (<cancel>)"
|
questEditorEnterQuestName: "Enter Quest name, <cancel>"
|
||||||
questEditorEditEnterQuestName: "Enter Quest name to edit (<cancel>)"
|
questEditorEnterAskMessage: "Enter ask message, <cancel>"
|
||||||
questEditorEnterAskMessage: "Enter ask message (<cancel>)"
|
questEditorEnterFinishMessage: "Enter finish message, <cancel>"
|
||||||
questEditorEnterFinishMessage: "Enter finish message (<cancel>)"
|
|
||||||
questEditorEnterNPCStart: "Enter NPC ID, <clear>, <cancel>"
|
questEditorEnterNPCStart: "Enter NPC ID, <clear>, <cancel>"
|
||||||
questEditorEnterBlockStart: "Right-click on a block to use as a start point, <done>, <clear>, <cancel>"
|
questEditorEnterBlockStart: "Right-click on a block to use as a start point, <done>, <clear>, <cancel>"
|
||||||
questEditorEnterInitialEvent: "Enter an Action name, <clear>, <cancel>"
|
questEditorEnterInitialEvent: "Enter an Action name, <clear>, <cancel>"
|
||||||
@ -84,7 +83,7 @@ questPartiesInvite: "<player> can now perform quests with you!"
|
|||||||
questPartiesJoin: "You can now perform quests with <player>."
|
questPartiesJoin: "You can now perform quests with <player>."
|
||||||
questPartiesKicked: "<player> can no longer perform quests with you."
|
questPartiesKicked: "<player> can no longer perform quests with you."
|
||||||
questPartiesLeave: "You can no longer perform quests with <player>."
|
questPartiesLeave: "You can no longer perform quests with <player>."
|
||||||
questWGSetRegion: "Set Region"
|
questWGSetRegion: "Set Region start"
|
||||||
questWGPrompt: "Enter WorldGuard region, <clear>, <cancel>"
|
questWGPrompt: "Enter WorldGuard region, <clear>, <cancel>"
|
||||||
questWGInvalidRegion: "<region> is not a valid WorldGuard region!"
|
questWGInvalidRegion: "<region> is not a valid WorldGuard region!"
|
||||||
questWGRegionCleared: "Quest region cleared."
|
questWGRegionCleared: "Quest region cleared."
|
||||||
@ -163,11 +162,7 @@ stageEditorCompleteMessage: "Complete message"
|
|||||||
stageEditorDelete: "Delete Stage"
|
stageEditorDelete: "Delete Stage"
|
||||||
stageEditorSetBlockNames: "Set block names"
|
stageEditorSetBlockNames: "Set block names"
|
||||||
stageEditorSetBlockAmounts: "Set block amounts"
|
stageEditorSetBlockAmounts: "Set block amounts"
|
||||||
stageEditorSetBlockDurability: "Set block durability"
|
stageEditorSetBlockDurability: "Set block durabilities"
|
||||||
stageEditorSetDamageAmounts: "Set damage amounts"
|
|
||||||
stageEditorSetPlaceAmounts: "Set place amounts"
|
|
||||||
stageEditorSetUseAmounts: "Set use amounts"
|
|
||||||
stageEditorSetCutAmounts: "Set cut amounts"
|
|
||||||
stageEditorSetKillAmounts: "Set kill amounts"
|
stageEditorSetKillAmounts: "Set kill amounts"
|
||||||
stageEditorSetEnchantAmounts: "Set enchant amounts"
|
stageEditorSetEnchantAmounts: "Set enchant amounts"
|
||||||
stageEditorSetMobAmounts: "Set mob amounts"
|
stageEditorSetMobAmounts: "Set mob amounts"
|
||||||
@ -196,12 +191,8 @@ stageEditorCustomAlreadyAdded: "That custom objective has already been added!"
|
|||||||
stageEditorCustomCleared: "Custom objectives cleared."
|
stageEditorCustomCleared: "Custom objectives cleared."
|
||||||
stageEditorCustomDataPrompt: "Enter value for <data>:"
|
stageEditorCustomDataPrompt: "Enter value for <data>:"
|
||||||
stageEditorEnterBlockNames: "Enter block names, <space>, <cancel>"
|
stageEditorEnterBlockNames: "Enter block names, <space>, <cancel>"
|
||||||
stageEditorBreakBlocksPrompt: "Enter break amounts (numbers), <space>, <cancel>"
|
stageEditorEnterBlockAmounts: "Enter block amounts, <space>, <cancel>"
|
||||||
stageEditorDamageBlocksPrompt: "Enter damage amounts (numbers), <space>, <cancel>"
|
stageEditorEnterBlockDurability: "Enter block durabilities (numbers), <space>, <cancel>"
|
||||||
stageEditorPlaceBlocksPrompt: "Enter place amounts (numbers), <space>, <cancel>"
|
|
||||||
stageEditorUseBlocksPrompt: "Enter use amounts (numbers), <space>, <cancel>"
|
|
||||||
stageEditorCutBlocksPrompt: "Enter cut amounts (numbers), <space>, <cancel>"
|
|
||||||
stageEditorEnterBlockDurability: "Enter block durability (numbers), <space>, <cancel>"
|
|
||||||
stageEditorCatchFishPrompt: "Enter number of fish to catch, <clear>, <cancel>"
|
stageEditorCatchFishPrompt: "Enter number of fish to catch, <clear>, <cancel>"
|
||||||
stageEditorKillPlayerPrompt: "Enter number of players to kill, <clear>, <cancel>"
|
stageEditorKillPlayerPrompt: "Enter number of players to kill, <clear>, <cancel>"
|
||||||
stageEditorEnchantTypePrompt: "Enter enchantment names, <semicolon>, <cancel>"
|
stageEditorEnchantTypePrompt: "Enter enchantment names, <semicolon>, <cancel>"
|
||||||
@ -600,16 +591,6 @@ timeZoneTitle: "- Time Zones -"
|
|||||||
enchantmentsTitle: "- Enchantments -"
|
enchantmentsTitle: "- Enchantments -"
|
||||||
questGUITitle: "- GUI Item Display -"
|
questGUITitle: "- GUI Item Display -"
|
||||||
questRegionTitle: "- Quest Region -"
|
questRegionTitle: "- Quest Region -"
|
||||||
effBlazeShoot: "Sound of a Blaze firing"
|
|
||||||
effBowFire: "Sound of a bow firing"
|
|
||||||
effClick1: "A click sound"
|
|
||||||
effClick2: "A different click sound"
|
|
||||||
effDoorToggle: "Sound of a door opening or closing"
|
|
||||||
effExtinguish: "Sound of fire being extinguished"
|
|
||||||
effGhastShoot: "Sound of a Ghast firing"
|
|
||||||
effGhastShriek: "Sound of a Ghast shrieking"
|
|
||||||
effZombieWood: "Sound of a Zombie chewing an iron door"
|
|
||||||
effZombieIron: "Sound of a Zombie chewing a wooden door"
|
|
||||||
effEnterName: "Enter an effect name to add it to the list, <cancel>"
|
effEnterName: "Enter an effect name to add it to the list, <cancel>"
|
||||||
cmdAdd: "add"
|
cmdAdd: "add"
|
||||||
strAdd: "then enter '<command>' to include it"
|
strAdd: "then enter '<command>' to include it"
|
||||||
|
4
pom.xml
4
pom.xml
@ -6,12 +6,12 @@
|
|||||||
<groupId>me.blackvein.quests</groupId>
|
<groupId>me.blackvein.quests</groupId>
|
||||||
|
|
||||||
<artifactId>quests-parent</artifactId>
|
<artifactId>quests-parent</artifactId>
|
||||||
<version>3.8.1</version>
|
<version>3.8.2</version>
|
||||||
<name>quests</name>
|
<name>quests</name>
|
||||||
<url>https://github.com/PikaMug/Quests/</url>
|
<url>https://github.com/PikaMug/Quests/</url>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<revision>3.8.1</revision>
|
<revision>3.8.2</revision>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<maven.compiler.source>1.8</maven.compiler.source>
|
<maven.compiler.source>1.8</maven.compiler.source>
|
||||||
<maven.compiler.target>1.8</maven.compiler.target>
|
<maven.compiler.target>1.8</maven.compiler.target>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>me.blackvein.quests</groupId>
|
<groupId>me.blackvein.quests</groupId>
|
||||||
<artifactId>quests-parent</artifactId>
|
<artifactId>quests-parent</artifactId>
|
||||||
<version>3.8.1</version>
|
<version>3.8.2</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
@ -45,8 +45,11 @@ public class ParticleProvider_v1_8_R1 extends ParticleProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
void spawnParticle(Player player, Location location, Object particle, float offsetX, float offsetY, float offsetZ, float speed, int count, int[] data) {
|
void spawnParticle(Player player, Location location, Object particle, float offsetX, float offsetY, float offsetZ,
|
||||||
PacketPlayOutWorldParticles packet = new PacketPlayOutWorldParticles((EnumParticle) particle, false, (float) location.getX(), (float) location.getY(), (float) location.getZ(), offsetX, offsetY, offsetZ, speed, count, data);
|
float speed, int count, int[] data) {
|
||||||
|
PacketPlayOutWorldParticles packet = new PacketPlayOutWorldParticles((EnumParticle) particle, false,
|
||||||
|
(float) location.getX(), (float) location.getY(), (float) location.getZ(), offsetX, offsetY, offsetZ,
|
||||||
|
speed, count, data);
|
||||||
((CraftPlayer) player).getHandle().playerConnection.sendPacket(packet);
|
((CraftPlayer) player).getHandle().playerConnection.sendPacket(packet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>me.blackvein.quests</groupId>
|
<groupId>me.blackvein.quests</groupId>
|
||||||
<artifactId>quests-parent</artifactId>
|
<artifactId>quests-parent</artifactId>
|
||||||
<version>3.8.1</version>
|
<version>3.8.2</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
@ -45,8 +45,11 @@ public class ParticleProvider_v1_8_R2 extends ParticleProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
void spawnParticle(Player player, Location location, Object particle, float offsetX, float offsetY, float offsetZ, float speed, int count, int[] data) {
|
void spawnParticle(Player player, Location location, Object particle, float offsetX, float offsetY, float offsetZ,
|
||||||
PacketPlayOutWorldParticles packet = new PacketPlayOutWorldParticles((EnumParticle) particle, false, (float) location.getX(), (float) location.getY(), (float) location.getZ(), offsetX, offsetY, offsetZ, speed, count, data);
|
float speed, int count, int[] data) {
|
||||||
|
PacketPlayOutWorldParticles packet = new PacketPlayOutWorldParticles((EnumParticle) particle, false,
|
||||||
|
(float) location.getX(), (float) location.getY(), (float) location.getZ(), offsetX, offsetY, offsetZ,
|
||||||
|
speed, count, data);
|
||||||
((CraftPlayer) player).getHandle().playerConnection.sendPacket(packet);
|
((CraftPlayer) player).getHandle().playerConnection.sendPacket(packet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>me.blackvein.quests</groupId>
|
<groupId>me.blackvein.quests</groupId>
|
||||||
<artifactId>quests-parent</artifactId>
|
<artifactId>quests-parent</artifactId>
|
||||||
<version>3.8.1</version>
|
<version>3.8.2</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
@ -45,8 +45,11 @@ public class ParticleProvider_v1_8_R3 extends ParticleProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
void spawnParticle(Player player, Location location, Object particle, float offsetX, float offsetY, float offsetZ, float speed, int count, int[] data) {
|
void spawnParticle(Player player, Location location, Object particle, float offsetX, float offsetY, float offsetZ,
|
||||||
PacketPlayOutWorldParticles packet = new PacketPlayOutWorldParticles((EnumParticle) particle, false, (float) location.getX(), (float) location.getY(), (float) location.getZ(), offsetX, offsetY, offsetZ, speed, count, data);
|
float speed, int count, int[] data) {
|
||||||
|
PacketPlayOutWorldParticles packet = new PacketPlayOutWorldParticles((EnumParticle) particle, false,
|
||||||
|
(float) location.getX(), (float) location.getY(), (float) location.getZ(), offsetX, offsetY, offsetZ,
|
||||||
|
speed, count, data);
|
||||||
((CraftPlayer) player).getHandle().playerConnection.sendPacket(packet);
|
((CraftPlayer) player).getHandle().playerConnection.sendPacket(packet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user