mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 20:54:55 +00:00
Updated Plugins (markdown)
@@ -14,8 +14,8 @@ All plugin assemblies must contain a static method called LoadPlugin():
|
|||||||
``` csharp
|
``` csharp
|
||||||
public class SomeDevice : Device , IBridge //IBridge only needs to be implemented if
|
public class SomeDevice : Device , IBridge //IBridge only needs to be implemented if
|
||||||
{
|
{
|
||||||
// This string is used to define the minimum version of the Essentials Framework
|
// This string is used to define the minimum version of the
|
||||||
// required for this plugin
|
// Essentials Framework required for this plugin
|
||||||
public static string MinimumEssentialsFrameworkVersion = "1.4.23";
|
public static string MinimumEssentialsFrameworkVersion = "1.4.23";
|
||||||
|
|
||||||
// This method gets called by the Essentials Framework when the application starts.
|
// This method gets called by the Essentials Framework when the application starts.
|
||||||
@@ -28,7 +28,8 @@ public class SomeDevice : Device , IBridge //IBridge only needs to be implement
|
|||||||
// and returns an instance of the desired device type
|
// and returns an instance of the desired device type
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is a factory method to construct a device and return it to be added to the DeviceManager
|
// This is a factory method to construct a device and return it to be
|
||||||
|
// added to the DeviceManager
|
||||||
public static Device FactoryMethod(DeviceConfig dc)
|
public static Device FactoryMethod(DeviceConfig dc)
|
||||||
{
|
{
|
||||||
return new SomeDevice(dc.key, dc.name, dc);
|
return new SomeDevice(dc.key, dc.name, dc);
|
||||||
|
|||||||
Reference in New Issue
Block a user