mirror of
https://github.com/PikaMug/Quests.git
synced 2024-12-19 15:48:10 +01:00
Ignore directories with /quests top, fixes #373
This commit is contained in:
parent
1bac3ed1f3
commit
ac899a7c8c
@ -1401,16 +1401,18 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener
|
|||||||
Map<String, Integer> questPoints = new HashMap<String, Integer>();
|
Map<String, Integer> questPoints = new HashMap<String, Integer>();
|
||||||
if (playerFiles != null) {
|
if (playerFiles != null) {
|
||||||
for (File f : playerFiles) {
|
for (File f : playerFiles) {
|
||||||
FileConfiguration data = new YamlConfiguration();
|
if (!f.isDirectory()) {
|
||||||
try {
|
FileConfiguration data = new YamlConfiguration();
|
||||||
data.load(f);
|
try {
|
||||||
} catch (IOException e) {
|
data.load(f);
|
||||||
e.printStackTrace();
|
} catch (IOException e) {
|
||||||
} catch (InvalidConfigurationException e) {
|
e.printStackTrace();
|
||||||
e.printStackTrace();
|
} catch (InvalidConfigurationException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
String name = f.getName().substring(0, (f.getName().indexOf(".")));
|
||||||
|
questPoints.put(name, data.getInt("quest-points"));
|
||||||
}
|
}
|
||||||
String name = f.getName().substring(0, (f.getName().indexOf(".")));
|
|
||||||
questPoints.put(name, data.getInt("quest-points"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LinkedHashMap<String, Integer> sortedMap = (LinkedHashMap<String, Integer>) Quests.sort(questPoints);
|
LinkedHashMap<String, Integer> sortedMap = (LinkedHashMap<String, Integer>) Quests.sort(questPoints);
|
||||||
|
Loading…
Reference in New Issue
Block a user