diff --git a/IPA.Loader/Loader/PluginManager.cs b/IPA.Loader/Loader/PluginManager.cs
index b8c2e6b9..0322d705 100644
--- a/IPA.Loader/Loader/PluginManager.cs
+++ b/IPA.Loader/Loader/PluginManager.cs
@@ -137,7 +137,6 @@ namespace IPA.Loader
foreach (string s in originalPlugins)
{
string pluginCopy = Path.Combine(cacheDir, Path.GetFileName(s));
- File.Copy(Path.Combine(pluginDirectory, s), pluginCopy);
#region Fix assemblies for refactor
@@ -182,7 +181,7 @@ namespace IPA.Loader
var selfPlugin = new PluginInfo
{
- Filename = Path.Combine(Environment.CurrentDirectory, "IPA.exe"),
+ Filename = Path.Combine(BeatSaber.InstallPath, "IPA.exe"),
Plugin = SelfPlugin.Instance
};
selfPlugin.ModSaberInfo = selfPlugin.Plugin.ModInfo;
@@ -237,10 +236,10 @@ namespace IPA.Loader
T pluginInstance = Activator.CreateInstance(t) as T;
string[] filter = null;
- if (pluginInstance is IGenericEnhancedPlugin)
- {
- filter = ((IGenericEnhancedPlugin)pluginInstance).Filter;
- }
+ if (typeof(T) == typeof(IPlugin) && pluginInstance is IEnhancedPlugin enhancedPlugin)
+ filter = enhancedPlugin.Filter;
+ else if (pluginInstance is IGenericEnhancedPlugin plugin)
+ filter = plugin.Filter;
if (filter == null || filter.Contains(exeName, StringComparer.OrdinalIgnoreCase))
return pluginInstance;
diff --git a/IPA.Loader/PluginInterfaces/IPA/IEnhancedPlugin.cs b/IPA.Loader/PluginInterfaces/IPA/IEnhancedPlugin.cs
index 054f0933..4db7fa06 100644
--- a/IPA.Loader/PluginInterfaces/IPA/IEnhancedPlugin.cs
+++ b/IPA.Loader/PluginInterfaces/IPA/IEnhancedPlugin.cs
@@ -8,7 +8,17 @@ namespace IPA.Old
/// An enhanced version of the standard IPA plugin.
///
[Obsolete("When building plugins for Beat Saber, use IEnhancedBeatSaberPlugin")]
- public interface IEnhancedPlugin : IPlugin, IGenericEnhancedPlugin
+ public interface IEnhancedPlugin : IPlugin
{
+ ///
+ /// Gets a list of executables this plugin should be executed on (without the file ending)
+ ///
+ /// { "PlayClub", "PlayClubStudio" }
+ string[] Filter { get; }
+
+ ///
+ /// Called after Update.
+ ///
+ void OnLateUpdate();
}
}
\ No newline at end of file