mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-09-12 05:08:48 +00:00
deleting the contents of GlobalGroups.yml will no longer thrown a
NullPointerException.
This commit is contained in:
parent
559400c606
commit
8d29a2c578
|
@ -85,3 +85,4 @@ v 1.7:
|
||||||
- Offline player checks now support partial name matches.
|
- Offline player checks now support partial name matches.
|
||||||
- Added custom events so plugins can now be notified of changes within GroupManager.
|
- Added custom events so plugins can now be notified of changes within GroupManager.
|
||||||
- GM now registers with Bukkits ServicesManager.
|
- GM now registers with Bukkits ServicesManager.
|
||||||
|
- deleting the contents of GlobalGroups.yml will no longer thrown a NullPointerException.
|
|
@ -107,13 +107,15 @@ public class GlobalGroups {
|
||||||
throw new IllegalArgumentException("The following file couldn't pass on Parser.\n" + GlobalGroupsFile.getPath(), ex);
|
throw new IllegalArgumentException("The following file couldn't pass on Parser.\n" + GlobalGroupsFile.getPath(), ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Clear out old groups
|
||||||
|
resetGlobalGroups();
|
||||||
|
|
||||||
|
if (!GGroups.getKeys(false).isEmpty()) {
|
||||||
// Read all global groups
|
// Read all global groups
|
||||||
Map<String, Object> allGroups = (Map<String, Object>) GGroups.getConfigurationSection("groups").getValues(false);
|
Map<String, Object> allGroups = (Map<String, Object>) GGroups.getConfigurationSection("groups").getValues(false);
|
||||||
|
|
||||||
// Load each groups permissions list.
|
// Load each groups permissions list.
|
||||||
if (allGroups != null) {
|
if (allGroups != null) {
|
||||||
// Clear out old groups
|
|
||||||
resetGlobalGroups();
|
|
||||||
for (String groupName : allGroups.keySet()) {
|
for (String groupName : allGroups.keySet()) {
|
||||||
Group newGroup = new Group(groupName.toLowerCase());
|
Group newGroup = new Group(groupName.toLowerCase());
|
||||||
Object element;
|
Object element;
|
||||||
|
@ -150,6 +152,8 @@ public class GlobalGroups {
|
||||||
}
|
}
|
||||||
|
|
||||||
removeGroupsChangedFlag();
|
removeGroupsChangedFlag();
|
||||||
|
}
|
||||||
|
|
||||||
setTimeStampGroups(GlobalGroupsFile.lastModified());
|
setTimeStampGroups(GlobalGroupsFile.lastModified());
|
||||||
GroupManager.setLoaded(true);
|
GroupManager.setLoaded(true);
|
||||||
//GlobalGroupsFile = null;
|
//GlobalGroupsFile = null;
|
||||||
|
|
Loading…
Reference in a new issue