summaryrefslogtreecommitdiffstats
path: root/EssentialsGroupManager/src
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
commitf1a7be09c2b6ae5a7a48f489cdabad3ac2a89b3a (patch)
tree167a85bcca0e6ddba5d4489fd5b333097edbcaa4 /EssentialsGroupManager/src
parent0742ca23c1096babf1634123e2f4d65f192ec66f (diff)
parent5683ea35fc60eafe70753fb9b2261b8537ed0b0f (diff)
downloadEssentials-f1a7be09c2b6ae5a7a48f489cdabad3ac2a89b3a.tar
Essentials-f1a7be09c2b6ae5a7a48f489cdabad3ac2a89b3a.tar.gz
Essentials-f1a7be09c2b6ae5a7a48f489cdabad3ac2a89b3a.tar.lz
Essentials-f1a7be09c2b6ae5a7a48f489cdabad3ac2a89b3a.tar.xz
Essentials-f1a7be09c2b6ae5a7a48f489cdabad3ac2a89b3a.zip
Merge remote-tracking branch 'origin/groupmanager'
Diffstat (limited to 'EssentialsGroupManager/src')
-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
*/