summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsnowleo <schneeleo@gmail.com>2011-11-29 21:38:00 +0100
committersnowleo <schneeleo@gmail.com>2011-11-29 21:38:00 +0100
commite169e954ba631f21c90b7435778ec6805e75c972 (patch)
treeefbe03792c1f2e583860f02eb500e576b6079882
parentaed160b5fc88c44d781fa46454d7c16f8174984e (diff)
parent5f0936cf44185ea4116dd3c396b0909e008d9c6b (diff)
downloadEssentials-e169e954ba631f21c90b7435778ec6805e75c972.tar
Essentials-e169e954ba631f21c90b7435778ec6805e75c972.tar.gz
Essentials-e169e954ba631f21c90b7435778ec6805e75c972.tar.lz
Essentials-e169e954ba631f21c90b7435778ec6805e75c972.tar.xz
Essentials-e169e954ba631f21c90b7435778ec6805e75c972.zip
Merge branch 'refs/heads/groupmanager'
-rw-r--r--EssentialsGroupManager/src/config.yml1
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/GlobalGroups.java8
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java10
3 files changed, 10 insertions, 9 deletions
diff --git a/EssentialsGroupManager/src/config.yml b/EssentialsGroupManager/src/config.yml
index d9f469477..2fe5e509c 100644
--- a/EssentialsGroupManager/src/config.yml
+++ b/EssentialsGroupManager/src/config.yml
@@ -31,6 +31,7 @@ settings:
# user/groups permissions as the parent.
world:
- world_nether
+ - world_the_end
- world2
- world3
# world4:
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GlobalGroups.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GlobalGroups.java
index 861c5e3d4..d7971d424 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GlobalGroups.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GlobalGroups.java
@@ -294,7 +294,7 @@ public class GlobalGroups {
*/
public boolean hasPermission(String groupName, String permissionNode) {
- if (!hasGroup(groupName.toLowerCase()))
+ if (!hasGroup(groupName))
return false;
return groups.get(groupName.toLowerCase()).hasSamePermissionNode(permissionNode);
@@ -315,7 +315,7 @@ public class GlobalGroups {
result.askedPermission = permissionNode;
result.resultType = PermissionCheckResult.Type.NOTFOUND;
- if (!hasGroup(groupName.toLowerCase()))
+ if (!hasGroup(groupName))
return result;
Group tempGroup = groups.get(groupName.toLowerCase());
@@ -337,7 +337,7 @@ public class GlobalGroups {
* @return List of all group names
*/
public List<String> getGroupsPermissions(String groupName) {
- if (!hasGroup(groupName.toLowerCase()))
+ if (!hasGroup(groupName))
return null;
return groups.get(groupName.toLowerCase()).getPermissionList();
@@ -374,7 +374,7 @@ public class GlobalGroups {
* @return Group object
*/
public Group getGroup(String groupName) {
- if (!hasGroup(groupName.toLowerCase()))
+ if (!hasGroup(groupName))
return null;
return groups.get(groupName.toLowerCase());
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java
index 59c5949f4..2b6a80da6 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java
@@ -195,7 +195,7 @@ public class WorldDataHolder {
* @return a group if it is found. null if not found.
*/
public Group getGroup(String groupName) {
- if (groupName.startsWith("g:"))
+ if (groupName.toLowerCase().startsWith("g:"))
return GroupManager.getGlobalGroups().getGroup(groupName);
else
return groups.get(groupName.toLowerCase());
@@ -208,7 +208,7 @@ public class WorldDataHolder {
* @return true if exists. false if not.
*/
public boolean groupExists(String groupName) {
- if (groupName.startsWith("g:"))
+ if (groupName.toLowerCase().startsWith("g:"))
return GroupManager.getGlobalGroups().hasGroup(groupName);
else
return groups.containsKey(groupName.toLowerCase());
@@ -219,7 +219,7 @@ public class WorldDataHolder {
* @param groupToAdd
*/
public void addGroup(Group groupToAdd) {
- if (groupToAdd.getName().startsWith("g:")) {
+ if (groupToAdd.getName().toLowerCase().startsWith("g:")) {
GroupManager.getGlobalGroups().addGroup(groupToAdd);
return;
}
@@ -238,7 +238,7 @@ public class WorldDataHolder {
* @return true if had something to remove. false the group was default or non-existant
*/
public boolean removeGroup(String groupName) {
- if (groupName.startsWith("g:")) {
+ if (groupName.toLowerCase().startsWith("g:")) {
return GroupManager.getGlobalGroups().removeGroup(groupName);
}
@@ -278,7 +278,7 @@ public class WorldDataHolder {
* @return null if group already exists. or new Group
*/
public Group createGroup(String groupName) {
- if (groupName.startsWith("g:")) {
+ if (groupName.toLowerCase().startsWith("g:")) {
Group newGroup = new Group(groupName);
return GroupManager.getGlobalGroups().newGroup(newGroup);
}