mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-09-12 05:08:48 +00:00
Trap errors in fetching the mirrors map.
This commit is contained in:
parent
e563405a7d
commit
3708f2b3bb
|
@ -121,3 +121,4 @@ v 1.9:
|
||||||
- Fix trying to modify an unmodifiable collection breaking superperms.
|
- Fix trying to modify an unmodifiable collection breaking superperms.
|
||||||
- Fixed subgroups (I broke earlier).
|
- Fixed subgroups (I broke earlier).
|
||||||
- Check for a null player object in the PlayerTeleportEvent.
|
- Check for a null player object in the PlayerTeleportEvent.
|
||||||
|
- Trap errors in fetching the mirrors map.
|
|
@ -66,10 +66,12 @@ public class GMConfiguration {
|
||||||
|
|
||||||
public Map<String, Object> getMirrorsMap() {
|
public Map<String, Object> getMirrorsMap() {
|
||||||
// Try to fetch the old mirror path first
|
// Try to fetch the old mirror path first
|
||||||
if (GMconfig.isConfigurationSection("settings.permission.world.mirror"))
|
if (GMconfig.isConfigurationSection("settings.permission.world.mirror")) {
|
||||||
return (Map<String, Object>) GMconfig.getConfigurationSection("settings.permission.world.mirror").getValues(false);
|
return (Map<String, Object>) GMconfig.getConfigurationSection("settings.permission.world.mirror").getValues(false);
|
||||||
else
|
} else if (GMconfig.isConfigurationSection("settings.mirrors")){
|
||||||
return (Map<String, Object>) GMconfig.getConfigurationSection("settings.mirrors").getValues(false);
|
return (Map<String, Object>) GMconfig.getConfigurationSection("settings.mirrors").getValues(false);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -117,6 +117,7 @@ public class WorldsHolder {
|
||||||
mirrorsGroup.clear();
|
mirrorsGroup.clear();
|
||||||
mirrorsUser.clear();
|
mirrorsUser.clear();
|
||||||
Map<String, Object> mirrorsMap = plugin.getGMConfig().getMirrorsMap();
|
Map<String, Object> mirrorsMap = plugin.getGMConfig().getMirrorsMap();
|
||||||
|
|
||||||
if (mirrorsMap != null) {
|
if (mirrorsMap != null) {
|
||||||
for (String source : mirrorsMap.keySet()) {
|
for (String source : mirrorsMap.keySet()) {
|
||||||
// Make sure all non mirrored worlds have a set of data files.
|
// Make sure all non mirrored worlds have a set of data files.
|
||||||
|
|
Loading…
Reference in a new issue