diff options
author | ElgarL <ElgarL@palmergames.com> | 2011-10-31 17:23:24 +0000 |
---|---|---|
committer | ElgarL <ElgarL@palmergames.com> | 2011-10-31 17:23:24 +0000 |
commit | 3f2916967d88fddc1c69f62ffd7ca572d25d9992 (patch) | |
tree | 6e31f90d20a84720d1c2f7731762477fd45ee080 /EssentialsGroupManager/src/org/anjocaido/groupmanager/data | |
parent | 0731de53b499592abdffcc6237a5b52db4f5a706 (diff) | |
download | Essentials-3f2916967d88fddc1c69f62ffd7ca572d25d9992.tar Essentials-3f2916967d88fddc1c69f62ffd7ca572d25d9992.tar.gz Essentials-3f2916967d88fddc1c69f62ffd7ca572d25d9992.tar.lz Essentials-3f2916967d88fddc1c69f62ffd7ca572d25d9992.tar.xz Essentials-3f2916967d88fddc1c69f62ffd7ca572d25d9992.zip |
Added Info node support to Global Groups.
Diffstat (limited to 'EssentialsGroupManager/src/org/anjocaido/groupmanager/data')
-rw-r--r-- | EssentialsGroupManager/src/org/anjocaido/groupmanager/data/Group.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/data/Group.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/data/Group.java index 09eabb43f..e580918e7 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/data/Group.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/data/Group.java @@ -50,8 +50,15 @@ public class Group extends DataUnit implements Cloneable { */ @Override public Group clone() { - Group clone = new Group(getDataSource(), this.getName()); - clone.inherits = new ArrayList<String>(this.getInherits()); + Group clone; + + if (getDataSource() == null) { + clone = new Group(this.getName()); + } else { + clone = new Group(getDataSource(), this.getName()); + clone.inherits = new ArrayList<String>(this.getInherits()); + } + for (String perm : this.getPermissionList()) { clone.addPermission(perm); } |