From 8136179e5503553e7f360fba014c6263ab5178b2 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Wed, 8 Jun 2011 17:20:51 +0100 Subject: Adding some GM aliases --- .../essentials/permissions/Commandmangadd.java | 29 ++++++++++++++++++++++ .../essentials/permissions/Commandmangaddi.java | 29 ++++++++++++++++++++++ .../essentials/permissions/Commandmangdel.java | 28 +++++++++++++++++++++ .../essentials/permissions/Commandmangdeli.java | 29 ++++++++++++++++++++++ .../essentials/permissions/Commandmanuadd.java | 1 + .../essentials/permissions/Commandmanuaddsub.java | 29 ++++++++++++++++++++++ .../essentials/permissions/Commandmanudel.java | 28 +++++++++++++++++++++ .../essentials/permissions/Commandmanudelsub.java | 29 ++++++++++++++++++++++ 8 files changed, 202 insertions(+) create mode 100644 EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmangadd.java create mode 100644 EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmangaddi.java create mode 100644 EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmangdel.java create mode 100644 EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmangdeli.java create mode 100644 EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanuaddsub.java create mode 100644 EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanudel.java create mode 100644 EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanudelsub.java (limited to 'EssentialsPermissionsCommands') 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+""); + } + + +} -- cgit v1.2.3