server-master/srcs/_plugins/Plugin.TimeSpaces/TimeSpacesPlugin.cs
2026-02-10 18:21:30 +01:00

27 lines
No EOL
727 B
C#

using Plugin.TimeSpaces.Commands;
using WingsAPI.Plugins;
using WingsAPI.Scripting;
using WingsEmu.Commands.Interfaces;
namespace Plugin.TimeSpaces;
public class TimeSpacesPlugin : IGamePlugin
{
private readonly ICommandContainer _commands;
private readonly IScriptFactory _scriptFactory;
public TimeSpacesPlugin(ICommandContainer commands, IScriptFactory scriptFactory)
{
_commands = commands;
_scriptFactory = scriptFactory;
}
public string Name { get; } = nameof(TimeSpacesPlugin);
public void OnLoad()
{
_commands.AddModule<TimeSpaceAdminStartModule>();
_scriptFactory.RegisterAllScriptingObjectsInAssembly(typeof(TimeSpacesPlugin).Assembly);
}
}