This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
CommandIsVanish.cs
68 lines (58 loc) · 1.65 KB
/
CommandIsVanish.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
using Rocket.API;
using Rocket.Unturned.Chat;
using Rocket.Unturned.Player;
using System.Collections.Generic;
namespace IsAbusing
{
class CommandIsVanish : IRocketCommand
{
public static UnturnedPlayer player2;
public string Help
{
get { return "See if the user is in vanish."; }
}
public string Name
{
get { return "isvanish"; }
}
public string Syntax
{
get { return "[Player]"; }
}
public List<string> Aliases
{
get { return new List<string>(); }
}
public AllowedCaller AllowedCaller
{
get { return AllowedCaller.Both; }
}
public List<string> Permissions
{
get
{
return new List<string>() { "abuse.isvanish" };
}
}
public void Execute(IRocketPlayer caller, string[] command)
{
player2 = UnturnedPlayer.FromName(command[0]);
if (player2 != null)
{
if (player2.VanishMode)
{
UnturnedChat.Say(caller, player2.CharacterName + " has vanish enabled");
}
else
{
UnturnedChat.Say(caller, player2.CharacterName + " has vanish disabled");
}
}
else
{
UnturnedChat.Say(caller, "You may not have entered a player's name correctly or they are not in the server!");
UnturnedChat.Say(caller, "Correct usage: /isvanish PLAYERNAME");
}
}
}
}