mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 14:46:46 +01:00
Add proper error handling to file loading
This commit is contained in:
parent
218b2a1a75
commit
4e4d798b1d
@ -1,3 +1,8 @@
|
||||
Version 2.1.82
|
||||
Added proper error handling when loading parties file
|
||||
Updated Chinese locale (thanks to the user named 89009332 from github)
|
||||
Added some redundancy checks when loading profiles (NPC checks to be specific)
|
||||
|
||||
Version 2.1.81
|
||||
Fixed a bug where Arrow Deflect would never trigger outside of PVP
|
||||
Fixed a bug where failing to salvage enchantments incorrectly colored the text
|
||||
|
2
pom.xml
2
pom.xml
@ -2,7 +2,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.gmail.nossr50.mcMMO</groupId>
|
||||
<artifactId>mcMMO</artifactId>
|
||||
<version>2.1.81</version>
|
||||
<version>2.1.82-SNAPSHOT</version>
|
||||
<name>mcMMO</name>
|
||||
<url>https://github.com/mcMMO-Dev/mcMMO</url>
|
||||
<scm>
|
||||
|
@ -591,7 +591,9 @@ public final class PartyManager {
|
||||
return;
|
||||
}
|
||||
|
||||
YamlConfiguration partiesFile = YamlConfiguration.loadConfiguration(partyFile);
|
||||
try {
|
||||
YamlConfiguration partiesFile;
|
||||
partiesFile = YamlConfiguration.loadConfiguration(partyFile);
|
||||
|
||||
ArrayList<Party> hasAlly = new ArrayList<Party>();
|
||||
|
||||
@ -625,11 +627,17 @@ public final class PartyManager {
|
||||
|
||||
parties.add(party);
|
||||
}
|
||||
|
||||
mcMMO.p.debug("Loaded (" + parties.size() + ") Parties...");
|
||||
|
||||
for (Party party : hasAlly) {
|
||||
party.setAlly(PartyManager.getParty(partiesFile.getString(party.getName() + ".Ally")));
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user