summaryrefslogtreecommitdiffstats
path: root/EssentialsXMPP/src/com/earth2me/essentials/xmpp/Commandsetxmpp.java
blob: c4702b969a09132b4773e3f7a2d8b332334135ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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(final Server server, final User user, final String commandLabel, final String[] args) throws NotEnoughArgumentsException
	{
		if (args.length < 1)
		{
			throw new NotEnoughArgumentsException();
		}

		EssentialsXMPP.getInstance().setAddress(user, args[0]);
	}
}