summaryrefslogtreecommitdiffstats
path: root/EssentialsGroupManager/src/org/anjocaido/groupmanager/data
diff options
context:
space:
mode:
authorElgarL <ElgarL@palmergames.com>2011-09-02 23:07:23 +0100
committerElgarL <ElgarL@palmergames.com>2011-09-02 23:07:23 +0100
commit1153a0eee4a3685fcfad490646e4610d38d61c01 (patch)
tree93f541d3c340fac94019858e5104a5321e445b6f /EssentialsGroupManager/src/org/anjocaido/groupmanager/data
parentb140f606b41cbb30fd0acff3f9c6f416967d82c2 (diff)
downloadEssentials-1153a0eee4a3685fcfad490646e4610d38d61c01.tar
Essentials-1153a0eee4a3685fcfad490646e4610d38d61c01.tar.gz
Essentials-1153a0eee4a3685fcfad490646e4610d38d61c01.tar.lz
Essentials-1153a0eee4a3685fcfad490646e4610d38d61c01.tar.xz
Essentials-1153a0eee4a3685fcfad490646e4610d38d61c01.zip
Bukkit Superperms support
Diffstat (limited to 'EssentialsGroupManager/src/org/anjocaido/groupmanager/data')
-rw-r--r--[-rwxr-xr-x]EssentialsGroupManager/src/org/anjocaido/groupmanager/data/Group.java9
-rw-r--r--[-rwxr-xr-x]EssentialsGroupManager/src/org/anjocaido/groupmanager/data/User.java12
2 files changed, 19 insertions, 2 deletions
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/data/Group.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/data/Group.java
index 4af5449fc..7523831e7 100755..100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/data/Group.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/data/Group.java
@@ -4,6 +4,7 @@
*/
package org.anjocaido.groupmanager.data;
+import org.anjocaido.groupmanager.GroupManager;
import org.anjocaido.groupmanager.dataholder.WorldDataHolder;
import java.util.ArrayList;
import java.util.Map;
@@ -52,7 +53,7 @@ public class Group extends DataUnit implements Cloneable {
/**
* Use this to deliver a group from a different dataSource to another
* @param dataSource
- * @return
+ * @return Null or Clone
*/
public Group clone(WorldDataHolder dataSource) {
if (dataSource.groupExists(this.getName())) {
@@ -79,7 +80,7 @@ public class Group extends DataUnit implements Cloneable {
}
/**
- * @param inherits the inherits to set
+ * @param inherit the inherits to set
*/
public void addInherits(Group inherit) {
if (!this.getDataSource().groupExists(inherit.getName())) {
@@ -89,6 +90,8 @@ public class Group extends DataUnit implements Cloneable {
inherits.add(inherit.getName().toLowerCase());
}
flagAsChanged();
+ if (GroupManager.isLoaded)
+ GroupManager.BukkitPermissions.updateAllPlayers();
}
public boolean removeInherits(String inherit) {
@@ -118,5 +121,7 @@ public class Group extends DataUnit implements Cloneable {
variables.addVar(key, temp.getVarObject(key));
}
flagAsChanged();
+ if (GroupManager.isLoaded)
+ GroupManager.BukkitPermissions.updateAllPlayers();
}
}
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/data/User.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/data/User.java
index b90cf4ff1..f3ea1d0f5 100755..100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/data/User.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/data/User.java
@@ -6,6 +6,8 @@ package org.anjocaido.groupmanager.data;
//import com.sun.org.apache.bcel.internal.generic.AALOAD;
import java.util.ArrayList;
+
+import org.anjocaido.groupmanager.GroupManager;
import org.anjocaido.groupmanager.dataholder.WorldDataHolder;
import java.util.Map;
@@ -102,6 +104,8 @@ public class User extends DataUnit implements Cloneable {
public void setGroup(String group) {
this.group = group;
flagAsChanged();
+ if (GroupManager.isLoaded)
+ GroupManager.BukkitPermissions.updateAllPlayers();
}
/**
@@ -114,6 +118,8 @@ public class User extends DataUnit implements Cloneable {
group = getDataSource().getGroup(group.getName());
this.group = group.getName();
flagAsChanged();
+ if (GroupManager.isLoaded)
+ GroupManager.BukkitPermissions.updateAllPlayers();
}
public void addSubGroup(Group subGroup) {
@@ -127,6 +133,8 @@ public class User extends DataUnit implements Cloneable {
removeSubGroup(subGroup);
subGroups.add(subGroup.getName());
flagAsChanged();
+ if (GroupManager.isLoaded)
+ GroupManager.BukkitPermissions.updateAllPlayers();
}
public int subGroupsSize() {
@@ -145,6 +153,8 @@ public class User extends DataUnit implements Cloneable {
try {
if (subGroups.remove(subGroup.getName())) {
flagAsChanged();
+ if (GroupManager.isLoaded)
+ GroupManager.BukkitPermissions.updateAllPlayers();
return true;
}
} catch (Exception e) {
@@ -187,5 +197,7 @@ public class User extends DataUnit implements Cloneable {
variables.addVar(key, temp.getVarObject(key));
}
flagAsChanged();
+ if (GroupManager.isLoaded)
+ GroupManager.BukkitPermissions.updateAllPlayers();
}
}