mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 02:08:21 +00:00
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:
@ -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;
|
||||
|
Reference in New Issue
Block a user