-
Notifications
You must be signed in to change notification settings - Fork 4
/
SpawnProtectionConfig.cs
66 lines (61 loc) · 2.39 KB
/
SpawnProtectionConfig.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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Rocket.API;
using System.Xml.Serialization;
namespace RocketModSpawnProtection
{
public class SpawnProtectionConfig : IRocketPluginConfiguration
{
public bool GiveVanishWhileProtected;
public bool CancelProtectionOnEquip;
public bool CancelProtectionIfInVehicleWithOthers;
public bool CancelOnBedRespawn;
public bool GiveProtectionOnJoin;
public bool GiveProtectionOnRespawn;
public bool AutoRepairProtectedPlayersVehicles;
public bool SendProtectionMessages;
public bool ForceDequipWhileProtected;
public bool EnableProtectionBasedOnDist;
public bool DisableProtectionBasedOnDist;
public bool EnsureGodmodeWhileProtected;
public int ProtDisableDist;
public int ProtEnableDist;
public int SpawnPositionGetDelay;
public int ProtectionTime;
public int MaxProtectionVanishTime;
public double ProtectionVanishDelayMilliseconds;
public string ProtectionMessageColor;
public string CommandMessageColor;
[XmlArrayItem(ElementName = "ID")]
public List<ushort> WhitelistedItems;
[XmlArrayItem(ElementName = "steamid")]
public List<ulong> NoSpawnProtection;
public void LoadDefaults()
{
GiveVanishWhileProtected = true;
CancelProtectionOnEquip = true;
CancelProtectionIfInVehicleWithOthers = true;
CancelOnBedRespawn = true;
GiveProtectionOnJoin = false;
GiveProtectionOnRespawn = true;
AutoRepairProtectedPlayersVehicles = true;
SendProtectionMessages = true;
ForceDequipWhileProtected = false;
EnableProtectionBasedOnDist = false;
DisableProtectionBasedOnDist = false;
EnsureGodmodeWhileProtected = false;
ProtDisableDist = 100;
ProtEnableDist = 100;
SpawnPositionGetDelay = 1100;
ProtectionTime = 30;
MaxProtectionVanishTime = 6;
ProtectionVanishDelayMilliseconds = 1000;
ProtectionMessageColor = "Yellow";
CommandMessageColor = "Green";
WhitelistedItems = new List<ushort> { ushort.MaxValue - 1 };
NoSpawnProtection = new List<ulong> { ulong.MaxValue - 1 };
}
}
}