summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElgarL <ElgarL@Palmergames.com>2014-06-20 22:33:25 +0100
committerElgarL <ElgarL@Palmergames.com>2014-06-20 22:33:25 +0100
commit3137c9ae10e5b11e2ee873eae15f830def5b536d (patch)
treee354ac5c960017cc23d5b44194bf30150f67f61c
parent194de920cf597e8ad92784653792108296a96059 (diff)
downloadEssentials-3137c9ae10e5b11e2ee873eae15f830def5b536d.tar
Essentials-3137c9ae10e5b11e2ee873eae15f830def5b536d.tar.gz
Essentials-3137c9ae10e5b11e2ee873eae15f830def5b536d.tar.lz
Essentials-3137c9ae10e5b11e2ee873eae15f830def5b536d.tar.xz
Essentials-3137c9ae10e5b11e2ee873eae15f830def5b536d.zip
Ensure GM reports the same permissions as Bukkit.
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java2
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java8
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java2
3 files changed, 8 insertions, 4 deletions
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java
index 36dbe8294..5efc4b057 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java
@@ -2219,7 +2219,7 @@ public class GroupManager extends JavaPlugin {
} else {
for (Player player : players) {
- match.add(player.getName()); //.getUniqueId().toString());
+ match.add(player.getUniqueId().toString());
}
}
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java
index 3a8aec335..af88bc833 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java
@@ -130,7 +130,7 @@ public class WorldDataHolder {
User user = getUsers().get(uid);
- if (user.getLastName().equalsIgnoreCase(userId)) {
+ if ((user != null) && user.getLastName().equalsIgnoreCase(userId)) {
return user;
}
}
@@ -156,7 +156,8 @@ public class WorldDataHolder {
User user = getUsers().get(uUID.toLowerCase());
if (user != null) {
-
+ System.out.println("Matched: " + uUID);
+ System.out.println("In World: " + this.getName());
user.setLastName(currentName);
return user;
@@ -177,6 +178,9 @@ public class WorldDataHolder {
return getUsers().get(uUID.toLowerCase());
}
+ System.out.println("New user: " + uUID);
+ System.out.println("In World: " + this.getName());
+
// No user account found so create a new one.
User newUser = createUser(uUID);
newUser.setLastName(currentName);
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java
index 36ac1e8c9..7b50f13ad 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java
@@ -150,7 +150,7 @@ public class BukkitPermissions {
String uuid = player.getUniqueId().toString();
// Reset the User objects player reference.
- User user = plugin.getWorldsHolder().getWorldData(player.getWorld().getName()).getUser(player.getUniqueId().toString(), player.getName());
+ User user = plugin.getWorldsHolder().getWorldData(player.getWorld().getName()).getUser(uuid, player.getName());
if (user != null)
user.updatePlayer(player);