mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
allow use of any iterable for enum initialization
this allows possible use of generators
This commit is contained in:
@ -47,7 +47,7 @@ final class GameMode{
|
||||
/** @var self[] */
|
||||
protected static $magicNumberMap = [];
|
||||
|
||||
protected static function setup() : array{
|
||||
protected static function setup() : iterable{
|
||||
return [
|
||||
new self("survival", 0, "Survival", "gameMode.survival", ["s", "0"]),
|
||||
new self("creative", 1, "Creative", "gameMode.creative", ["c", "1"]),
|
||||
|
Reference in New Issue
Block a user