diff options
author | KHobbits <rob@khobbits.co.uk> | 2011-09-25 15:02:01 +0100 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2011-09-25 15:02:01 +0100 |
commit | 41e11a738d4162b94724fd1e683c5b0962285570 (patch) | |
tree | 7acba7e84a23ede963f39394659dd0172d7d1d0d | |
parent | c681befdf2053ca32e7613c91bb1699a48a905ab (diff) | |
parent | 62e1710607776a56e9f7b3428c815401ad6be4fd (diff) | |
download | Essentials-41e11a738d4162b94724fd1e683c5b0962285570.tar Essentials-41e11a738d4162b94724fd1e683c5b0962285570.tar.gz Essentials-41e11a738d4162b94724fd1e683c5b0962285570.tar.lz Essentials-41e11a738d4162b94724fd1e683c5b0962285570.tar.xz Essentials-41e11a738d4162b94724fd1e683c5b0962285570.zip |
Merge remote branch 'remotes/ess/groupmanager' into essmaster
4 files changed, 22 insertions, 15 deletions
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java index 13d99ddc1..dcec36639 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java @@ -51,7 +51,7 @@ public class GroupManager extends JavaPlugin { private WorldsHolder worldsHolder; private boolean validateOnlinePlayer = true; private boolean isReady = false; - public static boolean isLoaded = false; + private static boolean isLoaded = false; private GMConfiguration config; private GMLoggerHandler ch; public static BukkitPermissions BukkitPermissions; @@ -103,10 +103,10 @@ public class GroupManager extends JavaPlugin { * All plugins will be loaded by then */ - if (getServer().getScheduler().scheduleSyncDelayedTask(this, new BukkitPermsUpdateTask(),1) == -1) + if (getServer().getScheduler().scheduleSyncDelayedTask(this, new BukkitPermsUpdateTask(),1) == -1) { GroupManager.logger.severe("Could not schedule superperms Update."); - else setLoaded(true); + } //setLoaded(true); System.out.println(pdfFile.getName() + " version " + pdfFile.getVersion() + " is enabled!"); diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/data/Group.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/data/Group.java index 7523831e7..c881fc95d 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/data/Group.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/data/Group.java @@ -90,7 +90,7 @@ public class Group extends DataUnit implements Cloneable { inherits.add(inherit.getName().toLowerCase()); } flagAsChanged(); - if (GroupManager.isLoaded) + if (GroupManager.isLoaded()) GroupManager.BukkitPermissions.updateAllPlayers(); } @@ -121,7 +121,7 @@ public class Group extends DataUnit implements Cloneable { variables.addVar(key, temp.getVarObject(key)); } flagAsChanged(); - if (GroupManager.isLoaded) + 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 e9bf79aa9..46dbb3ddc 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/data/User.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/data/User.java @@ -104,8 +104,9 @@ public class User extends DataUnit implements Cloneable { public void setGroup(String group) { this.group = group; flagAsChanged(); - if ((GroupManager.isLoaded) && (GroupManager.BukkitPermissions.player_join = false)) - GroupManager.BukkitPermissions.updateAllPlayers(); + if (GroupManager.isLoaded()) + if(GroupManager.BukkitPermissions.player_join = false) + GroupManager.BukkitPermissions.updateAllPlayers(); } /** @@ -118,8 +119,9 @@ public class User extends DataUnit implements Cloneable { group = getDataSource().getGroup(group.getName()); this.group = group.getName(); flagAsChanged(); - if ((GroupManager.isLoaded) && (GroupManager.BukkitPermissions.player_join = false)) - GroupManager.BukkitPermissions.updateAllPlayers(); + if (GroupManager.isLoaded()) + if (GroupManager.BukkitPermissions.player_join = false) + GroupManager.BukkitPermissions.updateAllPlayers(); } public void addSubGroup(Group subGroup) { @@ -133,7 +135,8 @@ public class User extends DataUnit implements Cloneable { removeSubGroup(subGroup); subGroups.add(subGroup.getName()); flagAsChanged(); - if ((GroupManager.isLoaded) && (GroupManager.BukkitPermissions.player_join = false)) + if (GroupManager.isLoaded()) + if (GroupManager.BukkitPermissions.player_join = false) GroupManager.BukkitPermissions.updateAllPlayers(); } @@ -153,8 +156,9 @@ public class User extends DataUnit implements Cloneable { try { if (subGroups.remove(subGroup.getName())) { flagAsChanged(); - if ((GroupManager.isLoaded) && (GroupManager.BukkitPermissions.player_join = false)) - GroupManager.BukkitPermissions.updateAllPlayers(); + if (GroupManager.isLoaded()) + if (GroupManager.BukkitPermissions.player_join = false) + GroupManager.BukkitPermissions.updateAllPlayers(); return true; } } catch (Exception e) { @@ -197,7 +201,8 @@ public class User extends DataUnit implements Cloneable { variables.addVar(key, temp.getVarObject(key)); } flagAsChanged(); - if ((GroupManager.isLoaded) && (GroupManager.BukkitPermissions.player_join = false)) - GroupManager.BukkitPermissions.updateAllPlayers(); + if (GroupManager.isLoaded()) + if (GroupManager.BukkitPermissions.player_join = false) + GroupManager.BukkitPermissions.updateAllPlayers(); } } diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java index d3fbdbe55..1c2aa8fb7 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java @@ -16,6 +16,8 @@ package org.anjocaido.groupmanager.permissions;
+import java.io.PrintWriter;
+import java.io.StringWriter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
@@ -255,7 +257,7 @@ public class BukkitPermissions { public void onPluginEnable(PluginEnableEvent event) {
if (!GroupManager.isLoaded())
return;
-
+
collectPermissions();
updateAllPlayers();
}
|