summaryrefslogtreecommitdiffstats
path: root/EssentialsGroupManager
diff options
context:
space:
mode:
authormd_5 <md_5@bigpond.com>2012-06-21 18:27:21 +1000
committermd_5 <md_5@bigpond.com>2012-06-21 18:27:21 +1000
commit028b1e426f30871cb042c9a729f6df0561f5259d (patch)
tree8889c6f69fdf1684af7015a7445a70853b39e17d /EssentialsGroupManager
parentecc2e17ff7ee5d718f0295cfb6ed125b59d05e34 (diff)
parentf8d63373645ef36f41f9fd9de29a7d717c0fc6a5 (diff)
downloadEssentials-028b1e426f30871cb042c9a729f6df0561f5259d.tar
Essentials-028b1e426f30871cb042c9a729f6df0561f5259d.tar.gz
Essentials-028b1e426f30871cb042c9a729f6df0561f5259d.tar.lz
Essentials-028b1e426f30871cb042c9a729f6df0561f5259d.tar.xz
Essentials-028b1e426f30871cb042c9a729f6df0561f5259d.zip
Merge remote-tracking branch 'origin/groupmanager'
Diffstat (limited to 'EssentialsGroupManager')
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/data/User.java5
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java8
2 files changed, 9 insertions, 4 deletions
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/data/User.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/data/User.java
index c10658fb0..6c74c2e50 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/data/User.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/data/User.java
@@ -256,11 +256,10 @@ public class User extends DataUnit implements Cloneable {
}
}
+
public User updatePlayer(Player player) {
- if (player != null) {
- bukkitPlayer = player;
- }
+ bukkitPlayer = player;
return this;
}
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java
index e8322c391..05e152286 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java
@@ -31,6 +31,7 @@ import java.util.Set;
import java.util.WeakHashMap;
import org.anjocaido.groupmanager.GroupManager;
+import org.anjocaido.groupmanager.data.User;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
@@ -144,6 +145,11 @@ public class BukkitPermissions {
if (player == null || !GroupManager.isLoaded()) {
return;
}
+
+ // Reset the User objects player reference.
+ User user = plugin.getWorldsHolder().getWorldData(player.getWorld().getName()).getUser(player.getName());
+ if (user != null)
+ user.updatePlayer(player);
PermissionAttachment attachment;
@@ -440,7 +446,7 @@ public class BukkitPermissions {
public void onPlayerKick(PlayerKickEvent event) {
Player player = event.getPlayer();
-
+
/*
* force remove any attachments as bukkit may not
*/