mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-10 21:45:35 +00:00
GeneratorManager: Removed redundant Closure wrapping (#5551)
This commit is contained in:
parent
cfa1e7486a
commit
981385cf4a
@ -40,7 +40,7 @@ final class GeneratorManager{
|
|||||||
private array $list = [];
|
private array $list = [];
|
||||||
|
|
||||||
public function __construct(){
|
public function __construct(){
|
||||||
$this->addGenerator(Flat::class, "flat", \Closure::fromCallable(function(string $preset) : ?InvalidGeneratorOptionsException{
|
$this->addGenerator(Flat::class, "flat", function(string $preset) : ?InvalidGeneratorOptionsException{
|
||||||
if($preset === ""){
|
if($preset === ""){
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -50,7 +50,7 @@ final class GeneratorManager{
|
|||||||
}catch(InvalidGeneratorOptionsException $e){
|
}catch(InvalidGeneratorOptionsException $e){
|
||||||
return $e;
|
return $e;
|
||||||
}
|
}
|
||||||
}));
|
});
|
||||||
$this->addGenerator(Normal::class, "normal", fn() => null);
|
$this->addGenerator(Normal::class, "normal", fn() => null);
|
||||||
$this->addGenerator(Normal::class, "default", fn() => null);
|
$this->addGenerator(Normal::class, "default", fn() => null);
|
||||||
$this->addGenerator(Nether::class, "hell", fn() => null);
|
$this->addGenerator(Nether::class, "hell", fn() => null);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user