mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-12 04:20:41 +00:00
Merge pull request #81 from kukelekuuk00/master
/vanish [on|off] - thanks kukelekuuk00
This commit is contained in:
commit
31001d6b1a
1 changed files with 21 additions and 5 deletions
|
@ -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[0].contains("on") && !user.isVanished())
|
||||||
|
{
|
||||||
|
user.toggleVanished();
|
||||||
|
user.sendMessage(_("vanished"));
|
||||||
|
}
|
||||||
|
if (args[0].contains("off") && user.isVanished())
|
||||||
|
{
|
||||||
|
user.toggleVanished();
|
||||||
|
user.sendMessage(_("unvanished"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue