summaryrefslogtreecommitdiffstats
path: root/EssentialsPermissionsCommands
diff options
context:
space:
mode:
authorKHobbits <KHobbits@KHobbits-PC>2011-06-08 17:20:51 +0100
committerKHobbits <KHobbits@KHobbits-PC>2011-06-08 17:20:51 +0100
commit8136179e5503553e7f360fba014c6263ab5178b2 (patch)
treea86e28a27a33de12a2f3258dd31480e14881dcae /EssentialsPermissionsCommands
parentdea44d7cbcac7571fef43c98a98975853fb08201 (diff)
downloadEssentials-8136179e5503553e7f360fba014c6263ab5178b2.tar
Essentials-8136179e5503553e7f360fba014c6263ab5178b2.tar.gz
Essentials-8136179e5503553e7f360fba014c6263ab5178b2.tar.lz
Essentials-8136179e5503553e7f360fba014c6263ab5178b2.tar.xz
Essentials-8136179e5503553e7f360fba014c6263ab5178b2.zip
Adding some GM aliases
Diffstat (limited to 'EssentialsPermissionsCommands')
-rw-r--r--EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmangadd.java29
-rw-r--r--EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmangaddi.java29
-rw-r--r--EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmangdel.java28
-rw-r--r--EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmangdeli.java29
-rw-r--r--EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanuadd.java1
-rw-r--r--EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanuaddsub.java29
-rw-r--r--EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanudel.java28
-rw-r--r--EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanudelsub.java29
8 files changed, 202 insertions, 0 deletions
diff --git a/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmangadd.java b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmangadd.java
new file mode 100644
index 000000000..c95c6a5cf
--- /dev/null
+++ b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmangadd.java
@@ -0,0 +1,29 @@
+package com.earth2me.essentials.permissions;
+
+import com.earth2me.essentials.commands.EssentialsCommand;
+import com.earth2me.essentials.commands.NotEnoughArgumentsException;
+import org.bukkit.Server;
+import org.bukkit.command.CommandSender;
+
+
+public class Commandmangadd extends EssentialsCommand
+{
+ public Commandmangadd()
+ {
+ super("mangadd");
+ }
+
+ @Override
+ protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ {
+ if (args.length < 1)
+ {
+ throw new NotEnoughArgumentsException();
+ }
+ final String group = args[0];
+
+ ess.getServer().dispatchCommand(sender, "/permissions g:"+group+" create");
+ }
+
+
+}
diff --git a/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmangaddi.java b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmangaddi.java
new file mode 100644
index 000000000..ea250de6e
--- /dev/null
+++ b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmangaddi.java
@@ -0,0 +1,29 @@
+package com.earth2me.essentials.permissions;
+
+import com.earth2me.essentials.commands.EssentialsCommand;
+import com.earth2me.essentials.commands.NotEnoughArgumentsException;
+import org.bukkit.Server;
+import org.bukkit.command.CommandSender;
+
+
+public class Commandmangaddi extends EssentialsCommand
+{
+ public Commandmangaddi()
+ {
+ super("mangaddi");
+ }
+
+ @Override
+ protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ {
+ if (args.length < 2)
+ {
+ throw new NotEnoughArgumentsException();
+ }
+ final String target = args[0];
+ final String group = args[1];
+ ess.getServer().dispatchCommand(sender, "/permissions g:"+target+" parents add "+group+"");
+ }
+
+
+}
diff --git a/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmangdel.java b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmangdel.java
new file mode 100644
index 000000000..32126c564
--- /dev/null
+++ b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmangdel.java
@@ -0,0 +1,28 @@
+package com.earth2me.essentials.permissions;
+
+import com.earth2me.essentials.commands.EssentialsCommand;
+import com.earth2me.essentials.commands.NotEnoughArgumentsException;
+import org.bukkit.Server;
+import org.bukkit.command.CommandSender;
+
+
+public class Commandmangdel extends EssentialsCommand
+{
+ public Commandmangdel()
+ {
+ super("mangdel");
+ }
+
+ @Override
+ protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ {
+ if (args.length < 1)
+ {
+ throw new NotEnoughArgumentsException();
+ }
+ final String group = args[0];
+ ess.getServer().dispatchCommand(sender, "/permissions g:"+group+" delete");
+ }
+
+
+}
diff --git a/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmangdeli.java b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmangdeli.java
new file mode 100644
index 000000000..4d44d40da
--- /dev/null
+++ b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmangdeli.java
@@ -0,0 +1,29 @@
+package com.earth2me.essentials.permissions;
+
+import com.earth2me.essentials.commands.EssentialsCommand;
+import com.earth2me.essentials.commands.NotEnoughArgumentsException;
+import org.bukkit.Server;
+import org.bukkit.command.CommandSender;
+
+
+public class Commandmangdeli extends EssentialsCommand
+{
+ public Commandmangdeli()
+ {
+ super("mangdeli");
+ }
+
+ @Override
+ protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ {
+ if (args.length < 2)
+ {
+ throw new NotEnoughArgumentsException();
+ }
+ final String target = args[0];
+ final String group = args[1];
+ ess.getServer().dispatchCommand(sender, "/permissions g:"+target+" parents remove "+group+"");
+ }
+
+
+}
diff --git a/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanuadd.java b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanuadd.java
index 8515aaea7..3f35b74bc 100644
--- a/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanuadd.java
+++ b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanuadd.java
@@ -22,6 +22,7 @@ public class Commandmanuadd extends EssentialsCommand
}
final String player = args[0];
final String group = args[1];
+ //TODO: Make this command add a player if it doesnt exist /permissions +player+ create
ess.getServer().dispatchCommand(sender, "/permissions "+player+" parents add "+group+"");
}
diff --git a/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanuaddsub.java b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanuaddsub.java
new file mode 100644
index 000000000..9c730a53b
--- /dev/null
+++ b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanuaddsub.java
@@ -0,0 +1,29 @@
+package com.earth2me.essentials.permissions;
+
+import com.earth2me.essentials.commands.EssentialsCommand;
+import com.earth2me.essentials.commands.NotEnoughArgumentsException;
+import org.bukkit.Server;
+import org.bukkit.command.CommandSender;
+
+
+public class Commandmanuaddsub extends EssentialsCommand
+{
+ public Commandmanuaddsub()
+ {
+ super("manuaddsub");
+ }
+
+ @Override
+ protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ {
+ if (args.length < 2)
+ {
+ throw new NotEnoughArgumentsException();
+ }
+ final String player = args[0];
+ final String group = args[1];
+ ess.getServer().dispatchCommand(sender, "/permissions "+player+" parents add "+group+"");
+ }
+
+
+}
diff --git a/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanudel.java b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanudel.java
new file mode 100644
index 000000000..39f0867ce
--- /dev/null
+++ b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanudel.java
@@ -0,0 +1,28 @@
+package com.earth2me.essentials.permissions;
+
+import com.earth2me.essentials.commands.EssentialsCommand;
+import com.earth2me.essentials.commands.NotEnoughArgumentsException;
+import org.bukkit.Server;
+import org.bukkit.command.CommandSender;
+
+
+public class Commandmanudel extends EssentialsCommand
+{
+ public Commandmanudel()
+ {
+ super("manudel");
+ }
+
+ @Override
+ protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ {
+ if (args.length < 1)
+ {
+ throw new NotEnoughArgumentsException();
+ }
+ final String player = args[0];
+ ess.getServer().dispatchCommand(sender, "/permissions "+player+" delete");
+ }
+
+
+}
diff --git a/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanudelsub.java b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanudelsub.java
new file mode 100644
index 000000000..65f4b091e
--- /dev/null
+++ b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanudelsub.java
@@ -0,0 +1,29 @@
+package com.earth2me.essentials.permissions;
+
+import com.earth2me.essentials.commands.EssentialsCommand;
+import com.earth2me.essentials.commands.NotEnoughArgumentsException;
+import org.bukkit.Server;
+import org.bukkit.command.CommandSender;
+
+
+public class Commandmanudelsub extends EssentialsCommand
+{
+ public Commandmanudelsub()
+ {
+ super("manudel");
+ }
+
+ @Override
+ protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ {
+ if (args.length < 2)
+ {
+ throw new NotEnoughArgumentsException();
+ }
+ final String player = args[0];
+ final String group = args[1];
+ ess.getServer().dispatchCommand(sender, "/permissions "+player+" parents remove "+group+"");
+ }
+
+
+}