mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Merge branch 'stable' into next-minor
This commit is contained in:
@ -72,7 +72,8 @@ final class GeneratorManager{
|
||||
public function addGenerator(string $class, string $name, \Closure $presetValidator, bool $overwrite = false) : void{
|
||||
Utils::testValidInstance($class, Generator::class);
|
||||
|
||||
if(!$overwrite and isset($this->list[$name = strtolower($name)])){
|
||||
$name = strtolower($name);
|
||||
if(!$overwrite and isset($this->list[$name])){
|
||||
throw new \InvalidArgumentException("Alias \"$name\" is already assigned");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user