mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-08 07:36:42 +02:00
Set a default mirror map if none is found in the config.
This commit is contained in:
@@ -228,3 +228,4 @@ v2.1:
|
|||||||
- Update for CraftBukkit 1.7.8-R0.1(3050).
|
- Update for CraftBukkit 1.7.8-R0.1(3050).
|
||||||
- Add UUID support.
|
- Add UUID support.
|
||||||
Plugins can still query by player name but a UUID is faster and preferable.
|
Plugins can still query by player name but a UUID is faster and preferable.
|
||||||
|
- Set a default mirror map if none is found in the config.
|
@@ -80,7 +80,7 @@ public class GMConfiguration {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Read our config settings ands store them for reading later.
|
* Read our config settings and store them for reading later.
|
||||||
*/
|
*/
|
||||||
try {
|
try {
|
||||||
Map<String, Object> config = getElement("config", getElement("settings", GMconfig));
|
Map<String, Object> config = getElement("config", getElement("settings", GMconfig));
|
||||||
@@ -136,6 +136,9 @@ public class GMConfiguration {
|
|||||||
*/
|
*/
|
||||||
mirrorsMap = (Map<String, Object>) ((Map<String, Object>) GMconfig.get("settings")).get("mirrors");
|
mirrorsMap = (Map<String, Object>) ((Map<String, Object>) GMconfig.get("settings")).get("mirrors");
|
||||||
|
|
||||||
|
if (mirrorsMap == null)
|
||||||
|
throw new Exception();
|
||||||
|
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
/*
|
/*
|
||||||
* Flag the error and use defaults
|
* Flag the error and use defaults
|
||||||
|
Reference in New Issue
Block a user