diff --git a/Dalamud/Plugin/PluginManager.cs b/Dalamud/Plugin/PluginManager.cs index 3725658f8..2bf42e4f0 100644 --- a/Dalamud/Plugin/PluginManager.cs +++ b/Dalamud/Plugin/PluginManager.cs @@ -100,19 +100,6 @@ namespace Dalamud.Plugin JsonConvert.DeserializeObject( File.ReadAllText(defJsonFile.FullName)); - // Don't wanna fuck this up - // This is a fix for earlier Chat Extender versions, since they break command handlers - try { - if (dllFile.Name.Contains("ChatExtender") && - int.Parse(pluginDef.AssemblyVersion.Replace(".", "")) < 1410) { - Log.Information("Found banned ChatExtender, skipping..."); - return false; - } - } catch (Exception) { - // ignored - } - - if (pluginDef.ApplicableVersion != this.dalamud.StartInfo.GameVersion && pluginDef.ApplicableVersion != "any") { Log.Information("Plugin {0} has not applicable version.", dllFile.FullName); @@ -135,6 +122,23 @@ namespace Dalamud.Plugin // Assembly.Load() by name here will not load multiple versions with the same name, in the case of updates var pluginAssembly = Assembly.LoadFile(dllFile.FullName); + // Don't wanna fuck this up + // This is a fix for earlier Chat Extender versions, since they break command handlers + try + { + var ver = int.Parse(pluginAssembly.GetName().Version.ToString().Replace(".", "")); + if (dllFile.Name.Contains("ChatExtender") && + ver < 1410) + { + Log.Information($"Found banned v{ver} ChatExtender, skipping..."); + return false; + } + } + catch (Exception) + { + // ignored + } + if (pluginAssembly != null) { Log.Information("Loading types for {0}", pluginAssembly.FullName);