From 1764940b186f290fbb9d818b9bd044d61648bee7 Mon Sep 17 00:00:00 2001 From: ElgarL Date: Sun, 27 Apr 2014 23:55:20 +0100 Subject: Set a default mirror map if none is found in the config. --- EssentialsGroupManager/src/Changelog.txt | 3 ++- .../src/org/anjocaido/groupmanager/GMConfiguration.java | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/EssentialsGroupManager/src/Changelog.txt b/EssentialsGroupManager/src/Changelog.txt index f01b2261c..583200e26 100644 --- a/EssentialsGroupManager/src/Changelog.txt +++ b/EssentialsGroupManager/src/Changelog.txt @@ -227,4 +227,5 @@ v 2.0: v2.1: - Update for CraftBukkit 1.7.8-R0.1(3050). - Add UUID support. - Plugins can still query by player name but a UUID is faster and preferable. \ No newline at end of file + 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. \ No newline at end of file diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GMConfiguration.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GMConfiguration.java index fbf8109f6..a340482b0 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GMConfiguration.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GMConfiguration.java @@ -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 { Map config = getElement("config", getElement("settings", GMconfig)); @@ -135,6 +135,9 @@ public class GMConfiguration { * Store our mirrors map for parsing later. */ mirrorsMap = (Map) ((Map) GMconfig.get("settings")).get("mirrors"); + + if (mirrorsMap == null) + throw new Exception(); } catch (Exception ex) { /* -- cgit v1.2.3