mirror of
https://github.com/PikaMug/Quests.git
synced 2024-12-22 09:08:05 +01:00
Merge pull request #11 from BlockCat/master
*Fixed denizen script not being recognized
This commit is contained in:
commit
e6009f5751
239
pom.xml
239
pom.xml
@ -1,110 +1,129 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>me.blackvein.quests</groupId>
|
||||
<artifactId>quests</artifactId>
|
||||
<version>1.6.7-SNAPSHOT</version>
|
||||
<name>quests</name>
|
||||
<url>http://dev.bukkit.org/server-mods/quests/</url>
|
||||
<packaging>jar</packaging>
|
||||
<description></description>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>bukkit-repo</id>
|
||||
<url>http://repo.bukkit.org/content/groups/public</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>citizens-repo</id>
|
||||
<url>http://repo.citizensnpcs.com</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>denizens-repo</id>
|
||||
<url>http://repo.citizensnpcs.com</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>vault-repo</id>
|
||||
<url>http://ci.herocraftonline.com/plugin/repository/everything</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>mcMMO-repo</id>
|
||||
<url>http://repo.mcmmo.org</url>
|
||||
</repository>
|
||||
|
||||
</repositories>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>craftbukkit</artifactId>
|
||||
<version>LATEST</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.citizensnpcs</groupId>
|
||||
<artifactId>citizens</artifactId>
|
||||
<version>2.0.9-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.aufdemrand</groupId>
|
||||
<artifactId>denizen</artifactId>
|
||||
<version>0.8-PRERELEASE</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.milkbowl.vault</groupId>
|
||||
<artifactId>Vault</artifactId>
|
||||
<version>1.2.22-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.gmail.nossr50.mcMMO</groupId>
|
||||
<artifactId>mcMMO</artifactId>
|
||||
<version>LATEST</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>me.ThaH3lper</groupId>
|
||||
<artifactId>EpicBoss</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/lib/EpicBossRecoded.jar</systemPath>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<resources>
|
||||
<resource>
|
||||
<targetPath>.</targetPath>
|
||||
<directory>${basedir}/src/main/resources/</directory>
|
||||
<filtering>true</filtering>
|
||||
<includes>
|
||||
<include>config.yml</include>
|
||||
<include>plugin.yml</include>
|
||||
<include>events.yml</include>
|
||||
<include>quests.yml</include>
|
||||
<include>items.txt</include>
|
||||
</includes>
|
||||
</resource>
|
||||
<resource>
|
||||
<targetPath>.</targetPath>
|
||||
<directory>${basedir}/</directory>
|
||||
<filtering>false</filtering>
|
||||
<includes>
|
||||
<include>README.md</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>2.3.2</version>
|
||||
<configuration>
|
||||
<showDeprecation>true</showDeprecation>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>me.blackvein.quests</groupId>
|
||||
<artifactId>quests</artifactId>
|
||||
<version>1.6.7-SNAPSHOT</version>
|
||||
<name>quests</name>
|
||||
<url>http://dev.bukkit.org/server-mods/quests/</url>
|
||||
<packaging>jar</packaging>
|
||||
<description></description>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<libs.dir>${project.basedir}/lib</libs.dir>
|
||||
</properties>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>bukkit-repo</id>
|
||||
<url>http://repo.bukkit.org/content/groups/public</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>citizens-repo</id>
|
||||
<url>http://repo.citizensnpcs.com</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>denizens-repo</id>
|
||||
<url>http://repo.citizensnpcs.com</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>vault-repo</id>
|
||||
<url>http://ci.herocraftonline.com/plugin/repository/everything</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>mcMMO-repo</id>
|
||||
<url>http://repo.mcmmo.org</url>
|
||||
</repository>
|
||||
|
||||
</repositories>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>craftbukkit</artifactId>
|
||||
<version>LATEST</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.citizensnpcs</groupId>
|
||||
<artifactId>citizens</artifactId>
|
||||
<version>2.0.9-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.aufdemrand</groupId>
|
||||
<artifactId>denizen</artifactId>
|
||||
<version>0.9.2-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.milkbowl.vault</groupId>
|
||||
<artifactId>Vault</artifactId>
|
||||
<version>1.2.22-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.gmail.nossr50.mcMMO</groupId>
|
||||
<artifactId>mcMMO</artifactId>
|
||||
<version>LATEST</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>me.ThaH3lper</groupId>
|
||||
<artifactId>EpicBoss</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${libs.dir}/EpicBossRecoded.jar</systemPath>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<resources>
|
||||
<resource>
|
||||
<targetPath>.</targetPath>
|
||||
<directory>${basedir}/src/main/resources/</directory>
|
||||
<filtering>true</filtering>
|
||||
<includes>
|
||||
<include>config.yml</include>
|
||||
<include>plugin.yml</include>
|
||||
<include>events.yml</include>
|
||||
<include>quests.yml</include>
|
||||
<include>items.txt</include>
|
||||
</includes>
|
||||
</resource>
|
||||
<resource>
|
||||
<targetPath>.</targetPath>
|
||||
<directory>${basedir}/</directory>
|
||||
<filtering>false</filtering>
|
||||
<includes>
|
||||
<include>README.md</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.1</version>
|
||||
<configuration>
|
||||
<showDeprecation>true</showDeprecation>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>2.4</version>
|
||||
<configuration>
|
||||
<archive>
|
||||
<addMavenDescriptor>true</addMavenDescriptor>
|
||||
<manifest>
|
||||
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
|
||||
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
|
||||
</manifest>
|
||||
</archive>
|
||||
<outputDirectory>${project.build.directory}</outputDirectory>
|
||||
<finalName>${project.build.finalName}</finalName>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
@ -1885,7 +1885,7 @@ public class EventFactory implements ConversationAbandonedListener, ColorUtil{
|
||||
text += GRAY + "3 - " + Lang.get("eventEditorAddSpawnLocation") + Lang.get("eventEditorNoAmountsSet") + "\n";
|
||||
} else {
|
||||
|
||||
text += BLUE + "" + BOLD + "2" + RESET + YELLOW + " - " + Lang.get("eventEditorSetMobAmounts");
|
||||
text += BLUE + "" + BOLD + "2" + RESET + YELLOW + " - " + Lang.get("eventEditorSetMobAmounts") + "\n";
|
||||
for (int i : (LinkedList<Integer>) context.getSessionData(CK.E_MOB_AMOUNTS)) {
|
||||
text += GRAY + " - " + DARKAQUA + i + "\n";
|
||||
}
|
||||
|
@ -26,14 +26,14 @@ public class NpcEffectThread implements Runnable{
|
||||
if(nearby.isEmpty() == false){
|
||||
|
||||
for(Entity e : nearby){
|
||||
|
||||
if(plugin.citizens.getNPCRegistry().isNPC(e)){
|
||||
|
||||
NPC npc = plugin.citizens.getNPCRegistry().getNPC(e);
|
||||
if(plugin.hasQuest(npc, quester))
|
||||
showEffect(player, npc);
|
||||
|
||||
}
|
||||
if(plugin.citizens != null)
|
||||
if(plugin.citizens.getNPCRegistry().isNPC(e)){
|
||||
|
||||
NPC npc = plugin.citizens.getNPCRegistry().getNPC(e);
|
||||
if(plugin.hasQuest(npc, quester))
|
||||
showEffect(player, npc);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,9 @@
|
||||
package me.blackvein.quests;
|
||||
|
||||
import com.gmail.nossr50.api.ExperienceAPI;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import me.blackvein.quests.util.ItemUtil;
|
||||
@ -63,8 +66,7 @@ public class Quest {
|
||||
if(q.currentStage.delay < 0){
|
||||
|
||||
Player player = q.getPlayer();
|
||||
|
||||
if(q.currentStageIndex >= (stages.size() - 1)){
|
||||
if(stages.indexOf(q.currentStage) == (q.currentQuest.stages.size() - 1)){
|
||||
|
||||
if(q.currentStage.script != null)
|
||||
plugin.trigger.parseQuestTaskTrigger(q.currentStage.script, player);
|
||||
@ -80,7 +82,7 @@ public class Quest {
|
||||
plugin.trigger.parseQuestTaskTrigger(q.currentStage.script, player);
|
||||
if(q.currentStage.event != null)
|
||||
q.currentStage.event.happen(q);
|
||||
q.currentStage = stages.get(stages.indexOf(q.currentStage) + 1);
|
||||
q.currentStage = stages.get(q.currentStageIndex + 1);
|
||||
q.currentStageIndex++;
|
||||
q.addEmpties();
|
||||
|
||||
@ -210,7 +212,7 @@ public class Quest {
|
||||
|
||||
for(String s : mcmmoSkills){
|
||||
|
||||
new McMMOPlayer(player).getProfile().skillUp(Quests.getMcMMOSkill(s), mcmmoAmounts.get(mcmmoSkills.indexOf(s)));
|
||||
UserManager.getPlayer(player).getProfile().addLevels(Quests.getMcMMOSkill(s), mcmmoAmounts.get(mcmmoSkills.indexOf(s)));
|
||||
none = null;
|
||||
|
||||
}
|
||||
@ -252,6 +254,12 @@ public class Quest {
|
||||
player.sendMessage("- " + ChatColor.DARK_GREEN + exp + ChatColor.DARK_PURPLE + " Experience");
|
||||
none = null;
|
||||
}
|
||||
|
||||
if (mcmmoSkills.isEmpty() == false) {
|
||||
for (String s : mcmmoSkills) {
|
||||
player.sendMessage("- " + ChatColor.DARK_GREEN + mcmmoAmounts.get(mcmmoSkills.indexOf(s)) + " " + ChatColor.DARK_PURPLE + s + " Experience");
|
||||
}
|
||||
}
|
||||
|
||||
if(none != null){
|
||||
player.sendMessage(none);
|
||||
@ -280,17 +288,15 @@ public class Quest {
|
||||
}else if(other.blockStart == null && blockStart != null)
|
||||
return false;
|
||||
|
||||
for(String s : other.commands){
|
||||
|
||||
if(commands.size() >= (other.commands.indexOf(s))){
|
||||
|
||||
if(commands.get(other.commands.indexOf(s)).equals(s) == false)
|
||||
return false;
|
||||
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
|
||||
if(commands.size() == other.commands.size()){
|
||||
|
||||
for (int i = 0; i < commands.size(); i++) {
|
||||
if (commands.get(i).equals(other.commands.get(i)) == false)
|
||||
return false;
|
||||
}
|
||||
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
|
||||
if(other.description.equals(description) == false)
|
||||
|
@ -83,10 +83,10 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
|
||||
|
||||
String text =
|
||||
GOLD + "- Quest Editor -\n"
|
||||
+ BLUE + "" + BOLD + "1" + RESET + YELLOW + " - Create a Quest\n"
|
||||
+ BLUE + "" + BOLD + "2" + RESET + YELLOW + " - Edit a Quest\n"
|
||||
+ BLUE + "" + BOLD + "3" + RESET + YELLOW + " - Delete a Quest\n"
|
||||
+ GOLD + "" + BOLD + "4" + RESET + YELLOW + " - Exit";
|
||||
+ BLUE + "" + BOLD + "1" + RESET + YELLOW + " - " + Lang.get("questEditorCreate") + "\n"
|
||||
+ BLUE + "" + BOLD + "2" + RESET + YELLOW + " - " + Lang.get("questEditorEdit") + "\n"
|
||||
+ BLUE + "" + BOLD + "3" + RESET + YELLOW + " - " + Lang.get("questEditorDelete") + "\n"
|
||||
+ GOLD + "" + BOLD + "4" + RESET + YELLOW + " - " + Lang.get("exit");
|
||||
|
||||
|
||||
return text;
|
||||
@ -103,7 +103,7 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
|
||||
if (player.hasPermission("quests.editor.create")) {
|
||||
return new QuestNamePrompt();
|
||||
} else {
|
||||
player.sendMessage(RED + "You do not have permission to create Quests.");
|
||||
player.sendMessage(RED + Lang.get("questEditorNoPermsCreate"));
|
||||
return new MenuPrompt();
|
||||
}
|
||||
|
||||
@ -112,7 +112,7 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
|
||||
if (player.hasPermission("quests.editor.edit")) {
|
||||
return new SelectEditPrompt();
|
||||
} else {
|
||||
player.sendMessage(RED + "You do not have permission to edit Quests.");
|
||||
player.sendMessage(RED + Lang.get("questEditorNoPermsCreate"));
|
||||
return new MenuPrompt();
|
||||
}
|
||||
|
||||
@ -121,12 +121,12 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
|
||||
if (player.hasPermission("quests.editor.delete")) {
|
||||
return new SelectDeletePrompt();
|
||||
} else {
|
||||
player.sendMessage(RED + "You do not have permission to delete Quests.");
|
||||
player.sendMessage(RED + Lang.get("questEditorNoPermsDelete"));
|
||||
return new MenuPrompt();
|
||||
}
|
||||
|
||||
} else if (input.equalsIgnoreCase("4")) {
|
||||
context.getForWhom().sendRawMessage(YELLOW + "Exited.");
|
||||
context.getForWhom().sendRawMessage(YELLOW + Lang.get("exited"));
|
||||
return Prompt.END_OF_CONVERSATION;
|
||||
}
|
||||
|
||||
@ -155,29 +155,29 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
|
||||
String text =
|
||||
GOLD + "- Quest: " + AQUA + context.getSessionData(CK.Q_NAME) + GOLD + " -\n";
|
||||
|
||||
text += BLUE + "" + BOLD + "1" + RESET + YELLOW + " - Set name\n";
|
||||
text += BLUE + "" + BOLD + "1" + RESET + YELLOW + " - "+ Lang.get("questEditorName") +"\n";
|
||||
|
||||
if (context.getSessionData(CK.Q_ASK_MESSAGE) == null) {
|
||||
text += BLUE + "" + BOLD + "2" + RESET + RED + " - Set ask message " + DARKRED + "(Required, none set)\n";
|
||||
text += BLUE + "" + BOLD + "2" + RESET + RED + " - " + Lang.get("questEditorAskMessage") + " " + DARKRED + "(Required, none set)\n";
|
||||
} else {
|
||||
text += BLUE + "" + BOLD + "2" + RESET + YELLOW + " - Set ask message (\"" + context.getSessionData(CK.Q_ASK_MESSAGE) + "\")\n";
|
||||
text += BLUE + "" + BOLD + "2" + RESET + YELLOW + " - " + Lang.get("questEditorAskMessage") + " (\"" + context.getSessionData(CK.Q_ASK_MESSAGE) + "\")\n";
|
||||
}
|
||||
|
||||
|
||||
if (context.getSessionData(CK.Q_FINISH_MESSAGE) == null) {
|
||||
text += BLUE + "" + BOLD + "3" + RESET + RED + " - Set finish message " + DARKRED + "(Required, none set)\n";
|
||||
text += BLUE + "" + BOLD + "3" + RESET + RED + " - " + Lang.get("questEditorFinishMessage") + " " + DARKRED + "(Required, none set)\n";
|
||||
} else {
|
||||
text += BLUE + "" + BOLD + "3" + RESET + YELLOW + " - Set finish message (\"" + context.getSessionData(CK.Q_FINISH_MESSAGE) + "\")\n";
|
||||
text += BLUE + "" + BOLD + "3" + RESET + YELLOW + " - " + Lang.get("questEditorFinishMessage") + " (\"" + context.getSessionData(CK.Q_FINISH_MESSAGE) + "\")\n";
|
||||
}
|
||||
|
||||
|
||||
if (context.getSessionData(CK.Q_REDO_DELAY) == null) {
|
||||
text += BLUE + "" + BOLD + "4" + RESET + YELLOW + " - Set redo delay (None set)\n";
|
||||
text += BLUE + "" + BOLD + "4" + RESET + YELLOW + " - " + Lang.get("questEditorRedoDelay") + " (None set)\n";
|
||||
} else {
|
||||
|
||||
//something here is throwing an exception
|
||||
try{
|
||||
text += BLUE + "" + BOLD + "4" + RESET + YELLOW + " - Set redo delay (" + Quests.getTime((Long) context.getSessionData(CK.Q_REDO_DELAY)) + ")\n";
|
||||
text += BLUE + "" + BOLD + "4" + RESET + YELLOW + " - " + Lang.get("questEditorRedoDelay") + " (" + Quests.getTime((Long) context.getSessionData(CK.Q_REDO_DELAY)) + ")\n";
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
@ -186,27 +186,27 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
|
||||
}
|
||||
|
||||
if (context.getSessionData(CK.Q_START_NPC) == null && quests.citizens != null) {
|
||||
text += BLUE + "" + BOLD + "5" + RESET + YELLOW + " - Set NPC start (None set)\n";
|
||||
text += BLUE + "" + BOLD + "5" + RESET + YELLOW + " - " + Lang.get("questEditorNPCStart") + " (None set)\n";
|
||||
} else if (quests.citizens != null) {
|
||||
text += BLUE + "" + BOLD + "5" + RESET + YELLOW + " - Set NPC start (" + CitizensAPI.getNPCRegistry().getById((Integer) context.getSessionData(CK.Q_START_NPC)).getName() + ")\n";
|
||||
text += BLUE + "" + BOLD + "5" + RESET + YELLOW + " - " + Lang.get("questEditorNPCStart") + " (" + CitizensAPI.getNPCRegistry().getById((Integer) context.getSessionData(CK.Q_START_NPC)).getName() + ")\n";
|
||||
}
|
||||
|
||||
if (context.getSessionData(CK.Q_START_BLOCK) == null) {
|
||||
|
||||
if (quests.citizens != null) {
|
||||
text += BLUE + "" + BOLD + "6" + RESET + YELLOW + " - Set Block start (None set)\n";
|
||||
text += BLUE + "" + BOLD + "6" + RESET + YELLOW + " - " + Lang.get("questEditorBlockStart") + " (None set)\n";
|
||||
} else {
|
||||
text += BLUE + "" + BOLD + "5" + RESET + YELLOW + " - Set Block start (None set)\n";
|
||||
text += BLUE + "" + BOLD + "5" + RESET + YELLOW + " - " + Lang.get("questEditorBlockStart") + " (None set)\n";
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
if (quests.citizens != null) {
|
||||
Location l = (Location) context.getSessionData(CK.Q_START_BLOCK);
|
||||
text += BLUE + "" + BOLD + "6" + RESET + YELLOW + " - Set Block start (" + l.getWorld().getName() + ", " + l.getBlockX() + ", " + l.getBlockY() + ", " + l.getBlockZ() + ")\n";
|
||||
text += BLUE + "" + BOLD + "6" + RESET + YELLOW + " - " + Lang.get("questEditorBlockStart") + " (" + l.getWorld().getName() + ", " + l.getBlockX() + ", " + l.getBlockY() + ", " + l.getBlockZ() + ")\n";
|
||||
} else {
|
||||
Location l = (Location) context.getSessionData(CK.Q_START_BLOCK);
|
||||
text += BLUE + "" + BOLD + "5" + RESET + YELLOW + " - Set Block start (" + l.getWorld().getName() + ", " + l.getBlockX() + ", " + l.getBlockY() + ", " + l.getBlockZ() + ")\n";
|
||||
text += BLUE + "" + BOLD + "5" + RESET + YELLOW + " - " + Lang.get("questEditorBlockStart") + " (" + l.getWorld().getName() + ", " + l.getBlockX() + ", " + l.getBlockY() + ", " + l.getBlockZ() + ")\n";
|
||||
}
|
||||
|
||||
}
|
||||
@ -215,53 +215,53 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
|
||||
if (context.getSessionData(CK.Q_INITIAL_EVENT) == null) {
|
||||
|
||||
if (quests.citizens != null) {
|
||||
text += BLUE + "" + BOLD + "7" + RESET + YELLOW + " - Set initial Event (None set)\n";
|
||||
text += BLUE + "" + BOLD + "7" + RESET + YELLOW + " - " + Lang.get("questEditorInitialEvent") + " (None set)\n";
|
||||
} else {
|
||||
text += BLUE + "" + BOLD + "6" + RESET + YELLOW + " - Set initial Event (None set)\n";
|
||||
text += BLUE + "" + BOLD + "6" + RESET + YELLOW + " - " + Lang.get("questEditorInitialEvent") + " (None set)\n";
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
if (quests.citizens != null) {
|
||||
String s = (String) context.getSessionData(CK.Q_INITIAL_EVENT);
|
||||
text += BLUE + "" + BOLD + "7" + RESET + YELLOW + " - Set initial Event (" + s + ")\n";
|
||||
text += BLUE + "" + BOLD + "7" + RESET + YELLOW + " - " + Lang.get("questEditorInitialEvent") + " (" + s + ")\n";
|
||||
} else {
|
||||
String s = (String) context.getSessionData(CK.Q_INITIAL_EVENT);
|
||||
text += BLUE + "" + BOLD + "6" + RESET + YELLOW + " - Set initial Event (" + s + ")\n";
|
||||
text += BLUE + "" + BOLD + "6" + RESET + YELLOW + " - " + Lang.get("questEditorInitialEvent") + " (" + s + ")\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (quests.citizens != null) {
|
||||
text += BLUE + "" + BOLD + "8" + RESET + DARKAQUA + " - Edit Requirements\n";
|
||||
text += BLUE + "" + BOLD + "8" + RESET + DARKAQUA + " - " + Lang.get("questEditorReqs") + "\n";
|
||||
} else {
|
||||
text += BLUE + "" + BOLD + "7" + RESET + DARKAQUA + " - Edit Requirements\n";
|
||||
text += BLUE + "" + BOLD + "7" + RESET + DARKAQUA + " - " + Lang.get("questEditorReqs") + "\n";
|
||||
}
|
||||
|
||||
|
||||
if (quests.citizens != null) {
|
||||
text += BLUE + "" + BOLD + "9" + RESET + PINK + " - Edit Stages\n";
|
||||
text += BLUE + "" + BOLD + "9" + RESET + PINK + " - " + Lang.get("questEditorStages") + "\n";
|
||||
} else {
|
||||
text += BLUE + "" + BOLD + "8" + RESET + PINK + " - Edit Stages\n";
|
||||
text += BLUE + "" + BOLD + "8" + RESET + PINK + " - " + Lang.get("questEditorStages") + "\n";
|
||||
}
|
||||
|
||||
if (quests.citizens != null) {
|
||||
text += BLUE + "" + BOLD + "10" + RESET + GREEN + " - Edit Rewards\n";
|
||||
text += BLUE + "" + BOLD + "10" + RESET + GREEN + " - " + Lang.get("questEditorRews") + "\n";
|
||||
} else {
|
||||
text += BLUE + "" + BOLD + "9" + RESET + GREEN + " - Edit Rewards\n";
|
||||
text += BLUE + "" + BOLD + "9" + RESET + GREEN + " - " + Lang.get("questEditorRews") + "\n";
|
||||
}
|
||||
|
||||
|
||||
if (quests.citizens != null) {
|
||||
text += BLUE + "" + BOLD + "11" + RESET + GOLD + " - Save\n";
|
||||
text += BLUE + "" + BOLD + "11" + RESET + GOLD + " - " + Lang.get("save") + "\n";
|
||||
} else {
|
||||
text += BLUE + "" + BOLD + "10" + RESET + GOLD + " - Save\n";
|
||||
text += BLUE + "" + BOLD + "10" + RESET + GOLD + " - " + Lang.get("save") + "\n";
|
||||
}
|
||||
|
||||
if (quests.citizens != null) {
|
||||
text += BLUE + "" + BOLD + "12" + RESET + RED + " - Exit\n";
|
||||
text += BLUE + "" + BOLD + "12" + RESET + RED + " - " + Lang.get("exit") + "\n";
|
||||
} else {
|
||||
text += BLUE + "" + BOLD + "11" + RESET + RED + " - Exit\n";
|
||||
text += BLUE + "" + BOLD + "11" + RESET + RED + " - " + Lang.get("exit") + "\n";
|
||||
}
|
||||
|
||||
|
||||
@ -387,7 +387,7 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
|
||||
@Override
|
||||
public Prompt acceptInput(ConversationContext context, String input) {
|
||||
|
||||
if (input.equalsIgnoreCase("cancel") == false) {
|
||||
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false) {
|
||||
|
||||
for (Quest q : quests.getQuests()) {
|
||||
|
||||
@ -430,8 +430,8 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
|
||||
@Override
|
||||
public String getPromptText(ConversationContext context) {
|
||||
|
||||
String text = GOLD + "- Create Quest -\n";
|
||||
text += AQUA + "Create new Quest " + GOLD + "- " + Lang.get("enterQuestName");
|
||||
String text = GOLD + "- " + Lang.get("questEditorHeader") + " -\n";
|
||||
text += AQUA + Lang.get("questEditorCreate") + " " + GOLD + "- " + Lang.get("questEditorEnterQuestName");
|
||||
|
||||
return text;
|
||||
|
||||
@ -440,13 +440,13 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
|
||||
@Override
|
||||
public Prompt acceptInput(ConversationContext context, String input) {
|
||||
|
||||
if (input.equalsIgnoreCase("cancel") == false) {
|
||||
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false) {
|
||||
|
||||
for (Quest q : quests.quests) {
|
||||
|
||||
if (q.name.equalsIgnoreCase(input)) {
|
||||
|
||||
context.getForWhom().sendRawMessage(ChatColor.RED + "Quest already exists!");
|
||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("questEditorNameExists"));
|
||||
return new QuestNamePrompt();
|
||||
|
||||
}
|
||||
@ -455,14 +455,14 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
|
||||
|
||||
if (names.contains(input)) {
|
||||
|
||||
context.getForWhom().sendRawMessage(ChatColor.RED + "Someone is creating a Quest with that name!");
|
||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("questEditorBeingEdited"));
|
||||
return new QuestNamePrompt();
|
||||
|
||||
}
|
||||
|
||||
if (input.contains(",")) {
|
||||
|
||||
context.getForWhom().sendRawMessage(ChatColor.RED + "Name may not contain commas!");
|
||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("questEditorInvalidQuestName"));
|
||||
return new QuestNamePrompt();
|
||||
|
||||
}
|
||||
@ -485,7 +485,7 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
|
||||
@Override
|
||||
public String getPromptText(ConversationContext context) {
|
||||
|
||||
return ChatColor.YELLOW + "Enter NPC ID, or -1 to clear the NPC start, or -2 to cancel";
|
||||
return ChatColor.YELLOW + Lang.get("questEditorEnterNPCStart");
|
||||
|
||||
}
|
||||
|
||||
@ -495,7 +495,7 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
|
||||
if (input.intValue() > -1) {
|
||||
|
||||
if (CitizensAPI.getNPCRegistry().getById(input.intValue()) == null) {
|
||||
context.getForWhom().sendRawMessage(ChatColor.RED + "No NPC exists with that id!");
|
||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("questEditorInvalidNPC"));
|
||||
return new SetNpcStartPrompt();
|
||||
}
|
||||
|
||||
@ -508,7 +508,7 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
|
||||
} else if (input.intValue() == -2) {
|
||||
return new CreateMenuPrompt();
|
||||
} else {
|
||||
context.getForWhom().sendRawMessage(ChatColor.RED + "No NPC exists with that id!");
|
||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("questEditorInvalidNPC"));
|
||||
return new SetNpcStartPrompt();
|
||||
}
|
||||
|
||||
@ -520,8 +520,7 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
|
||||
@Override
|
||||
public String getPromptText(ConversationContext context) {
|
||||
|
||||
return ChatColor.YELLOW + "Right-click on a block to use as a start point, then enter \"done\" to save,\n"
|
||||
+ "or enter \"clear\" to clear the block start, or \"cancel\" to return";
|
||||
return ChatColor.YELLOW + Lang.get("questEditorEnterBlockStart");
|
||||
|
||||
}
|
||||
|
||||
@ -529,9 +528,9 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
|
||||
public Prompt acceptInput(ConversationContext context, String input) {
|
||||
|
||||
Player player = (Player) context.getForWhom();
|
||||
if (input.equalsIgnoreCase("done") || input.equalsIgnoreCase("cancel")) {
|
||||
if (input.equalsIgnoreCase(Lang.get("cmdDone")) || input.equalsIgnoreCase(Lang.get("cmdCancel"))) {
|
||||
|
||||
if (input.equalsIgnoreCase("done")) {
|
||||
if (input.equalsIgnoreCase(Lang.get("cmdDone"))) {
|
||||
|
||||
Block block = selectedBlockStarts.get(player);
|
||||
if (block != null) {
|
||||
@ -539,7 +538,7 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
|
||||
context.setSessionData(CK.Q_START_BLOCK, loc);
|
||||
selectedBlockStarts.remove(player);
|
||||
} else {
|
||||
player.sendMessage(ChatColor.RED + "You must select a block first.");
|
||||
player.sendMessage(ChatColor.RED + Lang.get("questEditorNoStartBlockSelected"));
|
||||
return new BlockStartPrompt();
|
||||
}
|
||||
|
||||
@ -550,7 +549,7 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
|
||||
|
||||
return new CreateMenuPrompt();
|
||||
|
||||
} else if (input.equalsIgnoreCase("clear")) {
|
||||
} else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) {
|
||||
|
||||
selectedBlockStarts.remove(player);
|
||||
context.setSessionData(CK.Q_START_BLOCK, null);
|
||||
@ -568,14 +567,14 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
|
||||
@Override
|
||||
public String getPromptText(ConversationContext context) {
|
||||
|
||||
return ChatColor.YELLOW + "Enter Quest name (or \'cancel\' to return)";
|
||||
return ChatColor.YELLOW + Lang.get("questEditorEnterQuestName");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Prompt acceptInput(ConversationContext context, String input) {
|
||||
|
||||
if (input.equalsIgnoreCase("cancel") == false) {
|
||||
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false) {
|
||||
|
||||
for (Quest q : quests.quests) {
|
||||
|
||||
@ -586,7 +585,7 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
|
||||
}
|
||||
|
||||
if (s != null && s.equalsIgnoreCase(input) == false) {
|
||||
context.getForWhom().sendRawMessage(RED + "A Quest with that name already exists!");
|
||||
context.getForWhom().sendRawMessage(RED + Lang.get("questEditorNameExists"));
|
||||
return new SetNamePrompt();
|
||||
}
|
||||
}
|
||||
@ -594,13 +593,13 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
|
||||
}
|
||||
|
||||
if (names.contains(input)) {
|
||||
context.getForWhom().sendRawMessage(RED + "Someone is creating/editing a Quest with that name!");
|
||||
context.getForWhom().sendRawMessage(RED + Lang.get("questEditorBeingEdited"));
|
||||
return new SetNamePrompt();
|
||||
}
|
||||
|
||||
if (input.contains(",")) {
|
||||
|
||||
context.getForWhom().sendRawMessage(ChatColor.RED + "Name may not contain commas!");
|
||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("questEditorInvalidQuestName"));
|
||||
return new QuestNamePrompt();
|
||||
|
||||
}
|
||||
@ -621,14 +620,14 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
|
||||
@Override
|
||||
public String getPromptText(ConversationContext context) {
|
||||
|
||||
return ChatColor.YELLOW + "Enter ask message (or \'cancel\' to return)";
|
||||
return ChatColor.YELLOW + Lang.get("questEditorEnterAskMessage");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Prompt acceptInput(ConversationContext context, String input) {
|
||||
|
||||
if (input.equalsIgnoreCase("cancel") == false) {
|
||||
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false) {
|
||||
if (input.startsWith("++")) {
|
||||
if (context.getSessionData(CK.Q_ASK_MESSAGE) != null) {
|
||||
context.setSessionData(CK.Q_ASK_MESSAGE, context.getSessionData(CK.Q_ASK_MESSAGE) + " " + input.substring(2));
|
||||
@ -648,14 +647,14 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
|
||||
@Override
|
||||
public String getPromptText(ConversationContext context) {
|
||||
|
||||
return ChatColor.YELLOW + "Enter finish message (or \'cancel\' to return)";
|
||||
return ChatColor.YELLOW + Lang.get("questEditorEnterFinishMessage");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Prompt acceptInput(ConversationContext context, String input) {
|
||||
|
||||
if (input.equalsIgnoreCase("cancel") == false) {
|
||||
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false) {
|
||||
if (input.startsWith("++")) {
|
||||
if (context.getSessionData(CK.Q_FINISH_MESSAGE) != null) {
|
||||
context.setSessionData(CK.Q_FINISH_MESSAGE, context.getSessionData(CK.Q_FINISH_MESSAGE) + " " + input.substring(2));
|
||||
@ -675,7 +674,7 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
|
||||
@Override
|
||||
public String getPromptText(ConversationContext context) {
|
||||
|
||||
String text = DARKGREEN + "- Events -\n";
|
||||
String text = DARKGREEN + "- " + Lang.get("event") + " -\n";
|
||||
if (quests.events.isEmpty()) {
|
||||
text += RED + "- None";
|
||||
} else {
|
||||
@ -684,7 +683,7 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
|
||||
}
|
||||
}
|
||||
|
||||
return text + YELLOW + "Enter an Event name, or enter \"clear\" to clear the initial Event, or \"cancel\" to return";
|
||||
return text + YELLOW + Lang.get("questEditorEnterInitialEvent");
|
||||
|
||||
}
|
||||
|
||||
@ -693,7 +692,7 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
|
||||
|
||||
Player player = (Player) context.getForWhom();
|
||||
|
||||
if (input.equalsIgnoreCase("cancel") == false && input.equalsIgnoreCase("clear") == false) {
|
||||
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false && input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
||||
|
||||
Event found = null;
|
||||
|
||||
@ -707,16 +706,16 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
|
||||
}
|
||||
|
||||
if (found == null) {
|
||||
player.sendMessage(RED + input + YELLOW + " is not a valid event name!");
|
||||
player.sendMessage(RED + input + YELLOW + " " + Lang.get("questEditorInvalidName"));
|
||||
return new InitialEventPrompt();
|
||||
} else {
|
||||
context.setSessionData(CK.Q_INITIAL_EVENT, found.getName());
|
||||
return new CreateMenuPrompt();
|
||||
}
|
||||
|
||||
} else if (input.equalsIgnoreCase("clear")) {
|
||||
} else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) {
|
||||
context.setSessionData(CK.Q_INITIAL_EVENT, null);
|
||||
player.sendMessage(YELLOW + "Initial Event cleared.");
|
||||
player.sendMessage(YELLOW + Lang.get("questEditorEventCleared"));
|
||||
return new CreateMenuPrompt();
|
||||
} else {
|
||||
return new CreateMenuPrompt();
|
||||
@ -730,7 +729,7 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
|
||||
@Override
|
||||
public String getPromptText(ConversationContext context) {
|
||||
|
||||
return ChatColor.YELLOW + "Enter amount of time (in milliseconds), or 0 to clear the redo delay, or -1 to cancel";
|
||||
return ChatColor.YELLOW + Lang.get("questEditorEnterRedoDelay");
|
||||
|
||||
}
|
||||
|
||||
@ -738,7 +737,7 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
|
||||
protected Prompt acceptValidatedInput(ConversationContext context, Number input) {
|
||||
|
||||
if (input.longValue() < -1) {
|
||||
context.getForWhom().sendRawMessage(ChatColor.RED + "Amount must be a positive number.");
|
||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("questEditorPositiveAmount"));
|
||||
} else if (input.longValue() == 0) {
|
||||
context.setSessionData(CK.Q_REDO_DELAY, null);
|
||||
} else if (input.longValue() != -1) {
|
||||
@ -758,23 +757,23 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
|
||||
String text = GREEN
|
||||
+ "1 - Yes\n"
|
||||
+ "2 - No";
|
||||
return ChatColor.YELLOW + "Finish and save \"" + AQUA + context.getSessionData(CK.Q_NAME) + YELLOW + "\"?\n" + text;
|
||||
return ChatColor.YELLOW + Lang.get("questEditorSave") + " \"" + AQUA + context.getSessionData(CK.Q_NAME) + YELLOW + "\"?\n" + text;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Prompt acceptInput(ConversationContext context, String input) {
|
||||
|
||||
if (input.equalsIgnoreCase("1") || input.equalsIgnoreCase("Yes")) {
|
||||
if (input.equalsIgnoreCase("1") || input.equalsIgnoreCase(Lang.get("yes"))) {
|
||||
|
||||
if (context.getSessionData(CK.Q_ASK_MESSAGE) == null) {
|
||||
context.getForWhom().sendRawMessage(RED + "You must set an ask message!");
|
||||
context.getForWhom().sendRawMessage(RED + Lang.get("questEditorNeedAskMessage"));
|
||||
return new CreateMenuPrompt();
|
||||
} else if (context.getSessionData(CK.Q_FINISH_MESSAGE) == null) {
|
||||
context.getForWhom().sendRawMessage(RED + "You must set a finish message!");
|
||||
context.getForWhom().sendRawMessage(RED + Lang.get("questEditorNeedFinishMessage"));
|
||||
return new CreateMenuPrompt();
|
||||
} else if (StagesPrompt.getStages(context) == 0) {
|
||||
context.getForWhom().sendRawMessage(RED + "Your Quest has no Stages!");
|
||||
context.getForWhom().sendRawMessage(RED + Lang.get("questEditorNeedStages"));
|
||||
return new CreateMenuPrompt();
|
||||
}
|
||||
|
||||
@ -797,7 +796,7 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
|
||||
ConfigurationSection newSection = questSection.createSection("custom" + customNum);
|
||||
saveQuest(context, newSection);
|
||||
data.save(new File(quests.getDataFolder(), "quests.yml"));
|
||||
context.getForWhom().sendRawMessage(BOLD + "Quest saved! (You will need to perform a Quest reload for it to appear)");
|
||||
context.getForWhom().sendRawMessage(BOLD + Lang.get("questEditorSaved"));
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
@ -805,7 +804,7 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
|
||||
|
||||
return Prompt.END_OF_CONVERSATION;
|
||||
|
||||
} else if (input.equalsIgnoreCase("2") || input.equalsIgnoreCase("No")) {
|
||||
} else if (input.equalsIgnoreCase("2") || input.equalsIgnoreCase(Lang.get("no"))) {
|
||||
return new CreateMenuPrompt();
|
||||
} else {
|
||||
return new SavePrompt();
|
||||
@ -820,21 +819,21 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
|
||||
public String getPromptText(ConversationContext context) {
|
||||
|
||||
String text = GREEN
|
||||
+ "1 - Yes\n"
|
||||
+ "2 - No";
|
||||
return ChatColor.YELLOW + "Are you sure you want to exit without saving?\n" + text;
|
||||
+ "1 - " + Lang.get("yes") + "\n"
|
||||
+ "2 - " + Lang.get("no");
|
||||
return ChatColor.YELLOW + Lang.get("questEditorExited") + "\n" + text;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Prompt acceptInput(ConversationContext context, String input) {
|
||||
|
||||
if (input.equalsIgnoreCase("1") || input.equalsIgnoreCase("Yes")) {
|
||||
if (input.equalsIgnoreCase("1") || input.equalsIgnoreCase(Lang.get("yes"))) {
|
||||
|
||||
context.getForWhom().sendRawMessage(BOLD + "" + YELLOW + "Exited.");
|
||||
context.getForWhom().sendRawMessage(BOLD + "" + YELLOW + Lang.get("exited"));
|
||||
return Prompt.END_OF_CONVERSATION;
|
||||
|
||||
} else if (input.equalsIgnoreCase("2") || input.equalsIgnoreCase("No")) {
|
||||
} else if (input.equalsIgnoreCase("2") || input.equalsIgnoreCase(Lang.get("no"))) {
|
||||
return new CreateMenuPrompt();
|
||||
} else {
|
||||
return new ExitPrompt();
|
||||
@ -1695,14 +1694,14 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
|
||||
@Override
|
||||
public String getPromptText(ConversationContext context) {
|
||||
|
||||
String text = GOLD + "- " + "Delete Quest" + " -\n";
|
||||
String text = GOLD + "- " + Lang.get("questEditorDelete") + " -\n";
|
||||
|
||||
for (Quest quest : quests.quests) {
|
||||
text += AQUA + quest.name + YELLOW + ",";
|
||||
}
|
||||
|
||||
text = text.substring(0, text.length() - 1) + "\n";
|
||||
text += YELLOW + "Enter a Quest name, or \"cancel\" to return.";
|
||||
text += YELLOW + Lang.get("questEditorEnterQuestName");
|
||||
|
||||
return text;
|
||||
|
||||
@ -1731,18 +1730,18 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
|
||||
context.setSessionData(CK.ED_QUEST_DELETE, quest.name);
|
||||
return new DeletePrompt();
|
||||
} else {
|
||||
((Player) context.getForWhom()).sendMessage(RED + "The following Quests have \"" + PURPLE + context.getSessionData(CK.ED_QUEST_DELETE) + RED + "\" as a requirement:");
|
||||
((Player) context.getForWhom()).sendMessage(RED + Lang.get("questEditorQuestAsRequirement1") + " \"" + PURPLE + context.getSessionData(CK.ED_QUEST_DELETE) + RED + "\" " + Lang.get("questEditorQuestAsRequirement2"));
|
||||
for (String s : used) {
|
||||
((Player) context.getForWhom()).sendMessage(RED + "- " + DARKRED + s);
|
||||
}
|
||||
((Player) context.getForWhom()).sendMessage(RED + "You must modify these Quests so that they do not use it before deleting it.");
|
||||
((Player) context.getForWhom()).sendMessage(RED + Lang.get("questEditorQuestAsRequirement3"));
|
||||
return new SelectDeletePrompt();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
((Player) context.getForWhom()).sendMessage(RED + "Quest not found!");
|
||||
((Player) context.getForWhom()).sendMessage(RED + Lang.get("questEditorQuestNotFound"));
|
||||
return new SelectDeletePrompt();
|
||||
|
||||
} else {
|
||||
@ -1758,8 +1757,8 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
|
||||
public String getPromptText(ConversationContext context) {
|
||||
|
||||
String text =
|
||||
RED + "Are you sure you want to delete the Quest " + " \"" + GOLD + (String) context.getSessionData(CK.ED_QUEST_DELETE) + RED + "\"?\n";
|
||||
text += YELLOW + Lang.get("yes") + "/" + Lang.get("no");
|
||||
RED + Lang.get("questEditorDeleted") + " \"" + GOLD + (String) context.getSessionData(CK.ED_QUEST_DELETE) + RED + "\"?\n";
|
||||
text += YELLOW + Lang.get("yes") + "/" + Lang.get(Lang.get("no"));
|
||||
|
||||
return text;
|
||||
|
||||
@ -1771,7 +1770,7 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
|
||||
if (input.equalsIgnoreCase(Lang.get("yes"))) {
|
||||
deleteQuest(context);
|
||||
return Prompt.END_OF_CONVERSATION;
|
||||
} else if (input.equalsIgnoreCase(Lang.get("no"))) {
|
||||
} else if (input.equalsIgnoreCase(Lang.get(Lang.get("no")))) {
|
||||
return new MenuPrompt();
|
||||
} else {
|
||||
return new DeletePrompt();
|
||||
|
@ -1,17 +1,18 @@
|
||||
package me.blackvein.quests;
|
||||
|
||||
import net.aufdemrand.denizen.objects.dPlayer;
|
||||
import net.aufdemrand.denizen.scripts.ScriptRegistry;
|
||||
import net.aufdemrand.denizen.scripts.containers.core.TaskScriptContainer;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class QuestTaskTrigger {
|
||||
|
||||
public boolean parseQuestTaskTrigger(String theScriptName, Player thePlayer) {
|
||||
public boolean parseQuestTaskTrigger(String theScriptName, Player player) {
|
||||
if (!ScriptRegistry.containsScript(theScriptName)) {
|
||||
return false;
|
||||
}
|
||||
TaskScriptContainer task_script = ScriptRegistry.getScriptContainerAs(theScriptName, TaskScriptContainer.class);
|
||||
task_script.runTaskScript(thePlayer, null, null);
|
||||
task_script.runTaskScript(dPlayer.mirrorBukkitPlayer(player), null, null);
|
||||
return true;
|
||||
}
|
||||
}
|
@ -2063,11 +2063,11 @@ public class Quester {
|
||||
return true;
|
||||
}
|
||||
|
||||
int stageIndex = data.getInt("currentStage");
|
||||
currentStageIndex = data.getInt("currentStage");
|
||||
|
||||
for (Stage s : quest.stages) {
|
||||
|
||||
if (quest.stages.indexOf(s) == (stageIndex)) {
|
||||
if (quest.stages.indexOf(s) == (currentStageIndex)) {
|
||||
stage = s;
|
||||
break;
|
||||
}
|
||||
@ -2559,7 +2559,8 @@ public class Quester {
|
||||
plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new StageTimer(plugin, this), (long) (delayTimeLeft * 0.02));
|
||||
} else {
|
||||
plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new StageTimer(plugin, this), (long) (currentStage.delay * 0.02));
|
||||
plugin.getServer().getPlayer(name).sendMessage(Quests.parseString((currentStage.delayMessage), currentQuest));
|
||||
if (currentStage.delayMessage != null)
|
||||
plugin.getServer().getPlayer(name).sendMessage(Quests.parseString((currentStage.delayMessage), currentQuest));
|
||||
}
|
||||
|
||||
delayStartTime = System.currentTimeMillis();
|
||||
|
@ -787,8 +787,6 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
+ "\n"
|
||||
+ RESET + getQuest(quester.questToTake).description + "\n";
|
||||
|
||||
cs.sendMessage(s);
|
||||
|
||||
for (String msg : s.split("<br>")) {
|
||||
cs.sendMessage(msg);
|
||||
}
|
||||
@ -1713,7 +1711,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
if (config.contains("quests." + s + ".name")) {
|
||||
quest.name = parseString(config.getString("quests." + s + ".name"), quest);
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] Quest block \'" + PURPLE + s + GOLD + "\' is missing " + RED + "name:");
|
||||
printSevere("[Quests] Quest block \'" + s + "\' is missing " + RED + "name:");
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1725,7 +1723,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
questNPCs.add(CitizensAPI.getNPCRegistry().getById(config.getInt("quests." + s + ".npc-giver-id")));
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "npc-giver-id: " + GOLD + "for Quest " + PURPLE + quest.name + GOLD + " is not a valid NPC id!");
|
||||
printSevere("[Quests] npc-giver-id: for Quest " + quest.name + " is not a valid NPC id!");
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1737,8 +1735,8 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
if (location != null) {
|
||||
quest.blockStart = location;
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "block-start: " + GOLD + "for Quest " + PURPLE + quest.name + GOLD + " is not in proper location format!");
|
||||
printSevere(GOLD + "[Quests] Proper location format is: \"WorldName x y z\"");
|
||||
printSevere("[Quests] block-start: for Quest " + quest.name + " is not in proper location format!");
|
||||
printSevere("[Quests] Proper location format is: \"WorldName x y z\"");
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1749,7 +1747,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
if (config.getInt("quests." + s + ".redo-delay", -999) != -999) {
|
||||
quest.redoDelay = config.getInt("quests." + s + ".redo-delay");
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "redo-delay: " + GOLD + "for Quest " + PURPLE + quest.name + GOLD + " is not a number!");
|
||||
printSevere("[Quests] redo-delay: for Quest " + quest.name + " is not a number!");
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1758,14 +1756,14 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
if (config.contains("quests." + s + ".finish-message")) {
|
||||
quest.finished = parseString(config.getString("quests." + s + ".finish-message"), quest);
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] Quest " + PURPLE + quest.name + GOLD + " is missing " + RED + "finish-message:");
|
||||
printSevere("[Quests] Quest " + quest.name + " is missing finish-message:");
|
||||
continue;
|
||||
}
|
||||
|
||||
if (config.contains("quests." + s + ".ask-message")) {
|
||||
quest.description = parseString(config.getString("quests." + s + ".ask-message"), quest);
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] Quest " + PURPLE + quest.name + GOLD + " is missing " + RED + "ask-message:");
|
||||
printSevere("[Quests] Quest " + quest.name + " is missing ask-message:");
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1776,7 +1774,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
if (evt != null) {
|
||||
quest.initialEvent = evt;
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "Initial Event in Quest " + PURPLE + quest.name + GOLD + " failed to load.");
|
||||
printSevere("[Quests] Initial Event in Quest " + quest.name + " failed to load.");
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1787,7 +1785,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
if (config.contains("quests." + s + ".requirements.fail-requirement-message")) {
|
||||
quest.failRequirements = parseString(config.getString("quests." + s + ".requirements.fail-requirement-message"), quest);
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + YELLOW + "Requirements " + GOLD + "for Quest " + PURPLE + quest.name + GOLD + " is missing " + RED + "fail-requirement-message:");
|
||||
printSevere("[Quests] Requirements for Quest " + quest.name + " is missing fail-requirement-message:");
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1809,12 +1807,12 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
}
|
||||
|
||||
if (failed == true) {
|
||||
printSevere(GOLD + "[Quests] " + RED + "items: " + YELLOW + "Requirement " + GOLD + "for Quest " + PURPLE + quest.name + GOLD + " is not formatted correctly!");
|
||||
printSevere("[Quests] items: Requirement for Quest " + quest.name + " is not formatted correctly!");
|
||||
continue;
|
||||
}
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "items: " + YELLOW + "Requirement " + GOLD + "for Quest " + PURPLE + quest.name + GOLD + " is not formatted correctly!");
|
||||
printSevere("[Quests] items: Requirement for Quest " + quest.name + " is not formatted correctly!");
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1825,12 +1823,12 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
quest.removeItems.clear();
|
||||
quest.removeItems.addAll(config.getBooleanList("quests." + s + ".requirements.remove-items"));
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "remove-items: " + YELLOW + "Requirement " + GOLD + "for Quest " + PURPLE + quest.name + GOLD + " is not a list of true/false values!");
|
||||
printSevere("[Quests] remove-items: Requirement for Quest " + quest.name + " is not a list of true/false values!");
|
||||
continue;
|
||||
}
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + YELLOW + "Requirements " + GOLD + "for Quest " + PURPLE + quest.name + GOLD + " is missing " + RED + "remove-items:");
|
||||
printSevere("[Quests] Requirements for Quest " + quest.name + " is missing remove-items:");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@ -1840,7 +1838,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
if (config.getInt("quests." + s + ".requirements.money", -999) != -999) {
|
||||
quest.moneyReq = config.getInt("quests." + s + ".requirements.money");
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "money: " + YELLOW + "Requirement " + GOLD + "for Quest " + PURPLE + quest.name + GOLD + " is not a number!");
|
||||
printSevere("[Quests] money: Requirement for Quest " + quest.name + " is not a number!");
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1851,7 +1849,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
if (config.getInt("quests." + s + ".requirements.quest-points", -999) != -999) {
|
||||
quest.questPointsReq = config.getInt("quests." + s + ".requirements.quest-points");
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "quest-points: " + YELLOW + "Requirement " + GOLD + "for Quest " + PURPLE + quest.name + GOLD + " is not a number!");
|
||||
printSevere("[Quests] quest-points: Requirement for Quest " + quest.name + " is not a number!");
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1888,13 +1886,13 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
}
|
||||
|
||||
if (failed) {
|
||||
printSevere(GOLD + "[Quests] " + PINK + failedQuest + GOLD + " inside " + RED + "quests: " + YELLOW + "Requirement " + GOLD + "for Quest " + PURPLE + quest.name + GOLD + " is not a valid Quest name!");
|
||||
printSevere(RED + "Make sure you are using the Quest " + DARKRED + "name: " + RED + "value, and not the block name.");
|
||||
printSevere("[Quests] " + PINK + failedQuest + " inside quests: Requirement for Quest " + quest.name + " is not a valid Quest name!");
|
||||
printSevere("Make sure you are using the Quest name: value, and not the block name.");
|
||||
continue;
|
||||
}
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "quests: " + YELLOW + "Requirement " + GOLD + "for Quest " + PURPLE + quest.name + GOLD + " is not a list of Quest names!");
|
||||
printSevere("[Quests] quests: Requirement for Quest " + quest.name + " is not a list of Quest names!");
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1931,13 +1929,13 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
}
|
||||
|
||||
if (failed) {
|
||||
printSevere(GOLD + "[Quests] " + PINK + failedQuest + GOLD + " inside " + RED + "quests: " + YELLOW + "Requirement " + GOLD + "for Quest " + PURPLE + quest.name + GOLD + " is not a valid Quest name!");
|
||||
printSevere(RED + "Make sure you are using the Quest " + DARKRED + "name: " + RED + "value, and not the block name.");
|
||||
printSevere("[Quests] " + failedQuest + " inside quests: Requirement for Quest " + quest.name + " is not a valid Quest name!");
|
||||
printSevere("Make sure you are using the Quest name: value, and not the block name.");
|
||||
continue;
|
||||
}
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "quests: " + YELLOW + "Requirement " + GOLD + "for Quest " + PURPLE + quest.name + GOLD + " is not a list of Quest names!");
|
||||
printSevere("[Quests] quests: Requirement for Quest " + quest.name + " is not a list of Quest names!");
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1950,7 +1948,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
quest.permissionReqs.clear();
|
||||
quest.permissionReqs.addAll(config.getStringList("quests." + s + ".requirements.permissions"));
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "permissions: " + YELLOW + "Requirement " + GOLD + "for Quest " + PURPLE + quest.name + GOLD + " is not a list of permissions!");
|
||||
printSevere("[Quests] permissions: Requirement for Quest " + quest.name + " is not a list of permissions!");
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1997,11 +1995,11 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
|
||||
if (config.contains("quests." + s + ".stages.ordered." + s2 + ".script-to-run")) {
|
||||
|
||||
if (ScriptRegistry.containsScript("quests." + s + ".stages.ordered." + s2 + ".script-to-run")) {
|
||||
if (ScriptRegistry.containsScript(config.getString("quests." + s + ".stages.ordered." + s2 + ".script-to-run"))) {
|
||||
trigger = new QuestTaskTrigger();
|
||||
stage.script = config.getString("quests." + s + ".stages.ordered." + s2 + ".script-to-run");
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "script-to-run: " + GOLD + "in " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a Denizen script!");
|
||||
printSevere("[Quests] script-to-run: in Stage " + s2 + " of Quest " + quest.name + " is not a Denizen script!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
@ -2015,7 +2013,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
if (checkList(config.getList("quests." + s + ".stages.ordered." + s2 + ".break-block-ids"), Integer.class)) {
|
||||
breakids = config.getIntegerList("quests." + s + ".stages.ordered." + s2 + ".break-block-ids");
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "break-block-ids: " + GOLD + "in " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a list of numbers!");
|
||||
printSevere("[Quests] break-block-ids: in Stage " + s2 + " of Quest " + quest.name + " is not a list of numbers!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
@ -2025,13 +2023,13 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
if (checkList(config.getList("quests." + s + ".stages.ordered." + s2 + ".break-block-amounts"), Integer.class)) {
|
||||
breakamounts = config.getIntegerList("quests." + s + ".stages.ordered." + s2 + ".break-block-amounts");
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "break-block-amounts: " + GOLD + "in " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a list of numbers!");
|
||||
printSevere("[Quests] break-block-amounts: in Stage " + s2 + " of Quest " + quest.name + " is not a list of numbers!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is missing " + RED + "break-block-amounts:");
|
||||
printSevere("[Quests] Stage " + s2 + " of Quest " + quest.name + " is missing break-block-amounts:");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
@ -2043,7 +2041,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
if (checkList(config.getList("quests." + s + ".stages.ordered." + s2 + ".damage-block-ids"), Integer.class)) {
|
||||
damageids = config.getIntegerList("quests." + s + ".stages.ordered." + s2 + ".damage-block-ids");
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "damage-block-ids: " + GOLD + "in " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a list of numbers!");
|
||||
printSevere("[Quests] damage-block-ids: in Stage " + s2 + " of Quest " + quest.name + " is not a list of numbers!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
@ -2053,13 +2051,13 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
if (checkList(config.getList("quests." + s + ".stages.ordered." + s2 + ".damage-block-amounts"), Integer.class)) {
|
||||
damageamounts = config.getIntegerList("quests." + s + ".stages.ordered." + s2 + ".damage-block-amounts");
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "damage-block-amounts: " + GOLD + "in " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a list of numbers!");
|
||||
printSevere("[Quests] damage-block-amounts: in Stage " + s2 + " of Quest " + quest.name + " is not a list of numbers!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is missing " + RED + "damage-block-amounts:");
|
||||
printSevere("[Quests] Stage " + s2 + " of Quest " + quest.name + " is missing damage-block-amounts:");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
@ -2071,7 +2069,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
if (Material.getMaterial(i) != null) {
|
||||
stage.blocksToDamage.put(Material.getMaterial(i), damageamounts.get(damageids.indexOf(i)));
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + i + GOLD + " inside " + GREEN + "damage-block-ids: " + GOLD + "inside " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a valid item ID!");
|
||||
printSevere("[Quests] " + i + " inside damage-block-ids: inside Stage " + s2 + " of Quest " + quest.name + " is not a valid item ID!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
@ -2083,7 +2081,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
if (checkList(config.getList("quests." + s + ".stages.ordered." + s2 + ".place-block-ids"), Integer.class)) {
|
||||
placeids = config.getIntegerList("quests." + s + ".stages.ordered." + s2 + ".place-block-ids");
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "place-block-ids: " + GOLD + "in " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a list of numbers!");
|
||||
printSevere("[Quests] place-block-ids: in Stage " + s2 + " of Quest " + quest.name + " is not a list of numbers!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
@ -2093,13 +2091,13 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
if (checkList(config.getList("quests." + s + ".stages.ordered." + s2 + ".place-block-amounts"), Integer.class)) {
|
||||
placeamounts = config.getIntegerList("quests." + s + ".stages.ordered." + s2 + ".place-block-amounts");
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "place-block-amounts: " + GOLD + "in " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a list of numbers!");
|
||||
printSevere("[Quests] place-block-amounts: in Stage " + s2 + " of Quest " + quest.name + " is not a list of numbers!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is missing " + RED + "place-block-amounts:");
|
||||
printSevere("[Quests] Stage " + s2 + " of Quest " + quest.name + " is missing place-block-amounts:");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
@ -2111,7 +2109,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
if (Material.getMaterial(i) != null) {
|
||||
stage.blocksToPlace.put(Material.getMaterial(i), placeamounts.get(placeids.indexOf(i)));
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + i + GOLD + " inside " + GREEN + "place-block-ids: " + GOLD + "inside " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a valid item ID!");
|
||||
printSevere("[Quests] " + + i + " inside place-block-ids: inside Stage " + s2 + " of Quest " + quest.name + " is not a valid item ID!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
@ -2123,7 +2121,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
if (checkList(config.getList("quests." + s + ".stages.ordered." + s2 + ".use-block-ids"), Integer.class)) {
|
||||
useids = config.getIntegerList("quests." + s + ".stages.ordered." + s2 + ".use-block-ids");
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "use-block-ids: " + GOLD + "in " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a list of numbers!");
|
||||
printSevere("[Quests] use-block-ids: in Stage " + s2 + " of Quest " + quest.name + " is not a list of numbers!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
@ -2133,13 +2131,13 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
if (checkList(config.getList("quests." + s + ".stages.ordered." + s2 + ".use-block-amounts"), Integer.class)) {
|
||||
useamounts = config.getIntegerList("quests." + s + ".stages.ordered." + s2 + ".use-block-amounts");
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "use-block-amounts: " + GOLD + "in " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a list of numbers!");
|
||||
printSevere("[Quests] use-block-amounts: in Stage " + s2 + " of Quest " + quest.name + " is not a list of numbers!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is missing " + RED + "use-block-amounts:");
|
||||
printSevere("[Quests] Stage " + s2 + " of Quest " + quest.name + " is missing use-block-amounts:");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
@ -2151,7 +2149,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
if (Material.getMaterial(i) != null) {
|
||||
stage.blocksToUse.put(Material.getMaterial(i), useamounts.get(useids.indexOf(i)));
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + i + GOLD + " inside " + GREEN + "use-block-ids: " + GOLD + "inside " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a valid item ID!");
|
||||
printSevere("[Quests] " + RED + i + " inside use-block-ids: inside Stage " + s2 + " of Quest " + quest.name + " is not a valid item ID!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
@ -2163,7 +2161,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
if (checkList(config.getList("quests." + s + ".stages.ordered." + s2 + ".cut-block-ids"), Integer.class)) {
|
||||
cutids = config.getIntegerList("quests." + s + ".stages.ordered." + s2 + ".cut-block-ids");
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "cut-block-ids: " + GOLD + "in " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a list of numbers!");
|
||||
printSevere("[Quests] cut-block-ids: in Stage " + s2 + " of Quest " + quest.name + " is not a list of numbers!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
@ -2173,13 +2171,13 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
if (checkList(config.getList("quests." + s + ".stages.ordered." + s2 + ".cut-block-amounts"), Integer.class)) {
|
||||
cutamounts = config.getIntegerList("quests." + s + ".stages.ordered." + s2 + ".cut-block-amounts");
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "cut-block-amounts: " + GOLD + "in " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a list of numbers!");
|
||||
printSevere("[Quests] cut-block-amounts: in Stage " + s2 + " of Quest " + quest.name + " is not a list of numbers!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is missing " + RED + "cut-block-amounts:");
|
||||
printSevere("[Quests] Stage " + s2 + " of Quest " + quest.name + " is missing cut-block-amounts:");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
@ -2191,7 +2189,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
if (Material.getMaterial(i) != null) {
|
||||
stage.blocksToCut.put(Material.getMaterial(i), cutamounts.get(cutids.indexOf(i)));
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + i + GOLD + " inside " + GREEN + "cut-block-ids: " + GOLD + "inside " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a valid item ID!");
|
||||
printSevere("[Quests] " + i + " inside cut-block-ids: inside Stage " + s2 + " of Quest " + quest.name + " is not a valid item ID!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
@ -2203,7 +2201,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
if (config.getInt("quests." + s + ".stages.ordered." + s2 + ".fish-to-catch", -999) != -999) {
|
||||
stage.fishToCatch = config.getInt("quests." + s + ".stages.ordered." + s2 + ".fish-to-catch");
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "fish-to-catch:" + GOLD + " inside " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a number!");
|
||||
printSevere("[Quests] fish-to-catch: inside Stage " + s2 + " of Quest " + quest.name + " is not a number!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
@ -2215,7 +2213,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
if (config.getInt("quests." + s + ".stages.ordered." + s2 + ".players-to-kill", -999) != -999) {
|
||||
stage.playersToKill = config.getInt("quests." + s + ".stages.ordered." + s2 + ".players-to-kill");
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "players-to-kill:" + GOLD + " inside " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a number!");
|
||||
printSevere("[Quests] players-to-kill: inside Stage " + s2 + " of Quest " + quest.name + " is not a number!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
@ -2236,7 +2234,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
|
||||
} else {
|
||||
|
||||
printSevere(GOLD + "[Quests] " + RED + enchant + GOLD + " inside " + GREEN + "enchantments: " + GOLD + "inside " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a valid enchantment!");
|
||||
printSevere("[Quests] " + enchant + " inside enchantments: inside Stage " + s2 + " of Quest " + quest.name + " is not a valid enchantment!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
|
||||
@ -2245,7 +2243,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
}
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "enchantments: " + GOLD + "in " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a list of enchantment names!");
|
||||
printSevere("[Quests] enchantments: in Stage " + s2 + " of Quest " + quest.name + " is not a list of enchantment names!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
@ -2259,7 +2257,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
if (Material.getMaterial(item) != null) {
|
||||
itemsToEnchant.add(Material.getMaterial(item));
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + item + GOLD + " inside " + GREEN + "enchantment-item-ids: " + GOLD + "inside " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a valid item id!");
|
||||
printSevere("[Quests] " + item + " inside enchantment-item-ids: inside Stage " + s2 + " of Quest " + quest.name + " is not a valid item id!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
@ -2268,14 +2266,14 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
|
||||
} else {
|
||||
|
||||
printSevere(GOLD + "[Quests] " + RED + "enchantment-item-ids: " + GOLD + "in " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a list of numbers!");
|
||||
printSevere("[Quests] enchantment-item-ids: in Stage " + s2 + " of Quest " + quest.name + " is not a list of numbers!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is missing " + RED + "enchantment-item-ids:");
|
||||
printSevere("[Quests] Stage " + s2 + " of Quest " + quest.name + " is missing enchantment-item-ids:");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
@ -2289,14 +2287,14 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
|
||||
} else {
|
||||
|
||||
printSevere(GOLD + "[Quests] " + RED + "enchantment-amounts: " + GOLD + "in " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a list of numbers!");
|
||||
printSevere("[Quests] enchantment-amounts: in Stage " + s2 + " of Quest " + quest.name + " is not a list of numbers!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is missing " + RED + "enchantment-amounts:");
|
||||
printSevere("[Quests] Stage " + s2 + " of Quest " + quest.name + " is missing enchantment-amounts:");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
@ -2321,7 +2319,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
questNPCs.add(CitizensAPI.getNPCRegistry().getById(i));
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + i + GOLD + " inside " + GREEN + "npc-ids-to-talk-to: " + GOLD + "inside " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a valid NPC id!");
|
||||
printSevere("[Quests] " + i + " inside npc-ids-to-talk-to: inside Stage " + s2 + " of Quest " + quest.name + " is not a valid NPC id!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
@ -2329,7 +2327,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
}
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "npc-ids-to-talk-to: " + GOLD + "in " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a list of numbers!");
|
||||
printSevere("[Quests] npc-ids-to-talk-to: in Stage " + s2 + " of Quest " + quest.name + " is not a list of numbers!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
@ -2370,13 +2368,13 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
stage.deliverMessages = deliveryMessages;
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + npcId + GOLD + " inside " + GREEN + "npc-delivery-ids: " + GOLD + "inside " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a valid NPC id!");
|
||||
printSevere("[Quests] " + npcId + " inside npc-delivery-ids: inside Stage " + s2 + " of Quest " + quest.name + " is not a valid NPC id!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + item + GOLD + " inside " + GREEN + "items-to-deliver: " + GOLD + "inside " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not formatted properly!");
|
||||
printSevere("[Quests] " + item + " inside items-to-deliver: inside Stage " + s2 + " of Quest " + quest.name + " is not formatted properly!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
@ -2384,25 +2382,25 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
}
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is missing " + RED + "delivery-messages:");
|
||||
printSevere("[Quests] Stage " + s2 + " of Quest " + quest.name + " is missing delivery-messages:");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "npc-delivery-ids: " + GOLD + "in " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a list of NPC ids!");
|
||||
printSevere("[Quests] npc-delivery-ids: in Stage " + s2 + " of Quest " + PURPLE + quest.name + " is not a list of NPC ids!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is missing " + RED + "npc-delivery-ids:");
|
||||
printSevere("[Quests] Stage " + s2 + " of Quest " + quest.name + " is missing npc-delivery-ids:");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "items-to-deliver: " + GOLD + "in " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not formatted properly!");
|
||||
printSevere("[Quests] items-to-deliver: in Stage " + s2 + " of Quest " + quest.name + " is not formatted properly!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
@ -2431,13 +2429,13 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
stage.citizenNumToKill.add(npcAmounts.get(npcIds.indexOf(i)));
|
||||
questNPCs.add(CitizensAPI.getNPCRegistry().getById(i));
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + npcAmounts.get(npcIds.indexOf(i)) + GOLD + " inside " + GREEN + "npc-kill-amounts: " + GOLD + "inside " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a positive number!");
|
||||
printSevere("[Quests] " + npcAmounts.get(npcIds.indexOf(i)) + " inside npc-kill-amounts: inside Stage " + s2 + " of Quest " + quest.name + " is not a positive number!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + i + GOLD + " inside " + GREEN + "npc-ids-to-kill: " + GOLD + "inside " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a valid NPC id!");
|
||||
printSevere("[Quests] " + i + " inside npc-ids-to-kill: inside Stage " + s2 + " of Quest " + quest.name + " is not a valid NPC id!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
@ -2445,19 +2443,19 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
}
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "npc-kill-amounts: " + GOLD + "in " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a list of numbers!");
|
||||
printSevere("[Quests] npc-kill-amounts: in Stage " + s2 + " of Quest " + quest.name + " is not a list of numbers!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is missing " + RED + "npc-kill-amounts:");
|
||||
printSevere("[Quests] Stage " + s2 + " of Quest " + quest.name + " is missing npc-kill-amounts:");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "npc-ids-to-kill: " + GOLD + "in " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a list of numbers!");
|
||||
printSevere("[Quests] npc-ids-to-kill: in Stage " + s2 + " of Quest " + quest.name + " is not a list of numbers!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
@ -2485,13 +2483,13 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
stage.bossesToKill.add(boss);
|
||||
stage.bossAmountsToKill.add(bossKillAmounts.get(bossIdsToKill.indexOf(boss)));
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + bossKillAmounts.get(bossIdsToKill.indexOf(boss)) + GOLD + " inside " + GREEN + "boss-amounts-to-kill: " + GOLD + "inside " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a positive number!");
|
||||
printSevere("[Quests] " + bossKillAmounts.get(bossIdsToKill.indexOf(boss)) + GOLD + " inside boss-amounts-to-kill: inside Stage " + s2 + " of Quest " + quest.name + " is not a positive number!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + boss + GOLD + " inside " + GREEN + "boss-ids-to-kill: " + GOLD + "inside " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a valid EpicBoss name!");
|
||||
printSevere("[Quests] " + boss + " inside boss-ids-to-kill: inside Stage " + s2 + " of Quest " + quest.name + " is not a valid EpicBoss name!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
@ -2499,19 +2497,19 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
}
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "boss-amounts-to-kill: " + GOLD + "in " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a list of numbers!");
|
||||
printSevere("[Quests] boss-amounts-to-kill: in Stage " + s2 + " of Quest " + quest.name + " is not a list of numbers!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is missing " + RED + "boss-amounts-to-kill:");
|
||||
printSevere("[Quests] Stage " + s2 + " of Quest " + quest.name + " is missing boss-amounts-to-kill:");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "boss-ids-to-kill: " + GOLD + "in " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a list of IDs!");
|
||||
printSevere("[Quests] boss-ids-to-kill: in Stage " + s2 + " of Quest " + quest.name + " is not a list of IDs!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
@ -2529,11 +2527,11 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
|
||||
if (type != null) {
|
||||
|
||||
mobsToKill.add(EntityType.ZOMBIE);
|
||||
mobsToKill.add(type);
|
||||
|
||||
} else {
|
||||
|
||||
printSevere(GOLD + "[Quests] " + RED + mob + GOLD + " inside " + GREEN + "mobs-to-kill: " + GOLD + "inside " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a valid mob name!");
|
||||
printSevere("[Quests] "+ mob + " inside mobs-to-kill: inside Stage " + s2 + " of Quest " + quest.name + " is not a valid mob name!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
|
||||
@ -2542,7 +2540,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
}
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "mobs-to-kill: " + GOLD + "in " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a list of mob names!");
|
||||
printSevere("[Quests] mobs-to-kill: in Stage " + s2 + " of Quest " + quest.name + " is not a list of mob names!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
@ -2559,14 +2557,14 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
|
||||
} else {
|
||||
|
||||
printSevere(GOLD + "[Quests] " + RED + "mob-amounts: " + GOLD + "in " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a list of numbers!");
|
||||
printSevere("[Quests] mob-amounts: in Stage " + s2 + " of Quest " + quest.name + " is not a list of numbers!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is missing " + RED + "mob-amounts:");
|
||||
printSevere("[Quests] Stage " + s2 + " of Quest " + PURPLE + quest.name + " is missing mob-amounts:");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
@ -2591,8 +2589,8 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
y = Double.parseDouble(info[2]);
|
||||
z = Double.parseDouble(info[3]);
|
||||
} catch (Exception e) {
|
||||
printSevere(GOLD + "[Quests] " + RED + loc + GOLD + " inside " + GREEN + "mobs-to-kill: " + GOLD + "inside " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not in proper location format!");
|
||||
printSevere(GOLD + "[Quests] Proper location format is: \"WorldName x y z\"");
|
||||
printSevere("[Quests] " + loc + " inside mobs-to-kill: inside Stage " + s2 + " of Quest " + quest.name + " is not in proper location format!");
|
||||
printSevere("[Quests] Proper location format is: \"WorldName x y z\"");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
@ -2601,14 +2599,14 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
Location finalLocation = new Location(getServer().getWorld(info[0]), x, y, z);
|
||||
locationsToKillWithin.add(finalLocation);
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + info[0] + GOLD + " inside " + GREEN + "mobs-to-kill: " + GOLD + "inside " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a valid world name!");
|
||||
printSevere("[Quests] " + info[0] + " inside mobs-to-kill: inside Stage " + s2 + " of Quest " + quest.name + " is not a valid world name!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + loc + GOLD + " inside " + GREEN + "mobs-to-kill: " + GOLD + "inside " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not in proper location format!");
|
||||
printSevere(GOLD + "[Quests] Proper location format is: \"WorldName x y z\"");
|
||||
printSevere("[Quests] " + loc + " inside mobs-to-kill: inside Stage " + s2 + " of Quest " + quest.name + " is not in proper location format!");
|
||||
printSevere("[Quests] Proper location format is: \"WorldName x y z\"");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
@ -2616,7 +2614,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
}
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "locations-to-kill: " + GOLD + "in " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a list of locations!");
|
||||
printSevere("[Quests] locations-to-kill: in Stage " + s2 + " of Quest " + quest.name + " is not a list of locations!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
@ -2633,13 +2631,13 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
}
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "kill-location-radii: " + GOLD + "in " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a list of numbers!");
|
||||
printSevere("[Quests] kill-location-radii: in Stage " + s2 + " of Quest " + quest.name + " is not a list of numbers!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is missing " + RED + "kill-location-radii:");
|
||||
printSevere("[Quests] Stage " + s2 + " of Quest " + quest.name + " is missing kill-location-radii:");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
@ -2656,13 +2654,13 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
}
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "kill-location-names: " + GOLD + "in " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a list of names!");
|
||||
printSevere("[Quests] kill-location-names: in Stage " + s2 + " of Quest " + quest.name + " is not a list of names!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is missing " + RED + "kill-location-names:");
|
||||
printSevere("[Quests] Stage " + s2 + " of Quest " + quest.name + " is missing kill-location-names:");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
@ -2720,8 +2718,8 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
y = Double.parseDouble(info[2]);
|
||||
z = Double.parseDouble(info[3]);
|
||||
} catch (Exception e) {
|
||||
printSevere(GOLD + "[Quests] " + RED + loc + GOLD + " inside " + GREEN + "locations-to-reach: " + GOLD + "inside " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not in proper location format!");
|
||||
printSevere(GOLD + "[Quests] Proper location format is: \"WorldName x y z\"");
|
||||
printSevere("[Quests] " + loc + " inside locations-to-reach: inside Stage " + s2 + " of Quest " + quest.name + " is not in proper location format!");
|
||||
printSevere("[Quests] Proper location format is: \"WorldName x y z\"");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
@ -2730,14 +2728,14 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
Location finalLocation = new Location(getServer().getWorld(info[0]), x, y, z);
|
||||
stage.locationsToReach.add(finalLocation);
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + info[0] + GOLD + " inside " + GREEN + "locations-to-reach: " + GOLD + "inside " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a valid world name!");
|
||||
printSevere("[Quests] " + info[0] + " inside locations-to-reach: inside Stage " + s2 + " of Quest " + quest.name + " is not a valid world name!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + loc + GOLD + " inside " + GREEN + "mobs-to-kill: " + GOLD + "inside " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not in proper location format!");
|
||||
printSevere(GOLD + "[Quests] Proper location format is: \"WorldName x y z\"");
|
||||
printSevere("[Quests] " + loc + " inside mobs-to-kill: inside Stage " + s2 + " of Quest " + quest.name + " is not in proper location format!");
|
||||
printSevere("[Quests] Proper location format is: \"WorldName x y z\"");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
@ -2745,7 +2743,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
}
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "locations-to-reach: " + GOLD + "in " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a list of locations!");
|
||||
printSevere("[Quests] locations-to-reach: in Stage " + s2 + " of Quest " + quest.name + " is not a list of locations!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
@ -2762,13 +2760,13 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
}
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "reach-location-radii: " + GOLD + "in " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a list of numbers!");
|
||||
printSevere("[Quests] reach-location-radii: in Stage " + s2 + " of Quest " + quest.name + " is not a list of numbers!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is missing " + RED + "reach-location-radii:");
|
||||
printSevere("[Quests] Stage " + s2 + " of Quest " + quest.name + " is missing reach-location-radii:");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
@ -2785,13 +2783,13 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
}
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "reach-location-names: " + GOLD + "in " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a list of names!");
|
||||
printSevere("[Quests] reach-location-names: in Stage " + s2 + " of Quest " + quest.name + " is not a list of names!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is missing " + RED + "reach-location-names:");
|
||||
printSevere("[Quests] Stage " + s2 + " of Quest " + quest.name + " is missing reach-location-names:");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
@ -2820,7 +2818,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
stage.mobsToTame.put(EntityType.OCELOT, mobAmounts.get(mobs.indexOf(mob)));
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + mob + GOLD + " inside " + GREEN + "mobs-to-tame: " + GOLD + "inside " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a valid tameable mob!");
|
||||
printSevere("[Quests] " + mob + " inside mobs-to-tame: inside Stage " + s2 + " of Quest " + quest.name + " is not a valid tameable mob!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
@ -2828,19 +2826,19 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
}
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "mob-tame-amounts: " + GOLD + "in " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a list of numbers!");
|
||||
printSevere("[Quests] mob-tame-amounts: in Stage " + s2 + " of Quest " + quest.name + " is not a list of numbers!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is missing " + RED + "mob-tame-amounts:");
|
||||
printSevere("[Quests] Stage " + s2 + " of Quest " + quest.name + " is missing mob-tame-amounts:");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "mobs-to-tame: " + GOLD + "in " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a list of mob names!");
|
||||
printSevere("[Quests] mobs-to-tame: in Stage " + s2 + " of Quest " + quest.name + " is not a list of mob names!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
@ -2926,7 +2924,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
|
||||
} else {
|
||||
|
||||
printSevere(GOLD + "[Quests] " + RED + color + GOLD + " inside " + GREEN + "sheep-to-shear: " + GOLD + "inside " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a valid color!");
|
||||
printSevere("[Quests] " + color + " inside sheep-to-shear: inside Stage " + s2 + " of Quest " + quest.name + " is not a valid color!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
|
||||
@ -2935,19 +2933,19 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
}
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "sheep-amounts: " + GOLD + "in " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a list of numbers!");
|
||||
printSevere("[Quests] sheep-amounts: in Stage " + s2 + " of Quest " + quest.name + " is not a list of numbers!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is missing " + RED + "sheep-amounts:");
|
||||
printSevere("[Quests] Stage " + s2 + " of Quest " + quest.name + " is missing sheep-amounts:");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "sheep-to-shear: " + GOLD + "in " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a list of colors!");
|
||||
printSevere("[Quests] sheep-to-shear: in Stage " + s2 + " of Quest " + quest.name + " is not a list of colors!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
@ -2961,7 +2959,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
if (evt != null) {
|
||||
stage.event = evt;
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "Event " + GOLD + "in " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " failed to load.");
|
||||
printSevere("[Quests] Event in Stage " + s2 + " of Quest " + quest.name + " failed to load.");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
@ -2973,7 +2971,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
if (config.getLong("quests." + s + ".stages.ordered." + s2 + ".delay", -999) != -999) {
|
||||
stage.delay = config.getLong("quests." + s + ".stages.ordered." + s2 + ".delay");
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "delay: " + GOLD + "in " + PINK + "Stage " + s2 + GOLD + " of Quest " + PURPLE + quest.name + GOLD + " is not a number!");
|
||||
printSevere("[Quests] delay: in Stage " + s2 + " of Quest " + quest.name + " is not a number!");
|
||||
stageFailed = true;
|
||||
break;
|
||||
}
|
||||
@ -3026,7 +3024,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
quest.itemRewards.add(stack);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
printSevere(GOLD + "[Quests] " + RED + item + GOLD + " in " + GREEN + "items: " + AQUA + "Reward " + GOLD + "in Quest " + PURPLE + quest.name + GOLD + " is not properly formatted!");
|
||||
printSevere("[Quests] " + item + " in items: Reward in Quest " + quest.name + " is not properly formatted!");
|
||||
failed = true;
|
||||
break;
|
||||
}
|
||||
@ -3038,7 +3036,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
}
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "items: " + AQUA + "Reward " + GOLD + "in Quest " + PURPLE + quest.name + GOLD + " is not a list of strings!");
|
||||
printSevere("[Quests] items: Reward in Quest " + quest.name + " is not a list of strings!");
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -3049,7 +3047,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
if (config.getInt("quests." + s + ".rewards.money", -999) != -999) {
|
||||
quest.moneyReward = config.getInt("quests." + s + ".rewards.money");
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "money: " + AQUA + "Reward " + GOLD + "in Quest " + PURPLE + quest.name + GOLD + " is not a number!");
|
||||
printSevere("[Quests] money: Reward in Quest " + quest.name + " is not a number!");
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -3060,7 +3058,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
if (config.getInt("quests." + s + ".rewards.exp", -999) != -999) {
|
||||
quest.exp = config.getInt("quests." + s + ".rewards.exp");
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "exp: " + AQUA + "Reward " + GOLD + "in Quest " + PURPLE + quest.name + GOLD + " is not a number!");
|
||||
printSevere("[Quests] exp: Reward in Quest " + quest.name + " is not a number!");
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -3072,7 +3070,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
quest.commands.clear();
|
||||
quest.commands.addAll(config.getStringList("quests." + s + ".rewards.commands"));
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "commands: " + AQUA + "Reward " + GOLD + "in Quest " + PURPLE + quest.name + GOLD + " is not a list of commands!");
|
||||
printSevere("[Quests] commands: Reward in Quest " + quest.name + " is not a list of commands!");
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -3084,7 +3082,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
quest.permissions.clear();
|
||||
quest.permissions.addAll(config.getStringList("quests." + s + ".rewards.permissions"));
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "permissions: " + AQUA + "Reward " + GOLD + "in Quest " + PURPLE + quest.name + GOLD + " is not a list of permissions!");
|
||||
printSevere("[Quests] permissions: Reward in Quest " + quest.name + " is not a list of permissions!");
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -3096,7 +3094,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
quest.questPoints = config.getInt("quests." + s + ".rewards.quest-points");
|
||||
totalQuestPoints += quest.questPoints;
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "quest-points: " + AQUA + "Reward " + GOLD + "in Quest " + PURPLE + quest.name + GOLD + " is not a number!");
|
||||
printSevere("[Quests] quest-points: Reward in Quest " + quest.name + " is not a number!");
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -3112,7 +3110,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
for (String skill : config.getStringList("quests." + s + ".rewards.mcmmo-skills")) {
|
||||
|
||||
if (Quests.getMcMMOSkill(skill) == null) {
|
||||
printSevere(GOLD + "[Quests] " + RED + skill + GOLD + " in " + GREEN + "mcmmo-skills: " + AQUA + "Reward " + GOLD + "in Quest " + PURPLE + quest.name + GOLD + " is not a valid mcMMO skill name!");
|
||||
printSevere("[Quests] " + skill + " in mcmmo-skills: Reward in Quest " + quest.name + " is not a valid mcMMO skill name!");
|
||||
failed = true;
|
||||
break;
|
||||
}
|
||||
@ -3129,12 +3127,12 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
quest.mcmmoAmounts.addAll(config.getIntegerList("quests." + s + ".rewards.mcmmo-levels"));
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + AQUA + "Rewards " + GOLD + "for Quest " + PURPLE + quest.name + GOLD + " is missing " + RED + "mcmmo-levels:");
|
||||
printSevere("[Quests] Rewards for Quest " + quest.name + " is missing mcmmo-levels:");
|
||||
continue;
|
||||
}
|
||||
|
||||
} else {
|
||||
printSevere(GOLD + "[Quests] " + RED + "mcmmo-skills: " + AQUA + "Reward " + GOLD + "in Quest " + PURPLE + quest.name + GOLD + " is not a list of mcMMO skill names!");
|
||||
printSevere("[Quests] mcmmo-skills: Reward in Quest " + quest.name + " is not a list of mcMMO skill names!");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@ -3558,9 +3556,12 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTimeInMillis(milliseconds);
|
||||
|
||||
Calendar epoch = Calendar.getInstance();
|
||||
epoch.setTimeInMillis(0);
|
||||
|
||||
long days = calendar.get(Calendar.DAY_OF_YEAR) - 1;
|
||||
long hours = calendar.get(Calendar.HOUR_OF_DAY) - 1;
|
||||
long days = calendar.get(Calendar.DAY_OF_YEAR) - epoch.get(Calendar.DAY_OF_YEAR);
|
||||
long hours = calendar.get(Calendar.HOUR_OF_DAY) - epoch.get(Calendar.HOUR_OF_DAY);
|
||||
long minutes = calendar.get(Calendar.MINUTE);
|
||||
long seconds = calendar.get(Calendar.SECOND);
|
||||
long milliSeconds2 = calendar.get(Calendar.MILLISECOND);
|
||||
@ -4231,9 +4232,9 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
Statement statement = conn.createStatement();
|
||||
java.sql.Date date = new java.sql.Date(System.currentTimeMillis());
|
||||
Timestamp stamp = new Timestamp(date.getTime());
|
||||
statement.executeUpdate("DELETE FROM entries " + "WHERE server='" + getServer().getIp() + ":" + ((Integer) getServer().getPort()).toString() + "'");
|
||||
statement.executeUpdate("DELETE FROM entries WHERE server='" + getServer().getIp() + ":" + ((Integer) getServer().getPort()).toString() + "'");
|
||||
String cit = citizens != null ? "true" : "false";
|
||||
statement.executeUpdate("INSERT INTO entries " + "VALUES ('" + getServer().getIp() + ":" + ((Integer) getServer().getPort()).toString() + "', " + quests.size() + ", '" + cit + "', '" + stamp.toString() + "')");
|
||||
statement.executeUpdate("INSERT INTO entries VALUES ('" + getServer().getIp() + ":" + ((Integer) getServer().getPort()).toString() + "', " + quests.size() + ", '" + cit + "', '" + stamp.toString() + "')");
|
||||
} catch (Exception e) {
|
||||
}
|
||||
|
||||
|
@ -49,12 +49,12 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
|
||||
context.setSessionData(pref, Boolean.TRUE);
|
||||
|
||||
String text = PINK + "- " + AQUA + (String) context.getSessionData(CK.Q_NAME) + PINK + " | Stage " + PURPLE + stageNum + PINK + " -\n";
|
||||
String text = PINK + "- " + AQUA + (String) context.getSessionData(CK.Q_NAME) + PINK + " | " + Lang.get("stageEditorStage") + " " + PURPLE + stageNum + PINK + " -\n";
|
||||
|
||||
if (context.getSessionData(pref + CK.S_BREAK_IDS) == null) {
|
||||
text += PINK + "" + BOLD + "1 " + RESET + PURPLE + "- Break Blocks " + GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||
text += PINK + "" + BOLD + "1 " + RESET + PURPLE + "- " + Lang.get("stageEditorBreakBlocks") + GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||
} else {
|
||||
text += PINK + "" + BOLD + "1 " + RESET + PURPLE + "- Break Blocks\n";
|
||||
text += PINK + "" + BOLD + "1 " + RESET + PURPLE + "- " + Lang.get("stageEditorBreakBlocks") + "\n";
|
||||
|
||||
LinkedList<Integer> ids = (LinkedList<Integer>) context.getSessionData(pref + CK.S_BREAK_IDS);
|
||||
LinkedList<Integer> amnts = (LinkedList<Integer>) context.getSessionData(pref + CK.S_BREAK_AMOUNTS);
|
||||
@ -67,9 +67,9 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
|
||||
|
||||
if (context.getSessionData(pref + CK.S_DAMAGE_IDS) == null) {
|
||||
text += PINK + "" + BOLD + "2 " + RESET + PURPLE + "- Damage Blocks " + GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||
text += PINK + "" + BOLD + "2 " + RESET + PURPLE + "- " + Lang.get("stageEditorDamageBlocks") + GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||
} else {
|
||||
text += PINK + "" + BOLD + "2 " + RESET + PURPLE + "- Damage Blocks\n";
|
||||
text += PINK + "" + BOLD + "2 " + RESET + PURPLE + "- " + Lang.get("stageEditorDamageBlocks") + "\n";
|
||||
|
||||
LinkedList<Integer> ids = (LinkedList<Integer>) context.getSessionData(pref + CK.S_DAMAGE_IDS);
|
||||
LinkedList<Integer> amnts = (LinkedList<Integer>) context.getSessionData(pref + CK.S_DAMAGE_AMOUNTS);
|
||||
@ -82,9 +82,9 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
|
||||
|
||||
if (context.getSessionData(pref + CK.S_PLACE_IDS) == null) {
|
||||
text += PINK + "" + BOLD + "3 " + RESET + PURPLE + "- Place Blocks " + GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||
text += PINK + "" + BOLD + "3 " + RESET + PURPLE + "- " + Lang.get("stageEditorPlaceBlocks") + GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||
} else {
|
||||
text += PINK + "" + BOLD + "3 " + RESET + PURPLE + "- Place Blocks\n";
|
||||
text += PINK + "" + BOLD + "3 " + RESET + PURPLE + "- " + Lang.get("stageEditorPlaceBlocks") + "\n";
|
||||
|
||||
LinkedList<Integer> ids = (LinkedList<Integer>) context.getSessionData(pref + CK.S_PLACE_IDS);
|
||||
LinkedList<Integer> amnts = (LinkedList<Integer>) context.getSessionData(pref + CK.S_PLACE_AMOUNTS);
|
||||
@ -97,9 +97,9 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
|
||||
|
||||
if (context.getSessionData(pref + CK.S_USE_IDS) == null) {
|
||||
text += PINK + "" + BOLD + "4 " + RESET + PURPLE + "- Use Blocks " + GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||
text += PINK + "" + BOLD + "4 " + RESET + PURPLE + "- " + Lang.get("stageEditorPlaceBlocks") + GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||
} else {
|
||||
text += PINK + "" + BOLD + "4 " + RESET + PURPLE + "- Use Blocks\n";
|
||||
text += PINK + "" + BOLD + "4 " + RESET + PURPLE + "- " + Lang.get("stageEditorPlaceBlocks") + "\n";
|
||||
|
||||
LinkedList<Integer> ids = (LinkedList<Integer>) context.getSessionData(pref + CK.S_USE_IDS);
|
||||
LinkedList<Integer> amnts = (LinkedList<Integer>) context.getSessionData(pref + CK.S_USE_AMOUNTS);
|
||||
@ -112,9 +112,9 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
|
||||
|
||||
if (context.getSessionData(pref + CK.S_CUT_IDS) == null) {
|
||||
text += PINK + "" + BOLD + "5 " + RESET + PURPLE + "- Cut Blocks " + GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||
text += PINK + "" + BOLD + "5 " + RESET + PURPLE + "- " + Lang.get("stageEditorCutBlocks") + GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||
} else {
|
||||
text += PINK + "" + BOLD + "5 " + RESET + PURPLE + "- Cut Blocks\n";
|
||||
text += PINK + "" + BOLD + "5 " + RESET + PURPLE + "- " + Lang.get("stageEditorCutBlocks") + "\n";
|
||||
|
||||
LinkedList<Integer> ids = (LinkedList<Integer>) context.getSessionData(pref + CK.S_CUT_IDS);
|
||||
LinkedList<Integer> amnts = (LinkedList<Integer>) context.getSessionData(pref + CK.S_CUT_AMOUNTS);
|
||||
@ -126,23 +126,23 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
}
|
||||
|
||||
if (context.getSessionData(pref + CK.S_FISH) == null) {
|
||||
text += PINK + "" + BOLD + "6 " + RESET + PURPLE + "- Catch Fish " + GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||
text += PINK + "" + BOLD + "6 " + RESET + PURPLE + "- " + Lang.get("stageEditorCatchFish") + GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||
} else {
|
||||
Integer fish = (Integer) context.getSessionData(pref + CK.S_FISH);
|
||||
text += PINK + "" + BOLD + "6 " + RESET + PURPLE + "- Catch Fish " + GRAY + "(" + AQUA + fish + " fish" + GRAY + ")\n";
|
||||
text += PINK + "" + BOLD + "6 " + RESET + PURPLE + "- " + Lang.get("stageEditorCatchFish") + " " + GRAY + "(" + AQUA + fish + " " + Lang.get("stageEditorFish") + GRAY + ")\n";
|
||||
}
|
||||
|
||||
if (context.getSessionData(pref + CK.S_PLAYER_KILL) == null) {
|
||||
text += PINK + "" + BOLD + "7 " + RESET + PURPLE + "- Kill Players " + GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||
text += PINK + "" + BOLD + "7 " + RESET + PURPLE + "- " + Lang.get("stageEditorKillPlayers") + GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||
} else {
|
||||
Integer fish = (Integer) context.getSessionData(pref + CK.S_PLAYER_KILL);
|
||||
text += PINK + "" + BOLD + "7 " + RESET + PURPLE + "- Kill Players " + GRAY + "(" + AQUA + fish + " players" + GRAY + ")\n";
|
||||
Integer players = (Integer) context.getSessionData(pref + CK.S_PLAYER_KILL);
|
||||
text += PINK + "" + BOLD + "7 " + RESET + PURPLE + "- " + Lang.get("stageEditorKillPlayers") + GRAY + " (" + AQUA + players + " " + Lang.get("stageEditorPlayers") + GRAY + ")\n";
|
||||
}
|
||||
|
||||
if (context.getSessionData(pref + CK.S_ENCHANT_TYPES) == null) {
|
||||
text += PINK + "" + BOLD + "8 " + RESET + PURPLE + "- Enchant Items " + GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||
text += PINK + "" + BOLD + "8 " + RESET + PURPLE + "- " + Lang.get("stageEditorEnchantItems") + GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||
} else {
|
||||
text += PINK + "" + BOLD + "8 " + RESET + PURPLE + "- Enchant Items\n";
|
||||
text += PINK + "" + BOLD + "8 " + RESET + PURPLE + "- " + Lang.get("stageEditorEnchantItems") + "\n";
|
||||
|
||||
LinkedList<String> enchants = (LinkedList<String>) context.getSessionData(pref + CK.S_ENCHANT_TYPES);
|
||||
LinkedList<Integer> items = (LinkedList<Integer>) context.getSessionData(pref + CK.S_ENCHANT_IDS);
|
||||
@ -157,9 +157,9 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
if (questFactory.quests.citizens != null) {
|
||||
|
||||
if (context.getSessionData(pref + CK.S_DELIVERY_ITEMS) == null) {
|
||||
text += PINK + "" + BOLD + "9 " + RESET + PURPLE + "- Deliver Items " + GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||
text += PINK + "" + BOLD + "9 " + RESET + PURPLE + "- " + Lang.get("stageEditorDeliverItems") + GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||
} else {
|
||||
text += PINK + "" + BOLD + "9 " + RESET + PURPLE + "- Deliver Items\n";
|
||||
text += PINK + "" + BOLD + "9 " + RESET + PURPLE + "- " + Lang.get("stageEditorDeliverItems") + "\n";
|
||||
|
||||
LinkedList<Integer> npcs = (LinkedList<Integer>) context.getSessionData(pref + CK.S_DELIVERY_NPCS);
|
||||
LinkedList<ItemStack> items = (LinkedList<ItemStack>) context.getSessionData(pref + CK.S_DELIVERY_ITEMS);
|
||||
@ -171,15 +171,15 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
}
|
||||
|
||||
} else {
|
||||
text += GRAY + "" + BOLD + "9 " + RESET + GRAY + "- Deliver Items " + GRAY + "(Citizens not installed)\n";
|
||||
text += GRAY + "" + BOLD + "9 " + RESET + GRAY + "- " + Lang.get("stageEditorDeliverItems") + GRAY + " (Citizens not installed)\n";
|
||||
}
|
||||
|
||||
if (questFactory.quests.citizens != null) {
|
||||
|
||||
if (context.getSessionData(pref + CK.S_NPCS_TO_TALK_TO) == null) {
|
||||
text += PINK + "" + BOLD + "10 " + RESET + PURPLE + "- Talk to NPCs " + GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||
text += PINK + "" + BOLD + "10 " + RESET + PURPLE + "- " + Lang.get("stageEditorTalkToNPCs") + GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||
} else {
|
||||
text += PINK + "" + BOLD + "10 " + RESET + PURPLE + "- Talk to NPCs\n";
|
||||
text += PINK + "" + BOLD + "10 " + RESET + PURPLE + "- " + Lang.get("stageEditorTalkToNPCs") + "\n";
|
||||
|
||||
LinkedList<Integer> npcs = (LinkedList<Integer>) context.getSessionData(pref + CK.S_NPCS_TO_TALK_TO);
|
||||
|
||||
@ -190,15 +190,15 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
}
|
||||
|
||||
} else {
|
||||
text += GRAY + "" + BOLD + "10 " + RESET + GRAY + "- Talk to NPCs " + GRAY + "(Citizens not installed)\n";
|
||||
text += GRAY + "" + BOLD + "10 " + RESET + GRAY + "- " + Lang.get("stageEditorTalkToNPCs") + GRAY + " (Citizens not installed)\n";
|
||||
}
|
||||
|
||||
if (questFactory.quests.citizens != null) {
|
||||
|
||||
if (context.getSessionData(pref + CK.S_NPCS_TO_KILL) == null) {
|
||||
text += PINK + "" + BOLD + "11 " + RESET + PURPLE + "- Kill NPCs " + GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||
text += PINK + "" + BOLD + "11 " + RESET + PURPLE + "- " + Lang.get("stageEditorKillNPCs") + GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||
} else {
|
||||
text += PINK + "" + BOLD + "11 " + RESET + PURPLE + "- Kill NPCs\n";
|
||||
text += PINK + "" + BOLD + "11 " + RESET + PURPLE + "- " + Lang.get("stageEditorKillNPCs") + "\n";
|
||||
|
||||
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);
|
||||
@ -210,15 +210,15 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
}
|
||||
|
||||
} else {
|
||||
text += GRAY + "" + BOLD + "11 " + RESET + GRAY + "- Kill NPCs " + GRAY + "(Citizens not installed)\n";
|
||||
text += GRAY + "" + BOLD + "11 " + RESET + GRAY + "- " + Lang.get("stageEditorKillNPCs") + GRAY + " (Citizens not installed)\n";
|
||||
}
|
||||
|
||||
if(Quests.epicBoss != null){
|
||||
|
||||
if (context.getSessionData(pref + CK.S_BOSS_IDS) == null) {
|
||||
text += PINK + "" + BOLD + "12 " + RESET + PURPLE + "- Kill Bosses " + GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||
text += PINK + "" + BOLD + "12 " + RESET + PURPLE + "- " + Lang.get("stageEditorKillBosses") + GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||
} else {
|
||||
text += PINK + "" + BOLD + "12 " + RESET + PURPLE + "- Kill Bosses\n";
|
||||
text += PINK + "" + BOLD + "12 " + RESET + PURPLE + "- " + Lang.get("stageEditorKillBosses") + "\n";
|
||||
|
||||
LinkedList<String> bosses = (LinkedList<String>) context.getSessionData(pref + CK.S_BOSS_IDS);
|
||||
LinkedList<Integer> amnts = (LinkedList<Integer>) context.getSessionData(pref + CK.S_BOSS_AMOUNTS);
|
||||
@ -230,13 +230,13 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
}
|
||||
|
||||
}else{
|
||||
text += GRAY + "" + BOLD + "12 " + RESET + GRAY + "- Kill Bosses " + GRAY + "(EpicBoss not installed)\n";
|
||||
text += GRAY + "" + BOLD + "12 " + RESET + GRAY + "- " + Lang.get("stageEditorKillBosses") + GRAY + " (EpicBoss not installed)\n";
|
||||
}
|
||||
|
||||
if (context.getSessionData(pref + CK.S_MOB_TYPES) == null) {
|
||||
text += PINK + "" + BOLD + "13 " + RESET + PURPLE + "- Kill Mobs " + GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||
text += PINK + "" + BOLD + "13 " + RESET + PURPLE + "- " + Lang.get("stageEditorKillMobs") + GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||
} else {
|
||||
text += PINK + "" + BOLD + "13 " + RESET + PURPLE + "- Kill Mobs\n";
|
||||
text += PINK + "" + BOLD + "13 " + RESET + PURPLE + "- " + Lang.get("stageEditorKillMobs") + "\n";
|
||||
|
||||
LinkedList<String> mobs = (LinkedList<String>) context.getSessionData(pref + CK.S_MOB_TYPES);
|
||||
LinkedList<Integer> amnts = (LinkedList<Integer>) context.getSessionData(pref + CK.S_MOB_AMOUNTS);
|
||||
@ -262,16 +262,16 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
}
|
||||
|
||||
if (context.getSessionData(pref + CK.S_REACH_LOCATIONS) == null) {
|
||||
text += PINK + "" + BOLD + "14 " + RESET + PURPLE + "- Reach Locations " + GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||
text += PINK + "" + BOLD + "14 " + RESET + PURPLE + "- " + Lang.get("stageEditorReachLocs") + GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||
} else {
|
||||
text += PINK + "" + BOLD + "14 " + RESET + PURPLE + "- Reach Locations\n";
|
||||
text += PINK + "" + BOLD + "14 " + RESET + PURPLE + "- " + Lang.get("stageEditorReachLocs") +"\n";
|
||||
|
||||
LinkedList<String> locations = (LinkedList<String>) context.getSessionData(pref + CK.S_REACH_LOCATIONS);
|
||||
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++) {
|
||||
text += GRAY + " - Reach within " + BLUE + radii.get(i) + GRAY + " blocks of " + AQUA + names.get(i) + GRAY + " (" + DARKAQUA + locations.get(i) + GRAY + ")\n";
|
||||
text += GRAY + " - " + Lang.get("stageEditorReachRadii1") +" " + BLUE + radii.get(i) + GRAY + " " + Lang.get("stageEditorReachRadii2")+ " " + AQUA + names.get(i) + GRAY + " (" + DARKAQUA + locations.get(i) + GRAY + ")\n";
|
||||
}
|
||||
|
||||
|
||||
@ -279,10 +279,10 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
}
|
||||
|
||||
if (context.getSessionData(pref + CK.S_TAME_TYPES) == null) {
|
||||
text += PINK + "" + BOLD + "15 " + RESET + PURPLE + "- Tame Mobs " + GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||
text += PINK + "" + BOLD + "15 " + RESET + PURPLE + "- " + Lang.get("stageEditorTameMobs") + GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||
} else {
|
||||
|
||||
text += PINK + "" + BOLD + "15 " + RESET + PURPLE + "- Tame Mobs\n";
|
||||
text += PINK + "" + BOLD + "15 " + RESET + PURPLE + "- " + Lang.get("stageEditorTameMobs") +"\n";
|
||||
|
||||
LinkedList<String> mobs = (LinkedList<String>) context.getSessionData(pref + CK.S_TAME_TYPES);
|
||||
LinkedList<Integer> amounts = (LinkedList<Integer>) context.getSessionData(pref + CK.S_TAME_AMOUNTS);
|
||||
@ -294,9 +294,9 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
}
|
||||
|
||||
if (context.getSessionData(pref + CK.S_SHEAR_COLORS) == null) {
|
||||
text += PINK + "" + BOLD + "16 " + RESET + PURPLE + "- Shear Sheep " + GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||
text += PINK + "" + BOLD + "16 " + RESET + PURPLE + "- " + Lang.get("stageEditorShearSheep") + GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||
} else {
|
||||
text += PINK + "" + BOLD + "16 " + RESET + PURPLE + "- Shear Sheep\n";
|
||||
text += PINK + "" + BOLD + "16 " + RESET + PURPLE + "- " + Lang.get("stageEditorShearSheep") + "\n";
|
||||
|
||||
LinkedList<String> colors = (LinkedList<String>) context.getSessionData(pref + CK.S_SHEAR_COLORS);
|
||||
LinkedList<Integer> amounts = (LinkedList<Integer>) context.getSessionData(pref + CK.S_SHEAR_AMOUNTS);
|
||||
@ -308,53 +308,53 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
}
|
||||
|
||||
if (context.getSessionData(pref + CK.S_EVENT) == null) {
|
||||
text += PINK + "" + BOLD + "17 " + RESET + PURPLE + "- Event " + GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||
text += PINK + "" + BOLD + "17 " + RESET + PURPLE + "- " + Lang.get("event") + GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||
} else {
|
||||
text += PINK + "" + BOLD + "17 " + RESET + PURPLE + "- Event " + GRAY + "(" + AQUA + context.getSessionData(pref + CK.S_EVENT) + GRAY + ")\n";
|
||||
text += PINK + "" + BOLD + "17 " + RESET + PURPLE + "- " + Lang.get("event") + GRAY + " (" + AQUA + context.getSessionData(pref + CK.S_EVENT) + GRAY + ")\n";
|
||||
}
|
||||
|
||||
if (context.getSessionData(pref + CK.S_DELAY) == null) {
|
||||
text += PINK + "" + BOLD + "18 " + RESET + PURPLE + "- Delay " + GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||
text += PINK + "" + BOLD + "18 " + RESET + PURPLE + "- " + Lang.get("delay") + GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||
} else {
|
||||
long time = (Long) context.getSessionData(pref + CK.S_DELAY);
|
||||
text += PINK + "" + BOLD + "18 " + RESET + PURPLE + "- Delay " + GRAY + "(" + AQUA + Quests.getTime(time) + GRAY + ")\n";
|
||||
text += PINK + "" + BOLD + "18 " + RESET + PURPLE + "- " + Lang.get("delay") + GRAY + "(" + AQUA + Quests.getTime(time) + GRAY + ")\n";
|
||||
}
|
||||
|
||||
if (context.getSessionData(pref + CK.S_DELAY) == null) {
|
||||
text += GRAY + "" + BOLD + "19 " + RESET + GRAY + "- Delay Message " + GRAY + "(No delay set)\n";
|
||||
text += GRAY + "" + BOLD + "19 " + RESET + GRAY + "- " + Lang.get("stageEditorDelayMessage") + GRAY + " " + Lang.get("noDelaySet") + "\n";
|
||||
} else if (context.getSessionData(pref + CK.S_DELAY_MESSAGE) == null) {
|
||||
text += PINK + "" + BOLD + "19 " + RESET + PURPLE + "- Delay Message " + GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||
text += PINK + "" + BOLD + "19 " + RESET + PURPLE + "- "+ Lang.get("stageEditorDelayMessage") + GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||
} else {
|
||||
text += PINK + "" + BOLD + "19 " + RESET + PURPLE + "- Delay Message " + GRAY + "(" + AQUA + "\"" + context.getSessionData(pref + CK.S_DELAY_MESSAGE) + "\"" + GRAY + ")\n";
|
||||
text += PINK + "" + BOLD + "19 " + RESET + PURPLE + "- " + Lang.get("stageEditorDelayMessage") + GRAY + " (" + AQUA + "\"" + context.getSessionData(pref + CK.S_DELAY_MESSAGE) + "\"" + GRAY + ")\n";
|
||||
}
|
||||
|
||||
|
||||
if (questFactory.quests.denizen == null) {
|
||||
text += GRAY + "" + BOLD + "19 " + RESET + GRAY + "- Denizen Script " + GRAY + "(Denizen not installed)\n";
|
||||
text += GRAY + "" + BOLD + "19 " + RESET + GRAY + "- " + Lang.get("stageEditorDenizenScript") + GRAY + " (Denizen not installed)\n";
|
||||
} else {
|
||||
|
||||
if (context.getSessionData(pref + CK.S_DENIZEN) == null) {
|
||||
text += GRAY + "" + BOLD + "20 " + RESET + PURPLE + "- Denizen Script " + GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||
text += GRAY + "" + BOLD + "20 " + RESET + PURPLE + "- " + Lang.get("stageEditorDenizenScript") + GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||
} else {
|
||||
text += PINK + "" + BOLD + "20 " + RESET + PURPLE + "- Denizen Script " + GRAY + "(" + AQUA + context.getSessionData(pref + CK.S_DENIZEN) + GRAY + "\n";
|
||||
text += PINK + "" + BOLD + "20 " + RESET + PURPLE + "- " + Lang.get("stageEditorDenizenScript") + GRAY + " (" + AQUA + context.getSessionData(pref + CK.S_DENIZEN) + GRAY + "\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (context.getSessionData(pref + CK.S_START_MESSAGE) == null) {
|
||||
text += PINK + "" + BOLD + "21 " + RESET + PURPLE + "- Start Message " + GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||
text += PINK + "" + BOLD + "21 " + RESET + PURPLE + "- " + Lang.get("stageEditorStartMessage") + GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||
} else {
|
||||
text += PINK + "" + BOLD + "21 " + RESET + PURPLE + "- Start Message " + GRAY + "(" + AQUA + "\"" + context.getSessionData(pref + CK.S_START_MESSAGE) + "\"" + GRAY + ")\n";
|
||||
text += PINK + "" + BOLD + "21 " + RESET + PURPLE + "- " + Lang.get("stageEditorStartMessage") + GRAY + "(" + AQUA + "\"" + context.getSessionData(pref + CK.S_START_MESSAGE) + "\"" + GRAY + ")\n";
|
||||
}
|
||||
|
||||
if (context.getSessionData(pref + CK.S_COMPLETE_MESSAGE) == null) {
|
||||
text += PINK + "" + BOLD + "22 " + RESET + PURPLE + "- Complete Message " + GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||
text += PINK + "" + BOLD + "22 " + RESET + PURPLE + "- " + Lang.get("stageEditorCompleteMessage") + GRAY + " (" + Lang.get("noneSet") + ")\n";
|
||||
} else {
|
||||
text += PINK + "" + BOLD + "22 " + RESET + PURPLE + "- Complete Message " + GRAY + "(" + AQUA + "\"" + context.getSessionData(pref + CK.S_COMPLETE_MESSAGE) + "\"" + GRAY + ")\n";
|
||||
text += PINK + "" + BOLD + "22 " + RESET + PURPLE + "- " + Lang.get("stageEditorCompleteMessage") + GRAY + "(" + AQUA + "\"" + context.getSessionData(pref + CK.S_COMPLETE_MESSAGE) + "\"" + GRAY + ")\n";
|
||||
}
|
||||
|
||||
text += RED + "" + BOLD + "23 " + RESET + PURPLE + "- Delete Stage\n";
|
||||
text += GREEN + "" + BOLD + "24 " + RESET + PURPLE + "- Done\n";
|
||||
text += RED + "" + BOLD + "23 " + RESET + PURPLE + "- " + Lang.get("stageEditorDelete") + "\n";
|
||||
text += GREEN + "" + BOLD + "24 " + RESET + PURPLE + "- " + Lang.get("done") + "\n";
|
||||
|
||||
return text;
|
||||
|
||||
@ -458,15 +458,15 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
@Override
|
||||
public String getPromptText(ConversationContext context) {
|
||||
|
||||
String text = GOLD + "- Break Blocks -\n";
|
||||
String text = GOLD + "- " + Lang.get("stageEditorBreakBlocks") + " -\n";
|
||||
if (context.getSessionData(pref + CK.S_BREAK_IDS) == null) {
|
||||
text += BLUE + "" + BOLD + "1" + RESET + YELLOW + " - Set block IDs (None set)\n";
|
||||
text += GRAY + "2 - Set block amounts (No IDs set)\n";
|
||||
text += BLUE + "" + BOLD + "3" + RESET + YELLOW + " - Clear\n";
|
||||
text += BLUE + "" + BOLD + "4" + RESET + YELLOW + " - Done";
|
||||
text += BLUE + "" + BOLD + "1" + RESET + YELLOW + " - " + Lang.get("stageEditorSetBlockIds") + " (" + Lang.get("noneSet") + ")\n";
|
||||
text += GRAY + "2 - " + Lang.get("stageEditorSetBlockAmounts") + " (" + Lang.get("noIdsSet") + ")\n";
|
||||
text += BLUE + "" + BOLD + "3" + RESET + YELLOW + " - " + Lang.get("clear") + "\n";
|
||||
text += BLUE + "" + BOLD + "4" + RESET + YELLOW + " - " + Lang.get("done");
|
||||
} else {
|
||||
|
||||
text += BLUE + "" + BOLD + "1" + RESET + YELLOW + " - Set block IDs\n";
|
||||
text += BLUE + "" + BOLD + "1" + RESET + YELLOW + " - " + Lang.get("stageEditorSetBlockIds") + "\n";
|
||||
for (Integer i : getBlockIds(context)) {
|
||||
|
||||
text += GRAY + " - " + AQUA + Quester.prettyItemString(i) + "\n";
|
||||
@ -474,10 +474,10 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
}
|
||||
|
||||
if (context.getSessionData(pref + CK.S_BREAK_AMOUNTS) == null) {
|
||||
text += BLUE + "" + BOLD + "2" + RESET + YELLOW + " - Set block amounts (None set)\n";
|
||||
text += BLUE + "" + BOLD + "2" + RESET + YELLOW + " - " + Lang.get("stageEditorSetBlockAmounts") + " (" + Lang.get("noneSet") + ")\n";
|
||||
} else {
|
||||
|
||||
text += BLUE + "" + BOLD + "2" + RESET + YELLOW + " - Set block amounts\n";
|
||||
text += BLUE + "" + BOLD + "2" + RESET + YELLOW + " - " + Lang.get("stageEditorSetBlockAmounts") + "\n";
|
||||
for (Integer i : getBlockAmounts(context)) {
|
||||
|
||||
text += GRAY + " - " + AQUA + i + "\n";
|
||||
@ -486,8 +486,8 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
|
||||
}
|
||||
|
||||
text += BLUE + "" + BOLD + "3" + RESET + YELLOW + " - Clear\n";
|
||||
text += BLUE + "" + BOLD + "4" + RESET + YELLOW + " - Done";
|
||||
text += BLUE + "" + BOLD + "3" + RESET + YELLOW + " - " + Lang.get("clear") +"\n";
|
||||
text += BLUE + "" + BOLD + "4" + RESET + YELLOW + " - " + Lang.get("done");
|
||||
|
||||
}
|
||||
|
||||
@ -502,13 +502,13 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
return new BreakBlockIdsPrompt();
|
||||
} else if (input.equalsIgnoreCase("2")) {
|
||||
if (context.getSessionData(pref + CK.S_BREAK_IDS) == null) {
|
||||
context.getForWhom().sendRawMessage(RED + "You must set block IDs first!");
|
||||
context.getForWhom().sendRawMessage(RED + Lang.get("stageEditorNoBlockIds"));
|
||||
return new BreakBlockListPrompt();
|
||||
} else {
|
||||
return new BreakBlockAmountsPrompt();
|
||||
}
|
||||
} else if (input.equalsIgnoreCase("3")) {
|
||||
context.getForWhom().sendRawMessage(YELLOW + "Break blocks objective cleared.");
|
||||
context.getForWhom().sendRawMessage(YELLOW + Lang.get("stageEditorBreakBlocksCleared"));
|
||||
context.setSessionData(pref + CK.S_BREAK_IDS, null);
|
||||
context.setSessionData(pref + CK.S_BREAK_AMOUNTS, null);
|
||||
return new BreakBlockListPrompt();
|
||||
@ -532,7 +532,7 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
if (one == two) {
|
||||
return new CreateStagePrompt(stageNum, questFactory, citizens);
|
||||
} else {
|
||||
context.getForWhom().sendRawMessage(RED + "The " + GOLD + "block IDs list" + RED + " and " + GOLD + " block amounts list " + RED + "are not the same size!");
|
||||
context.getForWhom().sendRawMessage(RED + Lang.get("stageEditorInvalidIdAmountList"));
|
||||
return new BreakBlockListPrompt();
|
||||
}
|
||||
}
|
||||
@ -553,13 +553,13 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
|
||||
@Override
|
||||
public String getPromptText(ConversationContext context) {
|
||||
return YELLOW + "Enter block IDs, separating each one by a space, or enter \'cancel\' to return.";
|
||||
return YELLOW + Lang.get("stageEditorEnterBlockIds");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Prompt acceptInput(ConversationContext context, String input) {
|
||||
|
||||
if (input.equalsIgnoreCase("cancel") == false) {
|
||||
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false) {
|
||||
|
||||
String[] args = input.split(" ");
|
||||
LinkedList<Integer> ids = new LinkedList<Integer>();
|
||||
@ -572,17 +572,17 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
if (ids.contains(Integer.parseInt(s)) == false) {
|
||||
ids.add(Integer.parseInt(s));
|
||||
} else {
|
||||
context.getForWhom().sendRawMessage(RED + " List contains duplicates!");
|
||||
context.getForWhom().sendRawMessage(RED + Lang.get("stageEditorContainsDuplicates"));
|
||||
return new BreakBlockIdsPrompt();
|
||||
}
|
||||
|
||||
} else {
|
||||
context.getForWhom().sendRawMessage(PINK + s + RED + " is not a valid block ID!");
|
||||
context.getForWhom().sendRawMessage(PINK + s + RED + " " + Lang.get("stageEditorInvalidBlockId"));
|
||||
return new BreakBlockIdsPrompt();
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
context.getForWhom().sendRawMessage(RED + "Invalid entry " + PINK + s + RED + ". Input was not a list of numbers!");
|
||||
context.getForWhom().sendRawMessage(RED + Lang.get("stageEditorInvalidEntryInt") + "\n" + PINK + s);
|
||||
return new BreakBlockIdsPrompt();
|
||||
}
|
||||
|
||||
@ -651,13 +651,13 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
|
||||
String text = GOLD + "- Damage Blocks -\n";
|
||||
if (context.getSessionData(pref + CK.S_DAMAGE_IDS) == null) {
|
||||
text += BLUE + "" + BOLD + "1" + RESET + YELLOW + " - Set block IDs (None set)\n";
|
||||
text += GRAY + "2 - Set damage amounts (No IDs set)\n";
|
||||
text += BLUE + "" + BOLD + "1" + RESET + YELLOW + " - " + Lang.get("stageEditorSetBlockIds") + " (" + Lang.get("noneSet") + ")\n";
|
||||
text += GRAY + "2 - Set damage amounts (" + Lang.get("noIdsSet") + ")\n";
|
||||
text += BLUE + "" + BOLD + "3" + RESET + YELLOW + " - Clear\n";
|
||||
text += BLUE + "" + BOLD + "4" + RESET + YELLOW + " - Done";
|
||||
} else {
|
||||
|
||||
text += BLUE + "" + BOLD + "1" + RESET + YELLOW + " - Set block IDs\n";
|
||||
text += BLUE + "" + BOLD + "1" + RESET + YELLOW + " - " + Lang.get("stageEditorSetBlockIds") + "\n";
|
||||
for (Integer i : getBlockIds(context)) {
|
||||
|
||||
text += GRAY + " - " + AQUA + Quester.prettyItemString(i) + "\n";
|
||||
@ -665,7 +665,7 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
}
|
||||
|
||||
if (context.getSessionData(pref + CK.S_DAMAGE_AMOUNTS) == null) {
|
||||
text += BLUE + "" + BOLD + "2" + RESET + YELLOW + " - Set damage amounts (None set)\n";
|
||||
text += BLUE + "" + BOLD + "2" + RESET + YELLOW + " - Set damage amounts (" + Lang.get("noneSet") + ")\n";
|
||||
} else {
|
||||
|
||||
text += BLUE + "" + BOLD + "2" + RESET + YELLOW + " - Set damage amounts\n";
|
||||
@ -693,7 +693,7 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
return new DamageBlockIdsPrompt();
|
||||
} else if (input.equalsIgnoreCase("2")) {
|
||||
if (context.getSessionData(pref + CK.S_DAMAGE_IDS) == null) {
|
||||
context.getForWhom().sendRawMessage(RED + "You must set block IDs first!");
|
||||
context.getForWhom().sendRawMessage(RED + "You must " + Lang.get("stageEditorSetBlockIds") + " first!");
|
||||
return new DamageBlockListPrompt();
|
||||
} else {
|
||||
return new DamageBlockAmountsPrompt();
|
||||
@ -744,7 +744,7 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
|
||||
@Override
|
||||
public String getPromptText(ConversationContext context) {
|
||||
return YELLOW + "Enter block IDs, separating each one by a space, or enter \'cancel\' to return.";
|
||||
return YELLOW + Lang.get("stageEditorEnterBlockIds");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -842,13 +842,13 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
|
||||
String text = GOLD + "- Place Blocks -\n";
|
||||
if (context.getSessionData(pref + CK.S_PLACE_IDS) == null) {
|
||||
text += BLUE + "" + BOLD + "1" + RESET + YELLOW + " - Set block IDs (None set)\n";
|
||||
text += GRAY + "2 - Set place amounts (No IDs set)\n";
|
||||
text += BLUE + "" + BOLD + "1" + RESET + YELLOW + " - " + Lang.get("stageEditorSetBlockIds") + " (" + Lang.get("noneSet") + ")\n";
|
||||
text += GRAY + "2 - Set place amounts (" + Lang.get("noIdsSet") + ")\n";
|
||||
text += BLUE + "" + BOLD + "3" + RESET + YELLOW + " - Clear\n";
|
||||
text += BLUE + "" + BOLD + "4" + RESET + YELLOW + " - Done";
|
||||
} else {
|
||||
|
||||
text += BLUE + "" + BOLD + "1" + RESET + YELLOW + " - Set block IDs\n";
|
||||
text += BLUE + "" + BOLD + "1" + RESET + YELLOW + " - " + Lang.get("stageEditorSetBlockIds") + "\n";
|
||||
for (Integer i : getBlockIds(context)) {
|
||||
|
||||
text += GRAY + " - " + AQUA + Quester.prettyItemString(i) + "\n";
|
||||
@ -856,7 +856,7 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
}
|
||||
|
||||
if (context.getSessionData(pref + CK.S_PLACE_AMOUNTS) == null) {
|
||||
text += BLUE + "" + BOLD + "2" + RESET + YELLOW + " - Set place amounts (None set)\n";
|
||||
text += BLUE + "" + BOLD + "2" + RESET + YELLOW + " - Set place amounts (" + Lang.get("noneSet") + ")\n";
|
||||
} else {
|
||||
|
||||
text += BLUE + "" + BOLD + "2" + RESET + YELLOW + " - Set place amounts\n";
|
||||
@ -884,7 +884,7 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
return new PlaceBlockIdsPrompt();
|
||||
} else if (input.equalsIgnoreCase("2")) {
|
||||
if (context.getSessionData(pref + CK.S_PLACE_IDS) == null) {
|
||||
context.getForWhom().sendRawMessage(RED + "You must set block IDs first!");
|
||||
context.getForWhom().sendRawMessage(RED + "You must " + Lang.get("stageEditorSetBlockIds") + " first!");
|
||||
return new PlaceBlockListPrompt();
|
||||
} else {
|
||||
return new PlaceBlockAmountsPrompt();
|
||||
@ -935,7 +935,7 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
|
||||
@Override
|
||||
public String getPromptText(ConversationContext context) {
|
||||
return YELLOW + "Enter block IDs, separating each one by a space, or enter \'cancel\' to return.";
|
||||
return YELLOW + Lang.get("stageEditorEnterBlockIds");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -1033,13 +1033,13 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
|
||||
String text = GOLD + "- Use Blocks -\n";
|
||||
if (context.getSessionData(pref + CK.S_USE_IDS) == null) {
|
||||
text += BLUE + "" + BOLD + "1" + RESET + YELLOW + " - Set block IDs (None set)\n";
|
||||
text += GRAY + "2 - Set use amounts (No IDs set)\n";
|
||||
text += BLUE + "" + BOLD + "1" + RESET + YELLOW + " - " + Lang.get("stageEditorSetBlockIds") + " (" + Lang.get("noneSet") + ")\n";
|
||||
text += GRAY + "2 - Set use amounts (" + Lang.get("noIdsSet") + ")\n";
|
||||
text += BLUE + "" + BOLD + "3" + RESET + YELLOW + " - Clear\n";
|
||||
text += BLUE + "" + BOLD + "4" + RESET + YELLOW + " - Done";
|
||||
} else {
|
||||
|
||||
text += BLUE + "" + BOLD + "1" + RESET + YELLOW + " - Set block IDs\n";
|
||||
text += BLUE + "" + BOLD + "1" + RESET + YELLOW + " - " + Lang.get("stageEditorSetBlockIds") + "\n";
|
||||
for (Integer i : getBlockIds(context)) {
|
||||
|
||||
text += GRAY + " - " + AQUA + Quester.prettyItemString(i) + "\n";
|
||||
@ -1047,7 +1047,7 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
}
|
||||
|
||||
if (context.getSessionData(pref + CK.S_USE_AMOUNTS) == null) {
|
||||
text += BLUE + "" + BOLD + "2" + RESET + YELLOW + " - Set use amounts (None set)\n";
|
||||
text += BLUE + "" + BOLD + "2" + RESET + YELLOW + " - Set use amounts (" + Lang.get("noneSet") + ")\n";
|
||||
} else {
|
||||
|
||||
text += BLUE + "" + BOLD + "2" + RESET + YELLOW + " - Set use amounts\n";
|
||||
@ -1075,7 +1075,7 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
return new UseBlockIdsPrompt();
|
||||
} else if (input.equalsIgnoreCase("2")) {
|
||||
if (context.getSessionData(pref + CK.S_USE_IDS) == null) {
|
||||
context.getForWhom().sendRawMessage(RED + "You must set block IDs first!");
|
||||
context.getForWhom().sendRawMessage(RED + "You must " + Lang.get("stageEditorSetBlockIds") + " first!");
|
||||
return new UseBlockListPrompt();
|
||||
} else {
|
||||
return new UseBlockAmountsPrompt();
|
||||
@ -1126,7 +1126,7 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
|
||||
@Override
|
||||
public String getPromptText(ConversationContext context) {
|
||||
return YELLOW + "Enter block IDs, separating each one by a space, or enter \'cancel\' to return.";
|
||||
return YELLOW + Lang.get("stageEditorEnterBlockIds");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -1224,13 +1224,13 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
|
||||
String text = GOLD + "- Cut Blocks -\n";
|
||||
if (context.getSessionData(pref + CK.S_CUT_IDS) == null) {
|
||||
text += BLUE + "" + BOLD + "1" + RESET + YELLOW + " - Set block IDs (None set)\n";
|
||||
text += GRAY + "2 - Set cut amounts (No IDs set)\n";
|
||||
text += BLUE + "" + BOLD + "1" + RESET + YELLOW + " - " + Lang.get("stageEditorSetBlockIds") + " (" + Lang.get("noneSet") + ")\n";
|
||||
text += GRAY + "2 - Set cut amounts (" + Lang.get("noIdsSet") + ")\n";
|
||||
text += BLUE + "" + BOLD + "3" + RESET + YELLOW + " - Clear\n";
|
||||
text += BLUE + "" + BOLD + "4" + RESET + YELLOW + " - Done";
|
||||
} else {
|
||||
|
||||
text += BLUE + "" + BOLD + "1" + RESET + YELLOW + " - Set block IDs\n";
|
||||
text += BLUE + "" + BOLD + "1" + RESET + YELLOW + " - " + Lang.get("stageEditorSetBlockIds") + "\n";
|
||||
for (Integer i : getBlockIds(context)) {
|
||||
|
||||
text += GRAY + " - " + AQUA + Quester.prettyItemString(i) + "\n";
|
||||
@ -1238,7 +1238,7 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
}
|
||||
|
||||
if (context.getSessionData(pref + CK.S_CUT_AMOUNTS) == null) {
|
||||
text += BLUE + "" + BOLD + "2" + RESET + YELLOW + " - Set cut amounts (None set)\n";
|
||||
text += BLUE + "" + BOLD + "2" + RESET + YELLOW + " - Set cut amounts (" + Lang.get("noneSet") + ")\n";
|
||||
} else {
|
||||
|
||||
text += BLUE + "" + BOLD + "2" + RESET + YELLOW + " - Set cut amounts\n";
|
||||
@ -1266,7 +1266,7 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
return new CutBlockIdsPrompt();
|
||||
} else if (input.equalsIgnoreCase("2")) {
|
||||
if (context.getSessionData(pref + CK.S_CUT_IDS) == null) {
|
||||
context.getForWhom().sendRawMessage(RED + "You must set block IDs first!");
|
||||
context.getForWhom().sendRawMessage(RED + "You must " + Lang.get("stageEditorSetBlockIds") + " first!");
|
||||
return new CutBlockListPrompt();
|
||||
} else {
|
||||
return new CutBlockAmountsPrompt();
|
||||
@ -1317,7 +1317,7 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
|
||||
@Override
|
||||
public String getPromptText(ConversationContext context) {
|
||||
return YELLOW + "Enter block IDs, separating each one by a space, or enter \'cancel\' to return.";
|
||||
return YELLOW + Lang.get("stageEditorEnterBlockIds");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -1469,7 +1469,7 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
|
||||
String text = GOLD + "- Enchant Items -\n";
|
||||
if (context.getSessionData(pref + CK.S_ENCHANT_TYPES) == null) {
|
||||
text += BLUE + "" + BOLD + "1" + RESET + YELLOW + " - Set enchantments (None set)\n";
|
||||
text += BLUE + "" + BOLD + "1" + RESET + YELLOW + " - Set enchantments (" + Lang.get("noneSet") + ")\n";
|
||||
text += GRAY + "2 - Set item ids (No enchantments set)\n";
|
||||
text += GRAY + "3 - Set enchant amounts (No enchantments set)\n";
|
||||
text += BLUE + "" + BOLD + "4" + RESET + YELLOW + " - Clear\n";
|
||||
@ -1484,7 +1484,7 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
}
|
||||
|
||||
if (context.getSessionData(pref + CK.S_ENCHANT_IDS) == null) {
|
||||
text += BLUE + "" + BOLD + "2" + RESET + YELLOW + " - Set item ids (None set)\n";
|
||||
text += BLUE + "" + BOLD + "2" + RESET + YELLOW + " - Set item ids (" + Lang.get("noneSet") + ")\n";
|
||||
} else {
|
||||
|
||||
text += BLUE + "" + BOLD + "2" + RESET + YELLOW + " - Set item ids\n";
|
||||
@ -1497,7 +1497,7 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
}
|
||||
|
||||
if (context.getSessionData(pref + CK.S_ENCHANT_AMOUNTS) == null) {
|
||||
text += BLUE + "" + BOLD + "3" + RESET + YELLOW + " - Set enchant amounts (None set)\n";
|
||||
text += BLUE + "" + BOLD + "3" + RESET + YELLOW + " - Set enchant amounts (" + Lang.get("noneSet") + ")\n";
|
||||
} else {
|
||||
|
||||
text += BLUE + "" + BOLD + "3" + RESET + YELLOW + " - Set enchant amounts\n";
|
||||
@ -1776,7 +1776,7 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
text += BLUE + "" + BOLD + "1" + RESET + YELLOW + " - Add item\n";
|
||||
text += GRAY + "2 - Set NPC IDs (No items set)\n";
|
||||
if (context.getSessionData(pref + CK.S_DELIVERY_MESSAGES) == null) {
|
||||
text += BLUE + "3 - Set delivery messages (None set)\n";
|
||||
text += BLUE + "3 - Set delivery messages (" + Lang.get("noneSet") + ")\n";
|
||||
} else {
|
||||
|
||||
text += BLUE + "3 - Set delivery messages\n";
|
||||
@ -1800,7 +1800,7 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
text += BLUE + "" + BOLD + "1" + RESET + YELLOW + " - Add item\n";
|
||||
|
||||
if (context.getSessionData(pref + CK.S_DELIVERY_NPCS) == null) {
|
||||
text += BLUE + "" + BOLD + "2" + RESET + YELLOW + " - Set NPC IDs (None set)\n";
|
||||
text += BLUE + "" + BOLD + "2" + RESET + YELLOW + " - Set NPC IDs (" + Lang.get("noneSet") + ")\n";
|
||||
} else {
|
||||
|
||||
text += BLUE + "" + BOLD + "2" + RESET + YELLOW + " - Set NPC IDs\n";
|
||||
@ -1813,7 +1813,7 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
}
|
||||
|
||||
if (context.getSessionData(pref + CK.S_DELIVERY_MESSAGES) == null) {
|
||||
text += BLUE + "3 - Set delivery messages (None set)\n";
|
||||
text += BLUE + "3 - Set delivery messages (" + Lang.get("noneSet") + ")\n";
|
||||
} else {
|
||||
|
||||
text += BLUE + "3 - Set delivery messages\n";
|
||||
@ -2039,8 +2039,8 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
|
||||
String text = GOLD + "- Kill NPCs -\n";
|
||||
if (context.getSessionData(pref + CK.S_NPCS_TO_KILL) == null) {
|
||||
text += BLUE + "" + BOLD + "1" + RESET + YELLOW + " - Set NPC IDs (None set)\n";
|
||||
text += GRAY + "2 - Set kill amounts (No IDs set)\n";
|
||||
text += BLUE + "" + BOLD + "1" + RESET + YELLOW + " - Set NPC IDs (" + Lang.get("noneSet") + ")\n";
|
||||
text += GRAY + "2 - Set kill amounts (" + Lang.get("noIdsSet") + ")\n";
|
||||
text += BLUE + "" + BOLD + "3" + RESET + YELLOW + " - Clear\n";
|
||||
text += BLUE + "" + BOLD + "4" + RESET + YELLOW + " - Done";
|
||||
} else {
|
||||
@ -2053,7 +2053,7 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
}
|
||||
|
||||
if (context.getSessionData(pref + CK.S_NPCS_TO_KILL_AMOUNTS) == null) {
|
||||
text += BLUE + "" + BOLD + "2" + RESET + YELLOW + " - Set kill amounts (None set)\n";
|
||||
text += BLUE + "" + BOLD + "2" + RESET + YELLOW + " - Set kill amounts (" + Lang.get("noneSet") + ")\n";
|
||||
} else {
|
||||
|
||||
text += BLUE + "" + BOLD + "2" + RESET + YELLOW + " - Set kill amounts\n";
|
||||
@ -2228,13 +2228,13 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
|
||||
String text = GOLD + "- Kill Mobs -\n";
|
||||
if (context.getSessionData(pref + CK.S_MOB_TYPES) == null) {
|
||||
text += BLUE + "" + BOLD + "1" + RESET + YELLOW + " - Set mob types (None set)\n";
|
||||
text += BLUE + "" + BOLD + "1" + RESET + YELLOW + " - Set mob types (" + Lang.get("noneSet") + ")\n";
|
||||
text += GRAY + "2 - Set mob amounts (No mob types set)\n";
|
||||
text += DARKGRAY + "|---------Optional---------|";
|
||||
text += DARKGRAY + "|---------Optional---------|\n";
|
||||
text += GRAY + "3 - Set kill locations (No mob types set)\n";
|
||||
text += GRAY + "4 - Set kill location radii (No mob types set)\n";
|
||||
text += GRAY + "5 - Set kill location names (No mob types set)\n";
|
||||
text += DARKGRAY + "|--------------------------|";
|
||||
text += DARKGRAY + "|--------------------------|\n";
|
||||
text += BLUE + "" + BOLD + "6" + RESET + YELLOW + " - Clear\n";
|
||||
text += BLUE + "" + BOLD + "7" + RESET + YELLOW + " - Done";
|
||||
} else {
|
||||
@ -2247,7 +2247,7 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
}
|
||||
|
||||
if (context.getSessionData(pref + CK.S_MOB_AMOUNTS) == null) {
|
||||
text += BLUE + "" + BOLD + "2" + RESET + YELLOW + " - Set mob amounts (None set)\n";
|
||||
text += BLUE + "" + BOLD + "2" + RESET + YELLOW + " - Set mob amounts (" + Lang.get("noneSet") + ")\n";
|
||||
} else {
|
||||
|
||||
text += BLUE + "" + BOLD + "2" + RESET + YELLOW + " - Set mob amounts\n";
|
||||
@ -2262,7 +2262,7 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
text += DARKGRAY + "|---------Optional---------|";
|
||||
|
||||
if (context.getSessionData(pref + CK.S_MOB_KILL_LOCATIONS) == null) {
|
||||
text += BLUE + "" + BOLD + "3" + RESET + YELLOW + " - Set kill locations (None set)\n";
|
||||
text += BLUE + "" + BOLD + "3" + RESET + YELLOW + " - Set kill locations (" + Lang.get("noneSet") + ")\n";
|
||||
} else {
|
||||
|
||||
text += BLUE + "" + BOLD + "3" + RESET + YELLOW + " - Set kill locations\n";
|
||||
@ -2275,7 +2275,7 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
}
|
||||
|
||||
if (context.getSessionData(pref + CK.S_MOB_KILL_LOCATIONS_RADIUS) == null) {
|
||||
text += BLUE + "4 - Set kill location radii (None set)\n";
|
||||
text += BLUE + "4 - Set kill location radii (" + Lang.get("noneSet") + ")\n";
|
||||
} else {
|
||||
|
||||
text += BLUE + "4 - Set kill location radii\n";
|
||||
@ -2288,7 +2288,7 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
}
|
||||
|
||||
if (context.getSessionData(pref + CK.S_MOB_KILL_LOCATIONS_NAMES) == null) {
|
||||
text += BLUE + "5 - Set kill location names (None set)\n";
|
||||
text += BLUE + "5 - Set kill location names (" + Lang.get("noneSet") + ")\n";
|
||||
} else {
|
||||
|
||||
text += BLUE + "5 - Set kill location names\n";
|
||||
@ -2692,7 +2692,7 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
|
||||
String text = GOLD + "- Reach Locations -\n";
|
||||
if (context.getSessionData(pref + CK.S_REACH_LOCATIONS) == null) {
|
||||
text += BLUE + "" + BOLD + "1" + RESET + YELLOW + " - Set locations (None set)\n";
|
||||
text += BLUE + "" + BOLD + "1" + RESET + YELLOW + " - Set locations (" + Lang.get("noneSet") + ")\n";
|
||||
text += GRAY + "2 - Set location radii (No locations set)\n";
|
||||
text += GRAY + "3 - Set location names (No locations set)\n";
|
||||
text += BLUE + "" + BOLD + "4" + RESET + YELLOW + " - Clear\n";
|
||||
@ -2707,7 +2707,7 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
}
|
||||
|
||||
if (context.getSessionData(pref + CK.S_REACH_LOCATIONS_RADIUS) == null) {
|
||||
text += BLUE + "" + BOLD + "2" + RESET + YELLOW + " - Set location radii (None set)\n";
|
||||
text += BLUE + "" + BOLD + "2" + RESET + YELLOW + " - Set location radii (" + Lang.get("noneSet") + ")\n";
|
||||
} else {
|
||||
|
||||
text += BLUE + "" + BOLD + "2" + RESET + YELLOW + " - Set location radii\n";
|
||||
@ -2720,7 +2720,7 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
}
|
||||
|
||||
if (context.getSessionData(pref + CK.S_REACH_LOCATIONS_NAMES) == null) {
|
||||
text += BLUE + "" + BOLD + "3" + RESET + YELLOW + " - Set location names (None set)\n";
|
||||
text += BLUE + "" + BOLD + "3" + RESET + YELLOW + " - Set location names (" + Lang.get("noneSet") + ")\n";
|
||||
} else {
|
||||
|
||||
text += BLUE + "" + BOLD + "3" + RESET + YELLOW + " - Set location names\n";
|
||||
@ -2955,7 +2955,7 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
|
||||
String text = GOLD + "- Tame Mobs -\n";
|
||||
if (context.getSessionData(pref + CK.S_TAME_TYPES) == null) {
|
||||
text += BLUE + "" + BOLD + "1" + RESET + YELLOW + " - Set mob types (None set)\n";
|
||||
text += BLUE + "" + BOLD + "1" + RESET + YELLOW + " - Set mob types (" + Lang.get("noneSet") + ")\n";
|
||||
text += GRAY + "2 - Set tame amounts (No mob types set)\n";
|
||||
text += BLUE + "" + BOLD + "3" + RESET + YELLOW + " - Clear\n";
|
||||
text += BLUE + "" + BOLD + "4" + RESET + YELLOW + " - Done";
|
||||
@ -2969,7 +2969,7 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
}
|
||||
|
||||
if (context.getSessionData(pref + CK.S_TAME_AMOUNTS) == null) {
|
||||
text += BLUE + "" + BOLD + "2" + RESET + YELLOW + " - Set tame amounts (None set)\n";
|
||||
text += BLUE + "" + BOLD + "2" + RESET + YELLOW + " - Set tame amounts (" + Lang.get("noneSet") + ")\n";
|
||||
} else {
|
||||
|
||||
text += BLUE + "" + BOLD + "2" + RESET + YELLOW + " - Set tame amounts\n";
|
||||
@ -3173,7 +3173,7 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
|
||||
String text = GOLD + "- Shear Sheeps -\n";
|
||||
if (context.getSessionData(pref + CK.S_SHEAR_COLORS) == null) {
|
||||
text += BLUE + "" + BOLD + "1" + RESET + YELLOW + " - Set sheep colors (None set)\n";
|
||||
text += BLUE + "" + BOLD + "1" + RESET + YELLOW + " - Set sheep colors (" + Lang.get("noneSet") + ")\n";
|
||||
text += GRAY + "2 - Set shear amounts (No colors set)\n";
|
||||
text += BLUE + "" + BOLD + "3" + RESET + YELLOW + " - Clear\n";
|
||||
text += BLUE + "" + BOLD + "4" + RESET + YELLOW + " - Done";
|
||||
@ -3187,7 +3187,7 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
}
|
||||
|
||||
if (context.getSessionData(pref + CK.S_SHEAR_AMOUNTS) == null) {
|
||||
text += BLUE + "" + BOLD + "2" + RESET + YELLOW + " - Set shear amounts (None set)\n";
|
||||
text += BLUE + "" + BOLD + "2" + RESET + YELLOW + " - Set shear amounts (" + Lang.get("noneSet") + ")\n";
|
||||
} else {
|
||||
|
||||
text += BLUE + "" + BOLD + "2" + RESET + YELLOW + " - Set shear amounts\n";
|
||||
@ -3554,7 +3554,7 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
String text = GOLD + "- " + DARKRED + "Kill Bosses" + GOLD + " -\n";
|
||||
|
||||
if (cc.getSessionData(pref + "bossIds") == null) {
|
||||
text += BOLD + "" + RED + "1 " + RESET + RED + "- Set Bosses (None Set)\n";
|
||||
text += BOLD + "" + RED + "1 " + RESET + RED + "- Set Bosses (" + Lang.get("noneSet") + ")\n";
|
||||
} else {
|
||||
text += BOLD + "" + RED + "1 " + RESET + RED + "- Set Bosses\n";
|
||||
LinkedList<String> ids = (LinkedList<String>) cc.getSessionData(pref + "bossIds");
|
||||
@ -3574,7 +3574,7 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
}
|
||||
|
||||
if (cc.getSessionData(pref + "bossAmounts") == null) {
|
||||
text += BOLD + "" + RED + "2 " + RESET + RED + "- Set kill amounts (None Set)\n";
|
||||
text += BOLD + "" + RED + "2 " + RESET + RED + "- Set kill amounts (" + Lang.get("noneSet") + ")\n";
|
||||
} else {
|
||||
text += BOLD + "" + RED + "2 " + RESET + RED + "- Set kill amounts\n";
|
||||
LinkedList<Integer> amounts = (LinkedList<Integer>) cc.getSessionData(pref + "bossAmounts");
|
||||
@ -3788,7 +3788,7 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
player.sendMessage(YELLOW + "Start message cleared.");
|
||||
return new CreateStagePrompt(stageNum, questFactory, citizens);
|
||||
} else {
|
||||
return new StartMessagePrompt();
|
||||
return new CreateStagePrompt(stageNum, questFactory, citizens);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3799,7 +3799,7 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
@Override
|
||||
public String getPromptText(ConversationContext context) {
|
||||
|
||||
return YELLOW + "Enter start message, or enter \"clear\" to clear the message, or \"cancel\" to return";
|
||||
return YELLOW + "Enter complete message, or enter \"clear\" to clear the message, or \"cancel\" to return";
|
||||
|
||||
}
|
||||
|
||||
@ -3817,7 +3817,7 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
|
||||
player.sendMessage(YELLOW + "Complete message cleared.");
|
||||
return new CreateStagePrompt(stageNum, questFactory, citizens);
|
||||
} else {
|
||||
return new CompleteMessagePrompt();
|
||||
return new CreateStagePrompt(stageNum, questFactory, citizens);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -97,7 +97,7 @@ public class RequirementsPrompt extends FixedSetPrompt implements ColorUtil{
|
||||
}
|
||||
}
|
||||
|
||||
if(context.getSessionData(CK.REQ_MONEY) == null && context.getSessionData(CK.REQ_QUEST_BLOCK) == 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){
|
||||
if(context.getSessionData(CK.REQ_MONEY) == null && context.getSessionData(CK.REQ_QUEST_POINTS) == null && context.getSessionData(CK.REQ_QUEST_BLOCK) == 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){
|
||||
text += GRAY + "" + BOLD + "7 - " + RESET + GRAY + "Set fail requirements message (No requirements set)\n";
|
||||
}else if(context.getSessionData(CK.Q_FAIL_MESSAGE) == null){
|
||||
text += RED + "" + BOLD + "7 - " + RESET + RED + "Set fail requirements message (Required)\n";
|
||||
|
@ -3,6 +3,7 @@ package me.blackvein.quests.prompts;
|
||||
import me.blackvein.quests.ColorUtil;
|
||||
import me.blackvein.quests.QuestFactory;
|
||||
import me.blackvein.quests.util.CK;
|
||||
import me.blackvein.quests.util.Lang;
|
||||
|
||||
import org.bukkit.conversations.ConversationContext;
|
||||
import org.bukkit.conversations.Prompt;
|
||||
@ -21,20 +22,20 @@ public class StagesPrompt extends StringPrompt implements ColorUtil{
|
||||
@Override
|
||||
public String getPromptText(ConversationContext cc) {
|
||||
|
||||
String text = PINK + "- " + PURPLE + "Stages" + PINK + " -\n";
|
||||
String text = PINK + "- " + PURPLE + Lang.get("stageEditorStages") + PINK + " -\n";
|
||||
|
||||
int stages = getStages(cc);
|
||||
|
||||
for(int i = 1; i <= stages; i++){
|
||||
|
||||
text += BOLD + "" + GREEN + i + ". " + RESET + GOLD + "Edit Stage " + i + "\n";
|
||||
text += BOLD + "" + GREEN + i + ". " + RESET + GOLD + Lang.get("stageEditorEditStage") + " " + i + "\n";
|
||||
|
||||
}
|
||||
|
||||
stages++;
|
||||
text += "\n" + BOLD + "" + GREEN + stages + ". " + RESET + YELLOW + "Add new Stage";
|
||||
text += "\n" + BOLD + "" + GREEN + stages + ". " + RESET + YELLOW + Lang.get("stageEditorNewStage");
|
||||
stages++;
|
||||
text += "\n" + BOLD + "" + BLUE + stages + ". " + RESET + YELLOW + "Done";
|
||||
text += "\n" + BOLD + "" + BLUE + stages + ". " + RESET + YELLOW + Lang.get("done");
|
||||
|
||||
return text;
|
||||
}
|
||||
|
@ -29,12 +29,109 @@ public class Lang {
|
||||
public void initPhrases(){
|
||||
|
||||
//English
|
||||
|
||||
//Quests
|
||||
en.put("enterQuestName", "Enter Quest name (or \"cancel\" to return)");
|
||||
|
||||
|
||||
//TODO: If finished, completely check everything.
|
||||
//Quests
|
||||
//Quest create menu
|
||||
en.put("questEditorHeader", "Create Quest");
|
||||
en.put("questEditorCreate", "Create new Quest");
|
||||
en.put("questEditorEdit", "Edit a Quest");
|
||||
en.put("questEditorDelete", "Delete Quest");
|
||||
en.put("questEditorName", "Set name");
|
||||
|
||||
en.put("questEditorAskMessage", "Set ask message");
|
||||
en.put("questEditorFinishMessage", "Set finish message");
|
||||
en.put("questEditorRedoDelay", "Set redo delay");
|
||||
en.put("questEditorNPCStart", "Set NPC start");
|
||||
en.put("questEditorBlockStart", "Set Block start");
|
||||
en.put("questEditorInitialEvent", "Set initial Event");
|
||||
en.put("questEditorReqs", "Edit Requirements");
|
||||
en.put("questEditorStages", "Edit Stages");
|
||||
en.put("questEditorRews", "Edit Rewards");
|
||||
|
||||
en.put("questEditorEnterQuestName", "Enter Quest name (or \"cancel\" to return)");
|
||||
en.put("questEditorEnterAskMessage", "Enter ask message (or \"cancel\" to return)");
|
||||
en.put("questEditorEnterFinishMessage", "Enter finish message (or \"cancel\" to return)");
|
||||
en.put("questEditorEnterRedoDelay", "Enter amount of time (in milliseconds), 0 to clear the redo delay or -1 to cancel ");
|
||||
en.put("questEditorEnterNPCStart", "Enter NPC ID, -1 to clear the NPC start or -2 to cancel");
|
||||
en.put("questEditorEnterBlockStart", "Right-click on a block to use as a start point, then enter \"done\" to save,\n"
|
||||
+ "or enter \"clear\" to clear the block start, or \"cancel\" to return");
|
||||
en.put("questEditorEnterInitialEvent", "Enter an Event name, or enter \"clear\" to clear the initial Event, or \"cancel\" to return");
|
||||
|
||||
//Quest create menu errors
|
||||
en.put("questEditorNameExists", "A Quest with that name already exists!");
|
||||
en.put("questEditorBeingEdited", "Someone is creating/editing a Quest with that name!");
|
||||
en.put("questEditorInvalidQuestName", "Name may not contain commas!");
|
||||
en.put("questEditorInvalidEventName", "is not a valid event name!");
|
||||
en.put("questEditorInvalidNPC", "No NPC exists with that id!");
|
||||
en.put("questEditorNoStartBlockSelected", "You must select a block first.");
|
||||
en.put("questEditorPositiveAmount", "Amount must be a positive number.");
|
||||
en.put("questEditorQuestAsRequirement1", "The following Quests have");
|
||||
en.put("questEditorQuestAsRequirement2", "as a requirement:");
|
||||
en.put("questEditorQuestAsRequirement3", "You must modify these Quests so that they do not use it before deleting it.");
|
||||
en.put("questEditorQuestNotFound", "Quest not found!");
|
||||
|
||||
en.put("questEditorEventCleared", "Initial Event cleared.");
|
||||
en.put("questEditorSave", "Finish and save");
|
||||
|
||||
en.put("questEditorNeedAskMessage", "You must set an ask message!");
|
||||
en.put("questEditorNeedFinishMessage", "You must set a finish message!");
|
||||
en.put("questEditorNeedStages", "Your Quest has no Stages!");
|
||||
en.put("questEditorSaved", "Quest saved! (You will need to perform a Quest reload for it to appear)");
|
||||
en.put("questEditorExited", "Are you sure you want to exit without saving?");
|
||||
en.put("questEditorDeleted", "Are you sure you want to delete the Quest");
|
||||
|
||||
en.put("questEditorNoPermsCreate", "You do not have permission to create Quests.");
|
||||
en.put("questEditorNoPermsEdit", "You do not have permission to edit Quests.");
|
||||
en.put("questEditorNoPermsDelete", "You do not have permission to delete Quests.");
|
||||
//
|
||||
|
||||
//Stages
|
||||
//Menu
|
||||
en.put("stageEditorEditStage", "Edit Stage");
|
||||
en.put("stageEditorNewStage", "Add new Stage");
|
||||
//create prompt
|
||||
en.put("stageEditorStages", "Stages");
|
||||
en.put("stageEditorStage", "Stage");
|
||||
en.put("stageEditorEditStage", "Edit Stage");
|
||||
en.put("stageEditorNewStage", "Add new Stage");
|
||||
en.put("stageEditorBreakBlocks", "Break Blocks");
|
||||
en.put("stageEditorDamageBlocks", "Damage Blocks");
|
||||
en.put("stageEditorPlaceBlocks", "Place Blocks");
|
||||
en.put("stageEditorUseBlocks", "Use Blocks");
|
||||
en.put("stageEditorCutBlocks", "Cut Blocks");
|
||||
en.put("stageEditorCatchFish", "Catch Fish");
|
||||
en.put("stageEditorFish", "fish");
|
||||
en.put("stageEditorKillPlayers", "Kill Players");
|
||||
en.put("stageEditorPlayers", "players");
|
||||
en.put("stageEditorEnchantItems", "Enchant Items");
|
||||
en.put("stageEditorDeliverItems", "Deliver Items");
|
||||
en.put("stageEditorTalkToNPCs", "Talk to NPCs");
|
||||
en.put("stageEditorKillNPCs", "Kill NPCs");
|
||||
en.put("stageEditorKillBosses", "Kill Bosses");
|
||||
en.put("stageEditorKillMobs", "Kill Mobs");
|
||||
en.put("stageEditorReachLocs", "");
|
||||
en.put("stageEditorReachRadii1", "Reach within");
|
||||
en.put("stageEditorReachRadii2", "blocks of");
|
||||
en.put("stageEditorTameMobs", "Tame Mobs");
|
||||
en.put("stageEditorShearSheep", "Shear Sheep");
|
||||
en.put("stageEditorDelayMessage", "Delay Message");
|
||||
en.put("stageEditorDenizenScript", "Denizen Script");
|
||||
en.put("stageEditorStartMessage", "Start Message");
|
||||
en.put("stageEditorCompleteMessage", "Complete Message");
|
||||
en.put("stageEditorDelete", "Delete Stage");
|
||||
|
||||
en.put("stageEditorSetBlockIds", "Set block IDs");
|
||||
en.put("stageEditorSetBlockAmounts", "Set block amounts");
|
||||
en.put("stageEditorNoBlockIds", "You must set Block IDs first!");
|
||||
en.put("stageEditorBreakBlocksCleared", "Break blocks objective cleared.");
|
||||
en.put("stageEditorInvalidIdAmountList", "The block IDs list block amounts list are not the same size!");
|
||||
en.put("stageEditorEnterBlockIds", "Enter block IDs, separating each one by a space, or enter \'cancel\' to return.");
|
||||
en.put("stageEditorContainsDuplicates", "List contains duplicates!");
|
||||
en.put("stageEditorInvalidBlockId", "is not a valid block ID!");
|
||||
en.put("stageEditorInvalidEntryInt", "Invalid entry, input was not a list of numbers!");
|
||||
|
||||
//prompts
|
||||
|
||||
|
||||
|
||||
//Events
|
||||
@ -206,14 +303,18 @@ public class Lang {
|
||||
|
||||
//Misc
|
||||
en.put("event", "Event");
|
||||
en.put("delay", "Delay");
|
||||
en.put("save", "Save");
|
||||
en.put("exit", "Exit");
|
||||
en.put("exited", "Exited.");
|
||||
en.put("yes", "Yes");
|
||||
en.put("no", "No");
|
||||
en.put("clear", "Clear");
|
||||
en.put("done", "Done");
|
||||
en.put("quit", "Quit");
|
||||
en.put("clear", "Clear");
|
||||
en.put("noneSet", "None set");
|
||||
en.put("noDelaySet", "No delay set");
|
||||
en.put("noIdsSet", "No IDs set");
|
||||
en.put("worlds", "Worlds");
|
||||
en.put("mobs", "Mobs");
|
||||
en.put("invalidOption", "Invalid option!");
|
||||
|
@ -1,110 +1,110 @@
|
||||
name: Quests
|
||||
main: me.blackvein.quests.Quests
|
||||
version: 1.6.4
|
||||
description: Player questing system
|
||||
website: http://dev.bukkit.org/server-mods/quests/
|
||||
dev-url: https://github.com/Blackvein/Quests/
|
||||
authors: [Blackvein]
|
||||
soft-depend: [Citizens, Vault]
|
||||
permissions:
|
||||
quests.quest:
|
||||
description: View current Quest objectives
|
||||
default: true
|
||||
quests.questinfo:
|
||||
description: View information about a Quest
|
||||
default: true
|
||||
quests.quests:
|
||||
description: View Quests help
|
||||
default: true
|
||||
quests.list:
|
||||
description: List Quests
|
||||
default: true
|
||||
quests.take:
|
||||
description: Accept a Quest via command
|
||||
default: true
|
||||
quests.quit:
|
||||
description: Quit current Quest
|
||||
default: true
|
||||
quests.stats:
|
||||
description: View Questing statistics
|
||||
default: true
|
||||
quests.top:
|
||||
description: View Questing leaderboards
|
||||
default: true
|
||||
quests.info:
|
||||
description: View plugin information
|
||||
default: true
|
||||
quests.admin:
|
||||
description: Base Questsadmin command
|
||||
default: op
|
||||
quests.admin.give:
|
||||
description: Force a player to take a Quest (Overrides requirements)
|
||||
default: op
|
||||
quests.admin.quit:
|
||||
description: Force a player to quit their current Quest
|
||||
default: op
|
||||
quests.admin.points:
|
||||
description: Set a players Quest Points
|
||||
default: op
|
||||
quests.admin.takepoints:
|
||||
description: Take away a players Quest Points
|
||||
default: op
|
||||
quests.admin.givepoints:
|
||||
description: Give a player Quest Points
|
||||
default: op
|
||||
quests.admin.pointsall:
|
||||
description: Set all players' Quest Points
|
||||
default: op
|
||||
quests.admin.finish:
|
||||
description: Immediately force Quest completion for a player
|
||||
default: op
|
||||
quests.admin.nextstage:
|
||||
description: Immediately force Stage completion for a player
|
||||
default: op
|
||||
quests.admin.reload:
|
||||
description: Reload all Quests
|
||||
default: op
|
||||
quests.editor.editor:
|
||||
description: Open Quests Editor
|
||||
default: op
|
||||
quests.editor.create:
|
||||
description: Create new Quests
|
||||
default: op
|
||||
quests.editor.edit:
|
||||
description: Edit Quests
|
||||
default: op
|
||||
quests.editor.delete:
|
||||
description: Delete Quests
|
||||
default: op
|
||||
quests.editor.events.editor:
|
||||
description: Open Events Editor
|
||||
default: op
|
||||
quests.editor.events.create:
|
||||
description: Create new Events
|
||||
default: op
|
||||
quests.editor.events.edit:
|
||||
description: Edit Events
|
||||
default: op
|
||||
quests.editor.events.delete:
|
||||
description: Delete Events
|
||||
default: op
|
||||
quests.party.create:
|
||||
description: Create/Disband Parties
|
||||
default: true
|
||||
quests.party.join:
|
||||
description: Join parties without invitation
|
||||
default: op
|
||||
commands:
|
||||
quests:
|
||||
description: Quests command
|
||||
permission: quests.quests
|
||||
questadmin:
|
||||
description: Quests admin command
|
||||
permission: quests.admin
|
||||
aliases: [questsadmin]
|
||||
quest:
|
||||
description: Quest command
|
||||
permission: quests.quest
|
||||
events:
|
||||
description: Events
|
||||
name: Quests
|
||||
main: me.blackvein.quests.Quests
|
||||
version: 1.6.7
|
||||
description: Player questing system
|
||||
website: http://dev.bukkit.org/server-mods/quests/
|
||||
dev-url: https://github.com/Blackvein/Quests/
|
||||
authors: [Blackvein]
|
||||
soft-depend: [Citizens, Vault]
|
||||
permissions:
|
||||
quests.quest:
|
||||
description: View current Quest objectives
|
||||
default: true
|
||||
quests.questinfo:
|
||||
description: View information about a Quest
|
||||
default: true
|
||||
quests.quests:
|
||||
description: View Quests help
|
||||
default: true
|
||||
quests.list:
|
||||
description: List Quests
|
||||
default: true
|
||||
quests.take:
|
||||
description: Accept a Quest via command
|
||||
default: true
|
||||
quests.quit:
|
||||
description: Quit current Quest
|
||||
default: true
|
||||
quests.stats:
|
||||
description: View Questing statistics
|
||||
default: true
|
||||
quests.top:
|
||||
description: View Questing leaderboards
|
||||
default: true
|
||||
quests.info:
|
||||
description: View plugin information
|
||||
default: true
|
||||
quests.admin:
|
||||
description: Base Questsadmin command
|
||||
default: op
|
||||
quests.admin.give:
|
||||
description: Force a player to take a Quest (Overrides requirements)
|
||||
default: op
|
||||
quests.admin.quit:
|
||||
description: Force a player to quit their current Quest
|
||||
default: op
|
||||
quests.admin.points:
|
||||
description: Set a players Quest Points
|
||||
default: op
|
||||
quests.admin.takepoints:
|
||||
description: Take away a players Quest Points
|
||||
default: op
|
||||
quests.admin.givepoints:
|
||||
description: Give a player Quest Points
|
||||
default: op
|
||||
quests.admin.pointsall:
|
||||
description: Set all players' Quest Points
|
||||
default: op
|
||||
quests.admin.finish:
|
||||
description: Immediately force Quest completion for a player
|
||||
default: op
|
||||
quests.admin.nextstage:
|
||||
description: Immediately force Stage completion for a player
|
||||
default: op
|
||||
quests.admin.reload:
|
||||
description: Reload all Quests
|
||||
default: op
|
||||
quests.editor.editor:
|
||||
description: Open Quests Editor
|
||||
default: op
|
||||
quests.editor.create:
|
||||
description: Create new Quests
|
||||
default: op
|
||||
quests.editor.edit:
|
||||
description: Edit Quests
|
||||
default: op
|
||||
quests.editor.delete:
|
||||
description: Delete Quests
|
||||
default: op
|
||||
quests.editor.events.editor:
|
||||
description: Open Events Editor
|
||||
default: op
|
||||
quests.editor.events.create:
|
||||
description: Create new Events
|
||||
default: op
|
||||
quests.editor.events.edit:
|
||||
description: Edit Events
|
||||
default: op
|
||||
quests.editor.events.delete:
|
||||
description: Delete Events
|
||||
default: op
|
||||
quests.party.create:
|
||||
description: Create/Disband Parties
|
||||
default: true
|
||||
quests.party.join:
|
||||
description: Join parties without invitation
|
||||
default: op
|
||||
commands:
|
||||
quests:
|
||||
description: Quests command
|
||||
permission: quests.quests
|
||||
questadmin:
|
||||
description: Quests admin command
|
||||
permission: quests.admin
|
||||
aliases: [questsadmin]
|
||||
quest:
|
||||
description: Quest command
|
||||
permission: quests.quest
|
||||
events:
|
||||
description: Events
|
||||
permission: quests.editor
|
Loading…
Reference in New Issue
Block a user