mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-18 16:45:37 +01:00
/vanish [on|off]
This commit is contained in:
parent
cafdb919e4
commit
0d56b700bf
@ -16,14 +16,30 @@ public class Commandvanish extends EssentialsCommand
|
|||||||
@Override
|
@Override
|
||||||
protected void run(Server server, User user, String commandLabel, String[] args) throws Exception
|
protected void run(Server server, User user, String commandLabel, String[] args) throws Exception
|
||||||
{
|
{
|
||||||
user.toggleVanished();
|
if (args.length < 1)
|
||||||
if (!user.isVanished())
|
|
||||||
{
|
{
|
||||||
user.sendMessage(_("unvanished"));
|
user.toggleVanished();
|
||||||
|
if (!user.isVanished())
|
||||||
|
{
|
||||||
|
user.sendMessage(_("unvanished"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
user.sendMessage(_("vanished"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
if (args.length > 0)
|
||||||
{
|
{
|
||||||
user.sendMessage(_("vanished"));
|
if (args[1].contains("on") && !user.isVanished())
|
||||||
|
{
|
||||||
|
user.toggleVanished();
|
||||||
|
user.sendMessage(_("vanished"));
|
||||||
|
}
|
||||||
|
if (args[1].contains("off") && user.isVanished())
|
||||||
|
{
|
||||||
|
user.toggleVanished();
|
||||||
|
user.sendMessage(_("unvanished"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user