mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-21 10:26:38 +00:00
Drop pocketmine.plugin.fileError in favour of pocketmine.plugin.loadError
fileError was unnecessarily noisy, putting the directory path on the console twice. This conveys just as much information but with less wasted space.
This commit is contained in:
parent
fec48003d9
commit
a101d1cdf9
@ -1 +1 @@
|
||||
Subproject commit dcfe3ff1888b2d3adecc00c14870717ed55824cc
|
||||
Subproject commit c940b9f17188548f78d0dc5fdd4e607c703b7952
|
@ -1702,14 +1702,6 @@ final class KnownTranslationFactory{
|
||||
]);
|
||||
}
|
||||
|
||||
public static function pocketmine_plugin_fileError(Translatable|string $param0, Translatable|string $param1, Translatable|string $param2) : Translatable{
|
||||
return new Translatable(KnownTranslationKeys::POCKETMINE_PLUGIN_FILEERROR, [
|
||||
0 => $param0,
|
||||
1 => $param1,
|
||||
2 => $param2,
|
||||
]);
|
||||
}
|
||||
|
||||
public static function pocketmine_plugin_genericLoadError(Translatable|string $param0) : Translatable{
|
||||
return new Translatable(KnownTranslationKeys::POCKETMINE_PLUGIN_GENERICLOADERROR, [
|
||||
0 => $param0,
|
||||
|
@ -357,7 +357,6 @@ final class KnownTranslationKeys{
|
||||
public const POCKETMINE_PLUGIN_DISABLE = "pocketmine.plugin.disable";
|
||||
public const POCKETMINE_PLUGIN_DUPLICATEERROR = "pocketmine.plugin.duplicateError";
|
||||
public const POCKETMINE_PLUGIN_ENABLE = "pocketmine.plugin.enable";
|
||||
public const POCKETMINE_PLUGIN_FILEERROR = "pocketmine.plugin.fileError";
|
||||
public const POCKETMINE_PLUGIN_GENERICLOADERROR = "pocketmine.plugin.genericLoadError";
|
||||
public const POCKETMINE_PLUGIN_INCOMPATIBLEAPI = "pocketmine.plugin.incompatibleAPI";
|
||||
public const POCKETMINE_PLUGIN_INCOMPATIBLEOS = "pocketmine.plugin.incompatibleOS";
|
||||
|
@ -247,14 +247,13 @@ class PluginManager{
|
||||
try{
|
||||
$description = $loader->getPluginDescription($file);
|
||||
}catch(PluginDescriptionParseException $e){
|
||||
$this->server->getLogger()->error($this->server->getLanguage()->translate(KnownTranslationFactory::pocketmine_plugin_fileError(
|
||||
$this->server->getLogger()->error($this->server->getLanguage()->translate(KnownTranslationFactory::pocketmine_plugin_loadError(
|
||||
$file,
|
||||
$directory,
|
||||
KnownTranslationFactory::pocketmine_plugin_invalidManifest($e->getMessage())
|
||||
)));
|
||||
continue;
|
||||
}catch(\RuntimeException $e){ //TODO: more specific exception handling
|
||||
$this->server->getLogger()->error($this->server->getLanguage()->translate(KnownTranslationFactory::pocketmine_plugin_fileError($file, $directory, $e->getMessage())));
|
||||
$this->server->getLogger()->error($this->server->getLanguage()->translate(KnownTranslationFactory::pocketmine_plugin_loadError($file, $e->getMessage())));
|
||||
$this->server->getLogger()->logException($e);
|
||||
continue;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user