Add <DalamudPluginInterface>.InstalledPlugins

This commit is contained in:
Caraxi 2023-05-13 22:08:59 +09:30
parent 69b615f218
commit a64fdc7c7b
2 changed files with 10 additions and 0 deletions

View file

@ -200,6 +200,11 @@ public sealed class DalamudPluginInterface : IDisposable
/// </summary>
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>
/// Opens the <see cref="PluginInstallerWindow"/> with the plugin name set as search target.
/// </summary>

View file

@ -0,0 +1,5 @@
using System;
namespace Dalamud.Plugin;
public record InstalledPluginState(string Name, string InternalName, bool IsLoaded, Version Version);