diff options
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); } |