mirror of
https://github.com/cadmium-im/zirconium-sharp.git
synced 2024-12-22 17:01:50 +00:00
Refactor HelloWorldPlugin (cleanup code)
This commit is contained in:
parent
ce8ed0d7ad
commit
eb849a8388
@ -16,15 +16,6 @@ namespace HelloWorldPlugin
|
||||
hostModuleAPI.Hook(handler);
|
||||
Log.Debug("plugin is initialized");
|
||||
}
|
||||
|
||||
public void PreInitialize(IPluginManager pluginManager) { }
|
||||
|
||||
public dynamic GetExportedAPI() { return null; }
|
||||
|
||||
public Type[] GetExportedTypes()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
internal class C2SHandler : IC2SMessageHandler
|
||||
@ -46,8 +37,7 @@ namespace HelloWorldPlugin
|
||||
msg.Payload["testProp"] = "hello world";
|
||||
msg.Ok = true;
|
||||
msg.From = hostModuleAPI.GetServerID();
|
||||
string strMsg = JsonConvert.SerializeObject(msg);
|
||||
session.ConnectionHandler.SendMessage(strMsg);
|
||||
session.ConnectionHandler.SendMessage(msg);
|
||||
}
|
||||
|
||||
public bool IsAuthorizationRequired() => false;
|
||||
|
Loading…
Reference in New Issue
Block a user