Drop PluginLoader from Plugin, expose path instead

we already had this anyway, and it's already being reflected into.
Instead of DevTools checking for FolderPluginLoader instances, it
could just check if the file is a directory instead.
This commit is contained in:
Dylan K. Taylor
2025-05-04 16:41:40 +01:00
parent 3de604ef95
commit 2a42e2c75d
4 changed files with 5 additions and 12 deletions

View File

@ -259,10 +259,8 @@ class CrashDump{
}
if(file_exists($filePath)){
$reflection = new \ReflectionClass(PluginBase::class);
$file = $reflection->getProperty("file");
foreach($this->server->getPluginManager()->getPlugins() as $plugin){
$filePath = Filesystem::cleanPath($file->getValue($plugin));
$filePath = Filesystem::cleanPath($plugin->getFile());
if(str_starts_with($frameCleanPath, $filePath)){
$this->data->plugin = $plugin->getName();
break;