Ignore directories with /quests top, fixes #373

This commit is contained in:
HappyPikachu 2018-04-20 10:42:23 -04:00
parent 1bac3ed1f3
commit ac899a7c8c

View File

@ -1401,6 +1401,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener
Map<String, Integer> questPoints = new HashMap<String, Integer>();
if (playerFiles != null) {
for (File f : playerFiles) {
if (!f.isDirectory()) {
FileConfiguration data = new YamlConfiguration();
try {
data.load(f);
@ -1413,6 +1414,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener
questPoints.put(name, data.getInt("quest-points"));
}
}
}
LinkedHashMap<String, Integer> sortedMap = (LinkedHashMap<String, Integer>) Quests.sort(questPoints);
int numPrinted = 0;
String msg = Lang.get("topQuestersTitle");