2012-05-17 10:25:02 +00:00
|
|
|
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-05-17 10:25:02 +00:00
|
|
|
{
|
2012-06-10 23:17:19 +00:00
|
|
|
user.sendMessage(_("unvanished"));
|
2012-05-17 10:25:02 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2012-06-10 23:17:19 +00:00
|
|
|
user.sendMessage(_("vanished"));
|
2012-05-17 10:25:02 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|