roflmuffin / CounterStrikeSharp

CounterStrikeSharp allows you to write server plugins in C# for Counter-Strike 2/Source2/CS2
https://docs.cssharp.dev
Other
756 stars 113 forks source link

Whether or not you can get the full list of loaded plugins within a plugin #359

Open Nianmou opened 6 months ago

Nianmou commented 6 months ago

Similar to css_plugins list I tried using var cheatsCvar = ConVar.Find("css_plugins list") but it failed

KillStr3aK commented 6 months ago

you can access the loaded plugins from the pluginmanager instance

Nianmou commented 6 months ago

pluginmanager

I'm new to C# and I see this constructor but I don't know how it should be used and how it should be filled out?PluginManager (IScriptHostConfiguration, ICommandManager, ILogger, IServiceProvider, IServiceScopeFactory)

roflmuffin commented 6 months ago

We currently don't provide the IPluginContextQueryHandler or IPluginManager implementation to plugins, though this could be added to the DI container and then you can use it to find this information in a future release.