summaryrefslogtreecommitdiffstats
path: root/EssentialsGroupManager/src
diff options
context:
space:
mode:
authorElgarL <ElgarL@palmergames.com>2012-04-02 21:12:19 +0100
committerElgarL <ElgarL@palmergames.com>2012-04-02 21:12:19 +0100
commit5ad8f0ee8eb4e6b5c753de2ee4bba4f82511e57c (patch)
treee8f9600a1996a0481754f7ada8804ee1e468ae6a /EssentialsGroupManager/src
parentdd436fa121f99fd3de801cd31b5f15faea436e4a (diff)
downloadEssentials-5ad8f0ee8eb4e6b5c753de2ee4bba4f82511e57c.tar
Essentials-5ad8f0ee8eb4e6b5c753de2ee4bba4f82511e57c.tar.gz
Essentials-5ad8f0ee8eb4e6b5c753de2ee4bba4f82511e57c.tar.lz
Essentials-5ad8f0ee8eb4e6b5c753de2ee4bba4f82511e57c.tar.xz
Essentials-5ad8f0ee8eb4e6b5c753de2ee4bba4f82511e57c.zip
Added a new permission node 'groupmanager.op'. This will cause players
with this node to be treated as op's when using GroupManager commands (they will still require each commands permission node to use them).
Diffstat (limited to 'EssentialsGroupManager/src')
-rw-r--r--EssentialsGroupManager/src/Changelog.txt4
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java2
-rw-r--r--EssentialsGroupManager/src/plugin.yml7
3 files changed, 10 insertions, 3 deletions
diff --git a/EssentialsGroupManager/src/Changelog.txt b/EssentialsGroupManager/src/Changelog.txt
index c6f45bb01..fd9d8ef35 100644
--- a/EssentialsGroupManager/src/Changelog.txt
+++ b/EssentialsGroupManager/src/Changelog.txt
@@ -157,4 +157,6 @@ v 1.9:
- Update GlobalGroups.yml for new/changed Towny permission nodes.
- Stop attempting to push empty permissions when players edit the yml's incorrectly.
- Catch errors caused by bad indentation in yml's.
- - Force remove player attachments on disconnect, and tidyup during player join in case of any errors. Fixes a bug of losing permissions. \ No newline at end of file
+ - Force remove player attachments on disconnect, and tidyup during player join in case of any errors. Fixes a bug of losing permissions.
+ - Added a new permission node 'groupmanager.op'. This will cause players with this node to be treated as op's when
+ using GroupManager commands (they will still require each commands permission node to use them). \ No newline at end of file
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java
index 09ea3b247..8bd346735 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java
@@ -303,7 +303,7 @@ public class GroupManager extends JavaPlugin {
senderPlayer = (Player) sender;
senderUser = worldsHolder.getWorldData(senderPlayer).getUser(senderPlayer.getName());
senderGroup = senderUser.getGroup();
- isOpOverride = (isOpOverride && senderPlayer.isOp());
+ isOpOverride = (isOpOverride && (senderPlayer.isOp() || worldsHolder.getWorldPermissions(senderPlayer).has(senderPlayer, "groupmanager.op")));
System.out.println("[PLAYER_COMMAND] " + senderPlayer.getName() + ": /" + commandLabel + " " + Tasks.join(args, " "));
if (isOpOverride || worldsHolder.getWorldPermissions(senderPlayer).has(senderPlayer, "groupmanager." + cmd.getName())) {
diff --git a/EssentialsGroupManager/src/plugin.yml b/EssentialsGroupManager/src/plugin.yml
index bf42a08c3..f7faa5896 100644
--- a/EssentialsGroupManager/src/plugin.yml
+++ b/EssentialsGroupManager/src/plugin.yml
@@ -163,4 +163,9 @@ commands:
manclear:
description: Clear world selection. Next commands will work on your world.
usage: /<command>
- permissions: groupmanager.manclear \ No newline at end of file
+ permissions: groupmanager.manclear
+
+Permissions:
+ groupmanager.op:
+ description: User is treated as an op when using the GroupManager commands.
+ default: false \ No newline at end of file