mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-08-21 10:52:01 +00:00
- Fix for Users.yml containing only 'users:' causing a crash.
- GroupManager will now generate a fresh Users and Groups yml if either file is empty.
This commit is contained in:
parent
8f28073b29
commit
e3756623a1
|
@ -5,4 +5,6 @@ v 1.1:
|
|||
- Added SuperPerms support so GM will update and provide the permissions to plugins which only support Bukkit Perms.
|
||||
- Added more helpful output to errors on argument lengths.
|
||||
- GroupManager will now attempt to select the default world when using commands instead of failing and telling you to use '/manselect <world>'.
|
||||
- Invalid groups assigned to players in users.yml will no longer cause a crash. GM will now set them to the default group instead.
|
||||
- Invalid groups assigned to players in users.yml will no longer cause a crash. GM will now set them to the default group instead.
|
||||
- Fix for Users.yml containing only 'users:' causing a crash.
|
||||
- GroupManager will now generate a fresh Users and Groups yml if either file is empty.
|
|
@ -578,6 +578,11 @@ public class WorldDataHolder {
|
|||
|
||||
// PROCESS USERS FILE
|
||||
Map<String, Object> allUsersNode = (Map<String, Object>) usersRootDataNode.get("users");
|
||||
|
||||
// Stop loading if the file is empty
|
||||
if (allUsersNode == null)
|
||||
return ph;
|
||||
|
||||
for (String usersKey : allUsersNode.keySet()) {
|
||||
Map<String, Object> thisUserNode = (Map<String, Object>) allUsersNode.get(usersKey);
|
||||
User thisUser = ph.createUser(usersKey);
|
||||
|
|
4
EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/worlds/WorldsHolder.java
Executable file → Normal file
4
EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/worlds/WorldsHolder.java
Executable file → Normal file
|
@ -265,7 +265,7 @@ public class WorldsHolder {
|
|||
File groupsFile = new File(defaultWorldFolder, "groups.yml");
|
||||
File usersFile = new File(defaultWorldFolder, "users.yml");
|
||||
File oldDataFile = new File(plugin.getDataFolder(), "data.yml");
|
||||
if (!groupsFile.exists()) {
|
||||
if (!groupsFile.exists() || groupsFile.length() == 0) {
|
||||
if (oldDataFile.exists()) {
|
||||
try {
|
||||
Tasks.copy(oldDataFile, groupsFile);
|
||||
|
@ -281,7 +281,7 @@ public class WorldsHolder {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (!usersFile.exists()) {
|
||||
if (!usersFile.exists() || usersFile.length() == 0) {
|
||||
if (oldDataFile.exists()) {
|
||||
try {
|
||||
Tasks.copy(oldDataFile, usersFile);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
name: GroupManager
|
||||
version: "1.1"
|
||||
version: "1.1 (Phoenix)"
|
||||
main: org.anjocaido.groupmanager.GroupManager
|
||||
website: http://www.anjocaido.info/
|
||||
description: Provides on-the-fly system for Permission system created by Nijikokun. But all in memory, and with flat-file saving schedule.
|
||||
|
|
Loading…
Reference in a new issue