mod api impl

This commit is contained in:
zznty
2023-11-10 16:02:14 +07:00
parent ec5e20b922
commit 78164fd6be
4 changed files with 69 additions and 2 deletions

View File

@@ -6,6 +6,7 @@ using LuckPerms.Torch.Extensions;
using LuckPerms.Torch.Impl.Calculator;
using LuckPerms.Torch.Impl.Listeners;
using LuckPerms.Torch.Impl.Messaging;
using LuckPerms.Torch.ModApi;
using LuckPerms.Torch.PlatformHooks;
using me.lucko.luckperms.common.api;
using me.lucko.luckperms.common.calculator;
@@ -71,6 +72,7 @@ public class LpTorchPlugin(LuckPermsBootstrap bootstrap, ITorchBase torch) : Abs
_trackManager = new(this);
_connectionListener = new(this);
torch.Managers.GetManager<ITorchSessionManager>().AddFactory(_ => _connectionListener);
torch.Managers.GetManager<ITorchSessionManager>().AddFactory(_ => new ModApiManager());
}
protected override CalculatorFactory provideCalculatorFactory() => new LpCalculatorFactory(this);