TF-EssentialsX/Essentials/src/com/earth2me/essentials/commands/Commandvanish.java

30 lines
558 B
Java
Raw Normal View History

package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
import org.bukkit.Server;
import org.bukkit.entity.Player;
public class Commandvanish extends EssentialsCommand
{
public Commandvanish()
{
super("vanish");
}
@Override
protected void run(Server server, User user, String commandLabel, String[] args) throws Exception
{
2012-06-10 23:17:19 +00:00
user.toggleVanished();
if (!user.isVanished())
{
2012-06-10 23:17:19 +00:00
user.sendMessage(_("unvanished"));
}
else
{
2012-06-10 23:17:19 +00:00
user.sendMessage(_("vanished"));
}
}
}