-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConfig.cs
31 lines (25 loc) · 933 Bytes
/
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
using CounterStrikeSharp.API.Core;
using System.Text.Json.Serialization;
namespace BannedWords
{
public class BanSettings
{
[JsonPropertyName("PlayerBanType")]
public string PlayerBanType { get; set; } = "silence";
[JsonPropertyName("DurationInMinutes")]
public int DurationInMinutes { get; set; } = 5;
}
public class BannedWordsConfig : BasePluginConfig
{
[JsonPropertyName("BanSettings")]
public BanSettings BanSettings { get; set; } = new BanSettings();
[JsonPropertyName("BannedWords")]
public string[] BannedWords { get; set; } = new[] { "word1", "word2", "word3" };
[JsonPropertyName("ConfigVersion")]
public override int Version { get; set; } = 1;
}
public partial class BannedWords : BasePlugin, IPluginConfig<BannedWordsConfig>
{
public required BannedWordsConfig Config { get; set; }
}
}