Repository: pmmp/PocketMine-MP (language: php)

Issue:
Setup Wizard / Lang error
### Issue description

- Expected result: Setup wizard to start correctly.

- Actual result: Despite all language files and composer libs and git submodules cloned, cannot start setup wizard as no language files are allegedly found.

### Steps to reproduce the issue
1. Setup development environment locally at commit b7a15b6e012ced87a4ca8ea976aa53802f1a17ed
2. Remove any previous server data (properties, configs, plugins etc)
3. Start server (setup wizard)

### OS and versions
<!-- try the `version` command | LATEST IS NOT A VALID VERSION -->
* PocketMine-MP: b7a15b6e012ced87a4ca8ea976aa53802f1a17ed
* PHP: 8.0.22
* Using JIT: no
* Server OS: (M1) 12.5.1
* Game version: N/A

### Plugins
N/A

### Crashdump, backtrace or other files
Small enough to be copied directly here.
```
jackhonour@MacBook-Air pocketmine-mp % php src/PocketMine.php
[17:30:30.436] [Server thread/WARNING]: This PHP binary was compiled in debug mode. This has a major impact on performance.
[17:30:30.438] [Server thread/WARNING]: Debugging assertions are enabled. This may degrade performance. To disable them, set `zend.assertions = -1` in php.ini.
[17:30:30.438] [Server thread/WARNING]: Non-packaged installation detected. This will degrade autoloading speed and make startup times longer.
[*] PocketMine-MP set-up wizard
[!] No language files found, please use provided builds or clone the repository recursively.
```



### Other
Commit this originates from: 456439566b573fb90fbab62ea40ecaafe65b926a

https://github.com/pmmp/PocketMine-MP/blob/b7a15b6e012ced87a4ca8ea976aa53802f1a17ed/src/wizard/SetupWizard.php#L65
https://github.com/pmmp/PocketMine-MP/blob/b7a15b6e012ced87a4ca8ea976aa53802f1a17ed/src/lang/Language.php#L72


Discussion / hints:

Fix patch:
diff --git a/src/lang/Language.php b/src/lang/Language.php
index ee5865c9360..0cba6bd213c 100644
--- a/src/lang/Language.php
+++ b/src/lang/Language.php
@@ -68,10 +68,14 @@ public static function getLanguageList(string $path = "") : array{
 				$result = [];
 
 				foreach($files as $file){
-					$code = explode(".", $file)[0];
-					$strings = self::loadLang($path, $code);
-					if(isset($strings["language.name"])){
-						$result[$code] = $strings["language.name"];
+					try{
+						$code = explode(".", $file)[0];
+						$strings = self::loadLang($path, $code);
+						if(isset($strings["language.name"])){
+							$result[$code] = $strings["language.name"];
+						}
+					}catch(LanguageNotFoundException $e){
+						// no-op
 					}
 				}
 


Test patch: