mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-23 00:21:26 +01:00
Merge branch 'groupmanager' of github.com:essentials/Essentials into 2.9
This commit is contained in:
commit
afccda6350
@ -199,4 +199,5 @@ v 2.0:
|
||||
- Include the GM version when logging errors.
|
||||
- Fix Synchronization on adding subgroups (thanks snowleo).
|
||||
- Remove info node support from GlobalGroups. It should not have them as GlobalGroups are only permission collections.
|
||||
- Change order of data in Users.yml to [name, Group, SubGroup, Permissions, Info nodes].
|
||||
- Change order of data in Users.yml to [name, Group, SubGroup, Permissions, Info nodes].
|
||||
- Add alphabetically sorted user lists.
|
@ -15,8 +15,10 @@ import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.TreeSet;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import org.anjocaido.groupmanager.GroupManager;
|
||||
@ -1018,17 +1020,19 @@ public class WorldDataHolder {
|
||||
public static void writeUsers(WorldDataHolder ph, File usersFile) {
|
||||
|
||||
Map<String, Object> root = new HashMap<String, Object>();
|
||||
|
||||
Map<String, Object> usersMap = new HashMap<String, Object>();
|
||||
LinkedHashMap<String, Object> usersMap = new LinkedHashMap<String, Object>();
|
||||
|
||||
root.put("users", usersMap);
|
||||
synchronized (ph.getUsers()) {
|
||||
for (String userKey : ph.getUsers().keySet()) {
|
||||
|
||||
// A sorted list of users.
|
||||
for (String userKey : new TreeSet<String>(ph.getUsers().keySet())) {
|
||||
User user = ph.getUsers().get(userKey);
|
||||
if ((user.getGroup() == null || user.getGroup().equals(ph.getDefaultGroup())) && user.getPermissionList().isEmpty() && user.getVariables().isEmpty() && user.isSubGroupsEmpty()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Map<String, Object> aUserMap = new HashMap<String, Object>();
|
||||
LinkedHashMap<String, Object> aUserMap = new LinkedHashMap<String, Object>();
|
||||
usersMap.put(user.getName(), aUserMap);
|
||||
|
||||
// GROUP NODE
|
||||
|
@ -1,15 +1,15 @@
|
||||
# "For a more advanced configuration example utilizing the advanced features of GroupManager, see http://pastebin.com/a8ZA0j5G"
|
||||
users:
|
||||
snowleo:
|
||||
subgroups: []
|
||||
permissions: []
|
||||
group: Builder
|
||||
subgroups: []
|
||||
permissions: []
|
||||
KHobbits:
|
||||
group: Moderator
|
||||
subgroups: []
|
||||
permissions: []
|
||||
group: Moderator
|
||||
ElgarL:
|
||||
group: Moderator
|
||||
subgroups: []
|
||||
permissions: []
|
||||
group: Moderator
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user