diff --git a/Dalamud/IoC/Internal/ServiceContainer.cs b/Dalamud/IoC/Internal/ServiceContainer.cs index bfc92d271..4a9d57dde 100644 --- a/Dalamud/IoC/Internal/ServiceContainer.cs +++ b/Dalamud/IoC/Internal/ServiceContainer.cs @@ -45,7 +45,7 @@ namespace Dalamud.IoC.Internal /// The type of object to create. /// Scoped objects to be included in the constructor. /// The created object. - public async Task Create(Type objectType, params object[] scopedObjects) + public async Task CreateAsync(Type objectType, params object[] scopedObjects) { var ctor = this.FindApplicableCtor(objectType, scopedObjects); if (ctor == null) diff --git a/Dalamud/Plugin/DalamudPluginInterface.cs b/Dalamud/Plugin/DalamudPluginInterface.cs index 22d1ccd1f..e0fa641cc 100644 --- a/Dalamud/Plugin/DalamudPluginInterface.cs +++ b/Dalamud/Plugin/DalamudPluginInterface.cs @@ -361,7 +361,7 @@ namespace Dalamud.Plugin realScopedObjects[0] = this; Array.Copy(scopedObjects, 0, realScopedObjects, 1, scopedObjects.Length); - return svcContainer.Create(typeof(T), realScopedObjects) as T; + return (T)svcContainer.CreateAsync(typeof(T), realScopedObjects).GetAwaiter().GetResult(); } /// diff --git a/Dalamud/Plugin/Internal/Types/LocalPlugin.cs b/Dalamud/Plugin/Internal/Types/LocalPlugin.cs index b5776f4ca..885f783e0 100644 --- a/Dalamud/Plugin/Internal/Types/LocalPlugin.cs +++ b/Dalamud/Plugin/Internal/Types/LocalPlugin.cs @@ -334,7 +334,7 @@ internal class LocalPlugin : IDisposable this.DalamudInterface = new DalamudPluginInterface(this.pluginAssembly.GetName().Name!, this.DllFile, reason, this.IsDev); var ioc = Service.Get(); - this.instance = ioc.Create(this.pluginType, this.DalamudInterface).GetAwaiter().GetResult() as IDalamudPlugin; + this.instance = ioc.CreateAsync(this.pluginType, this.DalamudInterface).GetAwaiter().GetResult() as IDalamudPlugin; if (this.instance == null) { this.State = PluginState.LoadError;