diff --git a/Dalamud/IoC/Internal/ServiceScope.cs b/Dalamud/IoC/Internal/ServiceScope.cs
index 98209eeb7..8b12dce0b 100644
--- a/Dalamud/IoC/Internal/ServiceScope.cs
+++ b/Dalamud/IoC/Internal/ServiceScope.cs
@@ -1,4 +1,4 @@
-using System.Collections.Concurrent;
+using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
@@ -12,7 +12,7 @@ namespace Dalamud.IoC.Internal;
///
/// Container enabling the creation of scoped services.
///
-internal interface IServiceScope : IAsyncDisposable
+internal interface IServiceScope : IServiceProvider, IAsyncDisposable
{
///
/// Register objects that may be injected to scoped services,
@@ -57,6 +57,12 @@ internal class ServiceScopeImpl : IServiceScope
/// The container this scope will use to create services.
public ServiceScopeImpl(ServiceContainer container) => this.container = container;
+ ///
+ object? IServiceProvider.GetService(Type serviceType)
+ {
+ return ((IServiceProvider)this.container).GetService(serviceType);
+ }
+
///
public void RegisterPrivateScopes(params object[] scopes)
{
diff --git a/Dalamud/Plugin/DalamudPluginInterface.cs b/Dalamud/Plugin/DalamudPluginInterface.cs
index 8455ce164..603bed7a5 100644
--- a/Dalamud/Plugin/DalamudPluginInterface.cs
+++ b/Dalamud/Plugin/DalamudPluginInterface.cs
@@ -454,6 +454,12 @@ internal sealed class DalamudPluginInterface : IDalamudPluginInterface, IDisposa
#region Dependency Injection
+ ///
+ public object? GetService(Type serviceType)
+ {
+ return this.plugin.ServiceScope.GetService(serviceType);
+ }
+
///
public T? Create(params object[] scopedObjects) where T : class
{
diff --git a/Dalamud/Plugin/IDalamudPluginInterface.cs b/Dalamud/Plugin/IDalamudPluginInterface.cs
index e1dd34f87..d1b6977d4 100644
--- a/Dalamud/Plugin/IDalamudPluginInterface.cs
+++ b/Dalamud/Plugin/IDalamudPluginInterface.cs
@@ -8,8 +8,6 @@ using System.Threading.Tasks;
using Dalamud.Configuration;
using Dalamud.Game.Text;
using Dalamud.Game.Text.Sanitizer;
-using Dalamud.Game.Text.SeStringHandling;
-using Dalamud.Game.Text.SeStringHandling.Payloads;
using Dalamud.Interface;
using Dalamud.Interface.Internal.Windows.PluginInstaller;
using Dalamud.Interface.Internal.Windows.Settings;
@@ -24,7 +22,7 @@ namespace Dalamud.Plugin;
///
/// This interface acts as an interface to various objects needed to interact with Dalamud and the game.
///
-public interface IDalamudPluginInterface
+public interface IDalamudPluginInterface : IServiceProvider
{
///
/// Delegate for localization change with two-letter iso lang code.