mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-13 20:24:16 +01:00
Merge pull request #1198 from Caraxi/installedplugins
Add `<DalamudPluginInterface>.InstalledPlugins`
This commit is contained in:
commit
fa73ccd3ee
2 changed files with 12 additions and 0 deletions
|
|
@ -193,13 +193,20 @@ public sealed class DalamudPluginInterface : IDisposable
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a list of installed plugin names.
|
/// Gets a list of installed plugin names.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[Obsolete($"This property is obsolete. Use {nameof(InstalledPlugins)} instead.")]
|
||||||
public List<string> PluginNames => Service<PluginManager>.Get().InstalledPlugins.Select(p => p.Manifest.Name).ToList();
|
public List<string> PluginNames => Service<PluginManager>.Get().InstalledPlugins.Select(p => p.Manifest.Name).ToList();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a list of installed plugin internal names.
|
/// Gets a list of installed plugin internal names.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[Obsolete($"This property is obsolete. Use {nameof(InstalledPlugins)} instead.")]
|
||||||
public List<string> PluginInternalNames => Service<PluginManager>.Get().InstalledPlugins.Select(p => p.Manifest.InternalName).ToList();
|
public List<string> PluginInternalNames => Service<PluginManager>.Get().InstalledPlugins.Select(p => p.Manifest.InternalName).ToList();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets a list of installed plugins along with their current state.
|
||||||
|
/// </summary>
|
||||||
|
public IEnumerable<InstalledPluginState> InstalledPlugins => Service<PluginManager>.Get().InstalledPlugins.Select(p => new InstalledPluginState(p.Name, p.Manifest.InternalName, p.IsLoaded, p.Manifest.EffectiveVersion));
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Opens the <see cref="PluginInstallerWindow"/> with the plugin name set as search target.
|
/// Opens the <see cref="PluginInstallerWindow"/> with the plugin name set as search target.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
5
Dalamud/Plugin/InstalledPluginState.cs
Normal file
5
Dalamud/Plugin/InstalledPluginState.cs
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace Dalamud.Plugin;
|
||||||
|
|
||||||
|
public record InstalledPluginState(string Name, string InternalName, bool IsLoaded, Version Version);
|
||||||
Loading…
Add table
Add a link
Reference in a new issue