From 995d27aa02e52c29124c50213eb6403fe91e4136 Mon Sep 17 00:00:00 2001 From: DiFFoZ <48765566+DiFFoZ@users.noreply.github.com> Date: Sat, 10 Apr 2021 12:30:21 +0700 Subject: [PATCH] Make it just like a library instead of a plugin --- EvolutionPlugins.Economy.Stub/EconomyStub.cs | 18 ------------------ .../ServiceConfigurator.cs | 10 ++++------ 2 files changed, 4 insertions(+), 24 deletions(-) delete mode 100644 EvolutionPlugins.Economy.Stub/EconomyStub.cs diff --git a/EvolutionPlugins.Economy.Stub/EconomyStub.cs b/EvolutionPlugins.Economy.Stub/EconomyStub.cs deleted file mode 100644 index e9d7d3c..0000000 --- a/EvolutionPlugins.Economy.Stub/EconomyStub.cs +++ /dev/null @@ -1,18 +0,0 @@ -using JetBrains.Annotations; -using OpenMod.API.Plugins; -using OpenMod.Core.Plugins; -using System; - -[assembly: PluginMetadata("EvolutionPlugins.Economy.Stub", Author = "EvolutionPlugins", DisplayName = "Economy Stub", - Website = "https://discord.gg/5MT2yke")] - -namespace EvolutionPlugins.Economy.Stub -{ - [UsedImplicitly] - public class EconomyStub : OpenModUniversalPlugin - { - public EconomyStub(IServiceProvider serviceProvider) : base(serviceProvider) - { - } - } -} \ No newline at end of file diff --git a/EvolutionPlugins.Economy.Stub/ServiceConfigurator.cs b/EvolutionPlugins.Economy.Stub/ServiceConfigurator.cs index 534fb4c..8160d3b 100644 --- a/EvolutionPlugins.Economy.Stub/ServiceConfigurator.cs +++ b/EvolutionPlugins.Economy.Stub/ServiceConfigurator.cs @@ -2,20 +2,18 @@ using JetBrains.Annotations; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; -using OpenMod.API.Ioc; -using OpenMod.API.Prioritization; using OpenMod.Extensions.Economy.Abstractions; namespace EvolutionPlugins.Economy.Stub { - [Priority(Priority = Priority.Lowest)] [UsedImplicitly] - public class ServiceConfigurator : IServiceConfigurator + public static class ServiceCollectionExtension { - public void ConfigureServices(IOpenModServiceConfigurationContext openModStartupContext, - IServiceCollection serviceCollection) + [UsedImplicitly] + public static IServiceCollection AddEconomyStub(this IServiceCollection serviceCollection) { serviceCollection.TryAddSingleton(); + return serviceCollection; } } } \ No newline at end of file