/
VoteSettings.cs
62 lines (48 loc) · 1.8 KB
/
VoteSettings.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
using System.Xml.Serialization;
namespace Arechi.CallVote
{
public class VoteSettings : IVoteSettings
{
[XmlAttribute("Name")]
public string Name { get; set; }
[XmlAttribute("Alias")]
public string Alias { get; set; }
[XmlAttribute("Command")]
public string Command { get; set; }
[XmlAttribute("MinimumArguments")]
public int MinimumArguments { get; set; }
[XmlAttribute("Color")]
public string Color { get; set; }
[XmlAttribute("Icon")]
public string Icon { get; set; }
[XmlAttribute("Enabled")]
public bool Enabled { get; set; }
[XmlAttribute("MinimumPlayers")]
public int MinimumPlayers { get; set; }
[XmlAttribute("RequiredPercent")]
public int RequiredPercent { get; set; }
[XmlAttribute("Timer")]
public int Timer { get; set; }
[XmlAttribute("CooldownTime")]
public int CooldownTime { get; set; }
[XmlAttribute("RequirePermission")]
public bool RequirePermission { get; set; }
public VoteSettings() { }
public VoteSettings(string name, string alias, string command, int minArgs = 0, string color = "#fff333", string icon = "",
bool enabled = true, int minPlayers = 1, int reqPercent = 50, int timer = 60, int cooldown = 300, bool requirePermission = false)
{
Name = name;
Alias = alias;
Command = command;
MinimumArguments = minArgs;
Color = color;
Icon = icon;
Enabled = enabled;
MinimumPlayers = minPlayers;
RequiredPercent = reqPercent;
Timer = timer;
CooldownTime = cooldown;
RequirePermission = requirePermission;
}
}
}