mirror of
https://github.com/tribufu/ServerManagers
synced 2026-06-01 09:42:39 +00:00
Additional Compatibility code.
This commit is contained in:
parent
b45a855b42
commit
b771a37592
5 changed files with 44 additions and 53 deletions
|
|
@ -63,16 +63,16 @@ namespace ServerManagerTool.Plugin.Discord
|
|||
{
|
||||
get
|
||||
{
|
||||
var assembly = PluginHelper.Instance.GetType().Assembly;
|
||||
var assembly = typeof(PluginHelper).Assembly;
|
||||
if (assembly != null)
|
||||
{
|
||||
var pluginHelperType = assembly.GetType(typeof(PluginHelper).FullName, false, true);
|
||||
if (pluginHelperType != null)
|
||||
{
|
||||
var field = pluginHelperType.GetProperty("LanguageCode");
|
||||
if (field != null)
|
||||
var property = pluginHelperType.GetProperty(nameof(LanguageCode));
|
||||
if (property != null)
|
||||
{
|
||||
return field.GetValue(PluginHelper.Instance).ToString();
|
||||
return property.GetValue(PluginHelper.Instance).ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue