Added private constructors for new internal classes

This commit is contained in:
Dylan K. Taylor 2023-09-06 12:12:11 +01:00
parent 5a010e8213
commit ec1cd5967d
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D
3 changed files with 18 additions and 0 deletions

View File

@ -101,6 +101,15 @@ fwrite($file, <<<'DOC'
DOC DOC
); );
fwrite($file, "final class YmlServerProperties{\n"); fwrite($file, "final class YmlServerProperties{\n");
fwrite($file, <<<'CONSTRUCTOR'
private function __construct(){
//NOOP
}
CONSTRUCTOR
);
foreach(Utils::stringifyKeys($constants) as $constName => $propertyName){ foreach(Utils::stringifyKeys($constants) as $constName => $propertyName){
fwrite($file, "\tpublic const $constName = '$propertyName';\n"); fwrite($file, "\tpublic const $constName = '$propertyName';\n");
} }

View File

@ -29,6 +29,10 @@ namespace pocketmine;
*/ */
final class ServerProperties{ final class ServerProperties{
private function __construct(){
//NOOP
}
public const AUTO_SAVE = "auto-save"; public const AUTO_SAVE = "auto-save";
public const DEFAULT_WORLD_GENERATOR = "level-type"; public const DEFAULT_WORLD_GENERATOR = "level-type";
public const DEFAULT_WORLD_GENERATOR_SETTINGS = "generator-settings"; public const DEFAULT_WORLD_GENERATOR_SETTINGS = "generator-settings";

View File

@ -30,6 +30,11 @@ namespace pocketmine;
* Do not edit this file manually. * Do not edit this file manually.
*/ */
final class YmlServerProperties{ final class YmlServerProperties{
private function __construct(){
//NOOP
}
public const ALIASES = 'aliases'; public const ALIASES = 'aliases';
public const ANONYMOUS_STATISTICS = 'anonymous-statistics'; public const ANONYMOUS_STATISTICS = 'anonymous-statistics';
public const ANONYMOUS_STATISTICS_ENABLED = 'anonymous-statistics.enabled'; public const ANONYMOUS_STATISTICS_ENABLED = 'anonymous-statistics.enabled';