Require objective before selecting Denizen script. Bump version number

This commit is contained in:
PikaMug 2019-07-25 04:22:14 -04:00
parent 8b7e6e6b27
commit 742d6252c1
7 changed files with 22 additions and 13 deletions

2
dist/pom.xml vendored
View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>me.blackvein.quests</groupId> <groupId>me.blackvein.quests</groupId>
<artifactId>quests-parent</artifactId> <artifactId>quests-parent</artifactId>
<version>3.7.6</version> <version>3.7.7</version>
</parent> </parent>
<artifactId>quests-dist</artifactId> <artifactId>quests-dist</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>

View File

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>me.blackvein.quests</groupId> <groupId>me.blackvein.quests</groupId>
<artifactId>quests-parent</artifactId> <artifactId>quests-parent</artifactId>
<version>3.7.6</version> <version>3.7.7</version>
</parent> </parent>
<artifactId>quests-main</artifactId> <artifactId>quests-main</artifactId>

View File

@ -134,7 +134,7 @@ public class CreateStagePrompt extends FixedSetPrompt {
text += ChatColor.BLUE + "" + ChatColor.BOLD + "9" + ChatColor.RESET + ChatColor.AQUA + " - " + Lang.get("stageEditorEvents") + "\n"; text += ChatColor.BLUE + "" + ChatColor.BOLD + "9" + ChatColor.RESET + ChatColor.AQUA + " - " + Lang.get("stageEditorEvents") + "\n";
} }
if (!hasObjective) { if (!hasObjective) {
text += ChatColor.GRAY + "" + ChatColor.BOLD + "10" + ChatColor.RESET + ChatColor.GRAY + " - " + Lang.get("delay") + ChatColor.GRAY + " (" + Lang.get("stageEditorOptional") + ")\n"; text += ChatColor.GRAY + "" + ChatColor.BOLD + "10" + ChatColor.RESET + ChatColor.GRAY + " - " + Lang.get("delay") + ChatColor.GRAY + " (" + Lang.get("stageEditorOptional") + ")\n";
} else { } else {
if (context.getSessionData(pref + CK.S_DELAY) == null) { if (context.getSessionData(pref + CK.S_DELAY) == null) {
text += ChatColor.BLUE + "" + ChatColor.BOLD + "10" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("delay") + ChatColor.GRAY + " (" + Lang.get("noneSet") + ")\n"; text += ChatColor.BLUE + "" + ChatColor.BOLD + "10" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("delay") + ChatColor.GRAY + " (" + Lang.get("noneSet") + ")\n";
@ -153,11 +153,15 @@ public class CreateStagePrompt extends FixedSetPrompt {
if (plugin.getDependencies().getDenizenAPI() == null) { if (plugin.getDependencies().getDenizenAPI() == null) {
text += ChatColor.GRAY + "" + ChatColor.BOLD + "12" + ChatColor.RESET + ChatColor.GRAY + " - " + Lang.get("stageEditorDenizenScript") + ChatColor.GRAY + " (" + Lang.get("questDenNotInstalled") + ")\n"; text += ChatColor.GRAY + "" + ChatColor.BOLD + "12" + ChatColor.RESET + ChatColor.GRAY + " - " + Lang.get("stageEditorDenizenScript") + ChatColor.GRAY + " (" + Lang.get("questDenNotInstalled") + ")\n";
} else { } else {
if (context.getSessionData(pref + CK.S_DENIZEN) == null) { if (!hasObjective) {
text += ChatColor.BLUE + "" + ChatColor.BOLD + "12" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorDenizenScript") + ChatColor.GRAY + " (" + Lang.get("noneSet") + ")\n"; text += ChatColor.GRAY + "" + ChatColor.BOLD + "12" + ChatColor.RESET + ChatColor.GRAY + " - " + Lang.get("stageEditorDenizenScript") + ChatColor.GRAY + " (" + Lang.get("stageEditorOptional") + ")\n";
} else { } else {
hasObjective = true; if (context.getSessionData(pref + CK.S_DENIZEN) == null) {
text += ChatColor.BLUE + "" + ChatColor.BOLD + "12" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorDenizenScript") + ChatColor.GRAY + " (" + ChatColor.AQUA + context.getSessionData(pref + CK.S_DENIZEN) + ChatColor.GRAY + ")\n"; text += ChatColor.BLUE + "" + ChatColor.BOLD + "12" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorDenizenScript") + ChatColor.GRAY + " (" + Lang.get("noneSet") + ")\n";
} else {
hasObjective = true;
text += ChatColor.BLUE + "" + ChatColor.BOLD + "12" + ChatColor.RESET + ChatColor.YELLOW + " - " + Lang.get("stageEditorDenizenScript") + ChatColor.GRAY + " (" + ChatColor.AQUA + context.getSessionData(pref + CK.S_DENIZEN) + ChatColor.GRAY + ")\n";
}
} }
} }
if (context.getSessionData(pref + CK.S_START_MESSAGE) == null) { if (context.getSessionData(pref + CK.S_START_MESSAGE) == null) {
@ -240,7 +244,12 @@ public class CreateStagePrompt extends FixedSetPrompt {
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("stageEditorNoDenizen")); context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("stageEditorNoDenizen"));
return new CreateStagePrompt(plugin, stageNum, questFactory); return new CreateStagePrompt(plugin, stageNum, questFactory);
} else { } else {
return new DenizenPrompt(); if (hasObjective) {
return new DenizenPrompt();
} else {
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidOption"));
return new CreateStagePrompt(plugin, stageNum, questFactory);
}
} }
} else if (input.equalsIgnoreCase("13")) { } else if (input.equalsIgnoreCase("13")) {
if (hasObjective) { if (hasObjective) {

View File

@ -6,12 +6,12 @@
<groupId>me.blackvein.quests</groupId> <groupId>me.blackvein.quests</groupId>
<artifactId>quests-parent</artifactId> <artifactId>quests-parent</artifactId>
<version>3.7.6</version> <version>3.7.7</version>
<name>quests</name> <name>quests</name>
<url>https://github.com/PikaMug/Quests/</url> <url>https://github.com/PikaMug/Quests/</url>
<properties> <properties>
<revision>3.7.6</revision> <revision>3.7.7</revision>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.target>1.8</maven.compiler.target>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>me.blackvein.quests</groupId> <groupId>me.blackvein.quests</groupId>
<artifactId>quests-parent</artifactId> <artifactId>quests-parent</artifactId>
<version>3.7.6</version> <version>3.7.7</version>
</parent> </parent>
<properties> <properties>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>me.blackvein.quests</groupId> <groupId>me.blackvein.quests</groupId>
<artifactId>quests-parent</artifactId> <artifactId>quests-parent</artifactId>
<version>3.7.6</version> <version>3.7.7</version>
</parent> </parent>
<properties> <properties>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>me.blackvein.quests</groupId> <groupId>me.blackvein.quests</groupId>
<artifactId>quests-parent</artifactId> <artifactId>quests-parent</artifactId>
<version>3.7.6</version> <version>3.7.7</version>
</parent> </parent>
<properties> <properties>