diff options
Diffstat (limited to 'EssentialsXMPP/src/com/earth2me/essentials/xmpp/Commandsetxmpp.java')
-rw-r--r-- | EssentialsXMPP/src/com/earth2me/essentials/xmpp/Commandsetxmpp.java | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/EssentialsXMPP/src/com/earth2me/essentials/xmpp/Commandsetxmpp.java b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/Commandsetxmpp.java new file mode 100644 index 000000000..bb81d8ec0 --- /dev/null +++ b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/Commandsetxmpp.java @@ -0,0 +1,26 @@ +package com.earth2me.essentials.xmpp; + +import com.earth2me.essentials.User; +import com.earth2me.essentials.commands.EssentialsCommand; +import com.earth2me.essentials.commands.NotEnoughArgumentsException; +import org.bukkit.Server; + + +public class Commandsetxmpp extends EssentialsCommand +{ + public Commandsetxmpp() + { + super("setxmpp"); + } + + @Override + protected void run(Server server, User user, String commandLabel, String[] args) throws Exception + { + if (args.length < 1) + { + throw new NotEnoughArgumentsException(); + } + + EssentialsXMPP.getInstance().setAddress(user, args[0]); + } +} |