-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConfigs.cs
More file actions
33 lines (31 loc) · 1.35 KB
/
Configs.cs
File metadata and controls
33 lines (31 loc) · 1.35 KB
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
using Qurre.API.Addons;
using Qurre.API.Attributes;
using System.Collections.Generic;
namespace ClansTags
{
public static class Configs
{
internal static JsonConfig Config { get; private set; }
public static List<string> ClansTags { get; private set; }
public static bool EnableJoinMessage { get; private set; }
public static string JoinMessage { get; private set; }
public static ushort TimeMessageDisplay { get; private set; }
[EventMethod(4001u, 0)]
internal static void LoadReloadConfig()
{
if (Config == null)
{
Config = new JsonConfig("ClansTags");
}
ClansTags = Config.SafeGetValue("ClansTags", new List<string>()
{
"PLM",
"FFCL",
"KPB"
}, "Clan tags are available for installation");
EnableJoinMessage = Config.SafeGetValue("EnableJoinMessage", true, "Will greeting players with clan tags be included?");
JoinMessage = Config.SafeGetValue("JoinMessage", "<color=green>A member of the<color=red> <<%tag%>> </color>clan logged into the server!</color>", "A message at the player's entrance");
TimeMessageDisplay = Config.SafeGetValue("TimeMessageDisplay", (ushort) 10, "How long will the message be displayed?");
}
}
}