mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-04 03:25:50 +00:00
/vanish [on|off]
This commit is contained in:
parent
cafdb919e4
commit
0d56b700bf
1 changed files with 21 additions and 5 deletions
|
@ -15,6 +15,8 @@ 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
|
||||||
|
{
|
||||||
|
if (args.length < 1)
|
||||||
{
|
{
|
||||||
user.toggleVanished();
|
user.toggleVanished();
|
||||||
if (!user.isVanished())
|
if (!user.isVanished())
|
||||||
|
@ -26,4 +28,18 @@ public class Commandvanish extends EssentialsCommand
|
||||||
user.sendMessage(_("vanished"));
|
user.sendMessage(_("vanished"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (args.length > 0)
|
||||||
|
{
|
||||||
|
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…
Add table
Add a link
Reference in a new issue