summaryrefslogtreecommitdiffstats
path: root/EssentialsGroupManager
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
commite2e51c9c95f95906ad370bee7bcf698918b9a20b (patch)
tree3e5b1880a03ed3fabf7e337da2190cc5ef9aaab2 /EssentialsGroupManager
parent3f732725245955da9e3e2527a00a6150bec18044 (diff)
downloadEssentials-e2e51c9c95f95906ad370bee7bcf698918b9a20b.tar
Essentials-e2e51c9c95f95906ad370bee7bcf698918b9a20b.tar.gz
Essentials-e2e51c9c95f95906ad370bee7bcf698918b9a20b.tar.lz
Essentials-e2e51c9c95f95906ad370bee7bcf698918b9a20b.tar.xz
Essentials-e2e51c9c95f95906ad370bee7bcf698918b9a20b.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')
-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