Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Nianmou opened this issue Mar 2, 2024 · 4 comments

Comments

@Nianmou
Copy link

Nianmou commented Mar 2, 2024

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

@github-actions github-actions bot added the untriaged New issue has not been triaged label Mar 2, 2024
@KillStr3aK
Copy link
Contributor

you can access the loaded plugins from the pluginmanager instance

@Nianmou
Copy link
Author

Nianmou commented Mar 3, 2024

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
Copy link
Owner

roflmuffin commented Mar 4, 2024

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.

@roflmuffin roflmuffin added this to the Future milestone Mar 4, 2024
@github-actions github-actions bot removed the untriaged New issue has not been triaged label Mar 4, 2024
@KillStr3aK
Copy link
Contributor

KillStr3aK commented Oct 9, 2024

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.

I can work on this however not sure if we should expose

as it just loads every plugin from the plugins folder

Exposing

would lead to people load plugins from arbitrary paths.

I believe we should only let

public IEnumerable<PluginContext> GetLoadedPlugins();

to be used from IPluginManager but it might require a different interface.

IPluginContextQueryHandler is fine, can be exposed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants