diff options
author | snowleo <schneeleo@gmail.com> | 2011-06-07 00:54:36 +0200 |
---|---|---|
committer | snowleo <schneeleo@gmail.com> | 2011-06-07 00:54:36 +0200 |
commit | fb6f13cc883f80b1a9655da054009d2be9b3fb8a (patch) | |
tree | d678ca3f03976185cbadfe797565ab8d5a5f12ef /EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanuadd.java | |
parent | cc22792d7904ed93a676cecbb31201ea0163bfab (diff) | |
download | Essentials-fb6f13cc883f80b1a9655da054009d2be9b3fb8a.tar Essentials-fb6f13cc883f80b1a9655da054009d2be9b3fb8a.tar.gz Essentials-fb6f13cc883f80b1a9655da054009d2be9b3fb8a.tar.lz Essentials-fb6f13cc883f80b1a9655da054009d2be9b3fb8a.tar.xz Essentials-fb6f13cc883f80b1a9655da054009d2be9b3fb8a.zip |
Cleanup
/manuadd command
Diffstat (limited to 'EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanuadd.java')
-rw-r--r-- | EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanuadd.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanuadd.java b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanuadd.java index 1f41b890a..8515aaea7 100644 --- a/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanuadd.java +++ b/EssentialsPermissionsCommands/src/com/earth2me/essentials/permissions/Commandmanuadd.java @@ -1,6 +1,7 @@ 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; @@ -15,7 +16,13 @@ public class Commandmanuadd extends EssentialsCommand @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+""); } |