-
Notifications
You must be signed in to change notification settings - Fork 2
/
Config.cs
57 lines (49 loc) · 1.4 KB
/
Config.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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Rocket.API;
using System.Xml.Serialization;
namespace Countdown
{
public class Config : IRocketPluginConfiguration
{
public Event _events;
public bool DDMMYYYY;
public void LoadDefaults()
{
DDMMYYYY = true;
_events = new Event()
{
EventList = new List<Time> { new Time("Wipe", 2017, 1, 10, 3, 30, "Clearing the map"), new Time("Christmas", 2017, 12, 25, 0, 30, "Festive Event")}
};
}
public class Event
{
public Event() { }
[XmlArrayItem(ElementName = "Event")]
public List<Time> EventList;
}
public class Time
{
public Time() { }
public Time(string _name, int _year, int _month, int _day, int _hour, int _minutes, string _info)
{
Year = _year;
Name = _name;
Month = _month;
Day = _day;
Hour = _hour;
Minutes = _minutes;
info = _info;
}
public string Name;
public int Year;
public int Month;
public int Day;
public int Hour;
public int Minutes;
public string info;
}
}
}