summaryrefslogtreecommitdiffstats
path: root/Essentials/src/com/earth2me/essentials/commands/Commandsuicide.java
blob: ca9fee47bbf7a9f9c87bff67e56342922decf471 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package com.earth2me.essentials.commands;

import org.bukkit.Server;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;


public class Commandsuicide extends EssentialsCommand
{
	public Commandsuicide()
	{
		super("suicide");
	}

	@Override
	public void run(Server server, User user, String commandLabel, String[] args) throws Exception
	{
		user.setHealth(0);
		user.sendMessage(Util.i18n("suicideMessage"));
		ess.broadcastMessage(user,
								Util.format("suicideSuccess",user.getDisplayName()));
	}
}