Added another check

This commit is contained in:
Thorsten Sommer 2025-03-15 21:35:03 +01:00
parent cba651d034
commit 4d79b0ec94
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108

View File

@ -30,6 +30,9 @@ public static class PluginFactory
if (!Enum.TryParse<PluginType>(typeText, out var type))
return new NoPlugin(state, $"TYPE is not a valid plugin type. Valid types are: {CommonTools.GetAllEnumValues<PluginType>()}");
if(type is PluginType.NONE)
return new NoPlugin(state, $"TYPE is not a valid plugin type. Valid types are: {CommonTools.GetAllEnumValues<PluginType>()}");
return type switch
{
PluginType.LANGUAGE => new PluginLanguage(state, type),