aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/me/fatpigsarefat/quests/commands/CommandQuests.java
diff options
context:
space:
mode:
authorfatpigsarefat <fatpigsarefat@outlook.com>2018-09-23 16:19:39 +0100
committerfatpigsarefat <fatpigsarefat@outlook.com>2018-09-23 16:19:39 +0100
commitbcbb43392cd45e03a68bc581396fc5bbac691080 (patch)
treebc50f659a8aafc0164e2746109a160d53b0201fe /src/main/java/me/fatpigsarefat/quests/commands/CommandQuests.java
parentf772b2eec8e41876a140832d1101a21dcc130e01 (diff)
Players can no longer start already started quests
- When clicking a quest a player has already started, it would reset - Default messages added to config.yml - New response code from the startQuest method (5)
Diffstat (limited to 'src/main/java/me/fatpigsarefat/quests/commands/CommandQuests.java')
-rw-r--r--src/main/java/me/fatpigsarefat/quests/commands/CommandQuests.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/me/fatpigsarefat/quests/commands/CommandQuests.java b/src/main/java/me/fatpigsarefat/quests/commands/CommandQuests.java
index 277fc002..f8c3c04b 100644
--- a/src/main/java/me/fatpigsarefat/quests/commands/CommandQuests.java
+++ b/src/main/java/me/fatpigsarefat/quests/commands/CommandQuests.java
@@ -204,6 +204,7 @@ public class CommandQuests implements CommandExecutor {
if (quest == null) {
sender.sendMessage(Messages.COMMAND_QUEST_START_DOESNTEXIST.getMessage().replace("{quest}", args[4]));
success = true;
+ return true;
}
if (args[2].equalsIgnoreCase("reset")) {
questProgressFile.generateBlankQuestProgress(quest.getId());
@@ -224,6 +225,9 @@ public class CommandQuests implements CommandExecutor {
} else if (response == 4) {
sender.sendMessage(Messages.COMMAND_QUEST_ADMIN_START_FAILLOCKED.getMessage().replace("{player}", name).replace("{quest}", quest.getId()));
return true;
+ } else if (response == 5) {
+ sender.sendMessage(Messages.COMMAND_QUEST_ADMIN_START_FAILSTARTED.getMessage().replace("{player}", name).replace("{quest}", quest.getId()));
+ return true;
}
questProgressFile.saveToDisk();
sender.sendMessage(Messages.COMMAND_QUEST_ADMIN_START_SUCCESS.getMessage().replace("{player}", name).replace("{quest}", quest.getId()));