forked from Alexr03/IsAbusing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCommandIsGod.cs
67 lines (59 loc) · 1.5 KB
/
CommandIsGod.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
using Rocket.API;
using Rocket.Unturned.Chat;
using Rocket.Unturned.Player;
using SDG.Provider;
using SDG.Unturned;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;
namespace IsAbusing
{
class CommandIsGod : IRocketCommand
{
public static UnturnedPlayer player2;
public string Help
{
get { return "See's if the user is in godmode."; }
}
public string Name
{
get { return "isgod"; }
}
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.isgod" };
}
}
public void Execute(IRocketPlayer caller, string[] command)
{
if (command.Length == 1)
{
player2 = UnturnedPlayer.FromName(command[0]);
if (player2.GodMode == true)
{
UnturnedChat.Say(player2.CharacterName + " Has godmode enabled");
}
else
{
UnturnedChat.Say(player2.CharacterName + " Has godmode disabled");
}
}
}
}
}