diff options
author | ElgarL <ElgarL@palmergames.com> | 2012-01-22 23:46:26 +0000 |
---|---|---|
committer | ElgarL <ElgarL@palmergames.com> | 2012-01-22 23:46:26 +0000 |
commit | 125ea7c701c365c0a903c436ef92577742eaad5f (patch) | |
tree | 8d8a38fc8c5d9912e0207d2b12380796a108cff5 /EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions | |
parent | 6e03ea7b7deee8923d0c6804c105a3595838af9b (diff) | |
download | Essentials-125ea7c701c365c0a903c436ef92577742eaad5f.tar Essentials-125ea7c701c365c0a903c436ef92577742eaad5f.tar.gz Essentials-125ea7c701c365c0a903c436ef92577742eaad5f.tar.lz Essentials-125ea7c701c365c0a903c436ef92577742eaad5f.tar.xz Essentials-125ea7c701c365c0a903c436ef92577742eaad5f.zip |
Fixed infinite loop error on player join.
Optimized code to only update the player logging in instead of all
players online.
Diffstat (limited to 'EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions')
-rw-r--r-- | EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java index e4bb94592..481779c3c 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java @@ -122,7 +122,6 @@ public class BukkitPermissions { registeredPermissions = new LinkedList<Permission>(Bukkit.getPluginManager().getPermissions());
}
-
public void updatePermissions(Player player) {
this.updatePermissions(player, null);
@@ -361,6 +360,14 @@ public class BukkitPermissions { updatePermissions(player);
}
}
+
+ /**
+ * force Bukkit to update this Players permissions.
+ */
+ public void updatePlayer(Player player) {
+ if (player != null)
+ this.updatePermissions(player, null);
+ }
protected class PlayerEvents implements Listener {
@@ -370,7 +377,7 @@ public class BukkitPermissions { Player player = event.getPlayer();
// force GM to create the player if they are not already listed.
if (plugin.getWorldsHolder().getWorldData(player.getWorld().getName()).getUser(player.getName()) != null) {
- //setPlayer_join(false);
+ setPlayer_join(false);
updatePermissions(event.getPlayer());
}
setPlayer_join(false);
|