mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-02-02 13:31:54 +01:00
Merge branch 'refs/heads/groupmanager'
This commit is contained in:
commit
e683ce5751
@ -73,3 +73,6 @@ v 1.5:
|
||||
- Notification of being moved to the default group only happens if it's a demotion/promotion (not on join).
|
||||
- Fixed GM holding files open and causing the time stamp to be incorrect. This caused GM to require a '/mansave force' when it shouldn't be needed.
|
||||
- Fixed a crash on reload due to bukkit not unloading plugins before reloading.
|
||||
v 1.6:
|
||||
- Prevent Group.equals tests throwing a NullPointerException for GlobalGroups.
|
||||
- Stop throwing errors on an empty users file.
|
@ -39,7 +39,18 @@ public abstract class DataUnit {
|
||||
public boolean equals(Object o) {
|
||||
if (o instanceof DataUnit) {
|
||||
DataUnit go = (DataUnit) o;
|
||||
if (this.getName().equalsIgnoreCase(go.getName()) && this.dataSource.getName().equalsIgnoreCase(go.getDataSource().getName())) {
|
||||
if (this.getName().equalsIgnoreCase(go.getName())) {
|
||||
// Global Group match.
|
||||
if (this.dataSource == null && go.getDataSource() == null)
|
||||
return true;
|
||||
// This is a global group, the object to test isn't.
|
||||
if (this.dataSource == null && go.getDataSource() != null)
|
||||
return false;
|
||||
// This is not a global group, but the object to test is.
|
||||
if (this.dataSource != null && go.getDataSource() == null)
|
||||
return false;
|
||||
// Match on group name and world name.
|
||||
if (this.dataSource.getName().equalsIgnoreCase(go.getDataSource().getName()))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -711,10 +711,8 @@ 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 ;
|
||||
|
||||
// Load users if the file is NOT empty
|
||||
if (allUsersNode != null)
|
||||
for (String usersKey : allUsersNode.keySet()) {
|
||||
Map<String, Object> thisUserNode = (Map<String, Object>) allUsersNode.get(usersKey);
|
||||
User thisUser = ph.createUser(usersKey);
|
||||
@ -781,8 +779,6 @@ public class WorldDataHolder {
|
||||
// Update the LastModified time.
|
||||
ph.usersFile = usersFile;
|
||||
ph.setTimeStampUsers(usersFile.lastModified());
|
||||
|
||||
//return ph;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
name: GroupManager
|
||||
version: "1.5 (Phoenix)"
|
||||
version: "1.6 (Phoenix)"
|
||||
main: org.anjocaido.groupmanager.GroupManager
|
||||
website: http://www.anjocaido.info/
|
||||
description: Provides on-the-fly system for permissions system created by Nijikokun. But all in memory, and with flat-file saving schedule.
|
||||
|
Loading…
Reference in New Issue
Block a user