diff --git a/docs/dev/apis/csync/usage-guide.md b/docs/dev/apis/csync/usage-guide.md index 1599c67db77..bd2010ca270 100644 --- a/docs/dev/apis/csync/usage-guide.md +++ b/docs/dev/apis/csync/usage-guide.md @@ -18,7 +18,7 @@ Please use the [CSync 4 usage guide](/dev/apis/csync/v4-usage-guide) for the tim Create a new class extending `SyncedConfig2`. ```csharp -public class MyConfig : SyncedConfig2 +public class MyConfig : SyncedConfig2 ``` Within this class, we declare fields for each config entry we would like to sync. @@ -26,7 +26,7 @@ Optionally, you can also declare non-synced config entries too. Each `SyncedEntry` must be annotated with the `[SyncedEntryField]` attribute. ```csharp -public class MyConfig : SyncedConfig2 { +public class MyConfig : SyncedConfig2 { public ConfigEntry DebugLevel { get; private set; } [SyncedEntryField] public SyncedEntry MovementSpeed; // fields may be annotated directly @@ -43,7 +43,7 @@ When using client side and synced entries in the same class, any instance of `Co We add a constructor to our config class that calls the base constructor. ```csharp -public class MyConfig : SyncedConfig2 { +public class MyConfig : SyncedConfig2 { public MyConfig(ConfigFile configFile) : base("My.Plugin.Guid") { } // [!code focus] } ``` @@ -72,9 +72,6 @@ public MyConfig(ConfigFile cfg) : base("My.Plugin.Guid") { ``` After binding, we add the following line at the end of the constructor. -```csharp -ConfigManager.Register(this); -``` ```csharp public MyConfig(ConfigFile cfg) : base("My.Plugin.Guid") { diff --git a/docs/dev/apis/csync/v4-usage-guide.md b/docs/dev/apis/csync/v4-usage-guide.md index df66fe2b56b..d4f475d8de1 100644 --- a/docs/dev/apis/csync/v4-usage-guide.md +++ b/docs/dev/apis/csync/v4-usage-guide.md @@ -11,7 +11,7 @@ description: The main guide to using CSync (v4). Create a new class extending `SyncedConfig`. ```csharp -public class MyConfig : SyncedConfig +public class MyConfig : SyncedConfig ``` Within this class, we declare fields for each config entry we would like to sync. @@ -19,7 +19,7 @@ Optionally, you can also declare non-synced config entries too. Each `SyncedEntry` must be annotated with the `[DataMember]` attribute. ```csharp -public class MyConfig : SyncedConfig { +public class MyConfig : SyncedConfig { public ConfigEntry DebugLevel { get; private set; } [DataMember] public SyncedEntry MovementSpeed; // fields may be annotated directly @@ -36,7 +36,7 @@ When using client side and synced entries in the same class, any instance of `Co We add a constructor to our config class that calls the base constructor. ```csharp -public class MyConfig : SyncedConfig { +public class MyConfig : SyncedConfig { public MyConfig(ConfigFile configFile) : base("My.Plugin.Guid") { } // [!code focus] } ```