summaryrefslogtreecommitdiffstats
path: root/src/main/java/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com')
-rw-r--r--src/main/java/com/leonardobishop/quests/Quests.java1
-rw-r--r--src/main/java/com/leonardobishop/quests/QuestsConfigLoader.java3
-rw-r--r--src/main/java/com/leonardobishop/quests/commands/CommandQuests.java8
3 files changed, 8 insertions, 4 deletions
diff --git a/src/main/java/com/leonardobishop/quests/Quests.java b/src/main/java/com/leonardobishop/quests/Quests.java
index 332eae99..bef7e659 100644
--- a/src/main/java/com/leonardobishop/quests/Quests.java
+++ b/src/main/java/com/leonardobishop/quests/Quests.java
@@ -181,6 +181,7 @@ public class Quests extends JavaPlugin {
for (Map.Entry<String, QuestsConfigLoader.ConfigLoadError> entry : questsConfigLoader.getBrokenFiles().entrySet()) {
Quests.this.getLogger().warning(" - " + entry.getKey() + ": " + entry.getValue().getMessage());
}
+ Quests.this.getLogger().warning(ChatColor.GRAY.toString() + ChatColor.ITALIC + "If this is your first time using Quests, please delete the Quests folder and RESTART (not reload!) the server.");
}
for (Player player : Bukkit.getOnlinePlayers()) {
diff --git a/src/main/java/com/leonardobishop/quests/QuestsConfigLoader.java b/src/main/java/com/leonardobishop/quests/QuestsConfigLoader.java
index 1d37b68e..46678e6b 100644
--- a/src/main/java/com/leonardobishop/quests/QuestsConfigLoader.java
+++ b/src/main/java/com/leonardobishop/quests/QuestsConfigLoader.java
@@ -38,7 +38,7 @@ public class QuestsConfigLoader {
YamlConfiguration config = new YamlConfiguration();
config.load(new File(String.valueOf(plugin.getDataFolder() + File.separator + "config.yml")));
} catch (Exception ex) {
- brokenFiles.put("<MAIN CONFIG> config.yml", ConfigLoadError.MAIN_CONFIG_ERROR);
+ brokenFiles.put("<MAIN CONFIG> config.yml", ConfigLoadError.MALFORMED_YAML);
plugin.setBrokenConfig(true);
return;
}
@@ -189,7 +189,6 @@ public class QuestsConfigLoader {
public enum ConfigLoadError {
- MAIN_CONFIG_ERROR("You have a YAML error in your Quests config. If this is your first time using Quests, please remove the Quests folder and RESTART (not reload!) the server and try again."),
MALFORMED_YAML("Malformed YAML"),
INVALID_QUEST_ID("Invalid quest ID (must be alphanumeric)");
diff --git a/src/main/java/com/leonardobishop/quests/commands/CommandQuests.java b/src/main/java/com/leonardobishop/quests/commands/CommandQuests.java
index db3f496b..67e4220e 100644
--- a/src/main/java/com/leonardobishop/quests/commands/CommandQuests.java
+++ b/src/main/java/com/leonardobishop/quests/commands/CommandQuests.java
@@ -31,8 +31,11 @@ public class CommandQuests implements CommandExecutor {
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
if (plugin.isBrokenConfig()) {
- sender.sendMessage(ChatColor.RED + "You have a YAML error in your config and Quests cannot load. If this is your first time using Quests, please " +
- "delete the Quests folder and RESTART (not reload!) the server. If you have modified the config, check for errors in a YAML parser.");
+ sender.sendMessage(ChatColor.RED + "The main config must be in tact before quests can be used. Quests has failed to load the following files:");
+ for (Map.Entry<String, QuestsConfigLoader.ConfigLoadError> entry : plugin.getQuestsConfigLoader().getBrokenFiles().entrySet()) {
+ sender.sendMessage(ChatColor.DARK_GRAY + " * " + ChatColor.RED + entry.getKey() + ": " + ChatColor.GRAY + entry.getValue().getMessage());
+ }
+ sender.sendMessage(ChatColor.GRAY.toString() + ChatColor.ITALIC + "If this is your first time using Quests, please delete the Quests folder and RESTART (not reload!) the server.");
return true;
}
@@ -63,6 +66,7 @@ public class CommandQuests implements CommandExecutor {
for (Map.Entry<String, QuestsConfigLoader.ConfigLoadError> entry : plugin.getQuestsConfigLoader().getBrokenFiles().entrySet()) {
sender.sendMessage(ChatColor.DARK_GRAY + " * " + ChatColor.RED + entry.getKey() + ": " + ChatColor.GRAY + entry.getValue().getMessage());
}
+ sender.sendMessage(ChatColor.GRAY.toString() + ChatColor.ITALIC + "If this is your first time using Quests, please delete the Quests folder and RESTART (not reload!) the server.");
} else {
sender.sendMessage(ChatColor.GRAY + "Quests was reloaded.");
}