diff --git a/lang/en.json b/lang/en.json index 34273a3a..5373ca0b 100644 --- a/lang/en.json +++ b/lang/en.json @@ -112,5 +112,10 @@ "event-listener-missing-class-problem": "The plugin '{{plugin-name}}' could not register the event listener '{{listener}}', because the class '{{missing-class}}' it references does not exist.", "client-only-mod-problem": "The mod '{{mod-name}}' cannot run on a server. It is either a client-only mod or uses client-only code.", "circular-plugin-dependency-problem": "Circular plugin dependencies detected: {{cycle}}.", - "restricted-plugin-name-problem": "A plugin has a name that is not allowed." + "restricted-plugin-name-problem": "A plugin has a name that is not allowed.", + "paper-newer-config-file-problem": "The Paper config file '{{file-path}}' was created by a newer Paper version (config version {{config-version}}, this server supports up to {{supported-version}}). Settings in it might not work.", + "paper-newer-world-config-problem": "The Paper config file of the world '{{world-name}}' was created by a newer Paper version (config version {{config-version}}, this server supports up to {{supported-version}}). Settings in it might not work.", + "paper-config-reset-solution": "Back up and delete the file '{{file-path}}'. Paper creates it again with default settings.", + "paper-world-config-reset-solution": "Back up and delete the file 'paper-world.yml' of the world '{{world-name}}'. Paper creates it again with default settings.", + "paper-install-newer-version-solution": "Install the newer Paper version that created this config file." } diff --git a/src/Analyser/PaperAnalyser.php b/src/Analyser/PaperAnalyser.php index d489e436..112af12c 100644 --- a/src/Analyser/PaperAnalyser.php +++ b/src/Analyser/PaperAnalyser.php @@ -15,6 +15,7 @@ use Aternos\Codex\Minecraft\Analysis\Problem\Paper\EventListenerMissingClassProblem; use Aternos\Codex\Minecraft\Analysis\Problem\Paper\CircularPluginDependencyProblem; use Aternos\Codex\Minecraft\Analysis\Problem\Paper\RestrictedPluginNameProblem; +use Aternos\Codex\Minecraft\Analysis\Problem\Paper\NewerConfigVersionProblem; class PaperAnalyser extends BukkitAnalyser { @@ -34,5 +35,6 @@ public function __construct() $this->addPossibleInsightClass(EventListenerMissingClassProblem::class); $this->addPossibleInsightClass(CircularPluginDependencyProblem::class); $this->addPossibleInsightClass(RestrictedPluginNameProblem::class); + $this->addPossibleInsightClass(NewerConfigVersionProblem::class); } } diff --git a/src/Analysis/Problem/Paper/NewerConfigVersionProblem.php b/src/Analysis/Problem/Paper/NewerConfigVersionProblem.php new file mode 100644 index 00000000..bf4261a1 --- /dev/null +++ b/src/Analysis/Problem/Paper/NewerConfigVersionProblem.php @@ -0,0 +1,136 @@ + 31)! You may have to backup & delete + */ + protected const string NEWER_CONFIG_PREFIX = 'Loading a newer configuration than is supported \((?\d+) > (?\d+)\)! You may have to backup & delete '; + + protected const string GLOBAL_CONFIG_PATH = "config/paper-global.yml"; + protected const string WORLD_DEFAULTS_CONFIG_PATH = "config/paper-world-defaults.yml"; + + protected int $configVersion; + protected int $supportedVersion; + protected ?string $filePath = null; + protected ?string $worldName = null; + + /** + * @inheritDoc + */ + public function getMessage(): string + { + $placeholders = [ + "config-version" => $this->configVersion, + "supported-version" => $this->supportedVersion + ]; + + if ($this->worldName !== null) { + return Translator::getInstance()->getTranslation("paper-newer-world-config-problem", + ["world-name" => $this->worldName, ...$placeholders]); + } + + return Translator::getInstance()->getTranslation("paper-newer-config-file-problem", + ["file-path" => $this->filePath, ...$placeholders]); + } + + /** + * Global config, world defaults config and the config of a single world. + * Newer Paper versions name the world by its key ('minecraft:the_nether'), older ones by its name ('world_nether'). + * + * Example: Loading a newer configuration than is supported (999 > 31)! You may have to backup & delete your global config file to start the server. + * Example: Loading a newer configuration than is supported (999 > 31)! You may have to backup & delete the world defaults config file to start the server. + * Example: Loading a newer configuration than is supported (999 > 31)! You may have to backup & delete the minecraft:the_nether config file to start the server. + * Example: Loading a newer configuration than is supported (999 > 31)! You may have to backup & delete the world_nether config file to start the server. + * + * @inheritDoc + */ + public static function getPatterns(): array + { + return [ + '/' . static::NEWER_CONFIG_PREFIX . 'your global config file to start the server\./', + '/' . static::NEWER_CONFIG_PREFIX . 'the world defaults config file to start the server\./', + '/' . static::NEWER_CONFIG_PREFIX . 'the (?\S+) config file to start the server\./' + ]; + } + + /** + * @inheritDoc + */ + public function setMatches(array $matches, mixed $patternKey): void + { + $this->configVersion = (int)$matches["config_version"]; + $this->supportedVersion = (int)$matches["supported_version"]; + + if ($patternKey === 2) { + $this->worldName = $matches["world"]; + $this->addSolution(new PaperWorldConfigResetSolution($this->worldName)); + } else { + $this->filePath = $patternKey === 0 ? static::GLOBAL_CONFIG_PATH : static::WORLD_DEFAULTS_CONFIG_PATH; + $this->addSolution(new PaperConfigResetSolution($this->filePath)); + } + + $this->addSolution(new PaperInstallNewerVersionSolution()); + } + + /** + * @return int + */ + public function getConfigVersion(): int + { + return $this->configVersion; + } + + /** + * @return int + */ + public function getSupportedVersion(): int + { + return $this->supportedVersion; + } + + /** + * @return string|null The path of the global or world defaults config, null for the config of a single world + */ + public function getFilePath(): ?string + { + return $this->filePath; + } + + /** + * @return string|null The name or key of the world, null for the global or world defaults config + */ + public function getWorldName(): ?string + { + return $this->worldName; + } + + /** + * @inheritDoc + */ + public function isEqual(InsightInterface $insight): bool + { + return $insight instanceof static + && $this->getFilePath() === $insight->getFilePath() + && $this->getWorldName() === $insight->getWorldName(); + } +} diff --git a/src/Analysis/Solution/Paper/PaperConfigResetSolution.php b/src/Analysis/Solution/Paper/PaperConfigResetSolution.php new file mode 100644 index 00000000..e29e2db9 --- /dev/null +++ b/src/Analysis/Solution/Paper/PaperConfigResetSolution.php @@ -0,0 +1,37 @@ +getTranslation("paper-config-reset-solution", [ + "file-path" => $this->filePath + ]); + } + + /** + * @return string + */ + public function getFilePath(): string + { + return $this->filePath; + } +} diff --git a/src/Analysis/Solution/Paper/PaperInstallNewerVersionSolution.php b/src/Analysis/Solution/Paper/PaperInstallNewerVersionSolution.php new file mode 100644 index 00000000..1ef60682 --- /dev/null +++ b/src/Analysis/Solution/Paper/PaperInstallNewerVersionSolution.php @@ -0,0 +1,19 @@ +getTranslation("paper-install-newer-version-solution"); + } +} diff --git a/src/Analysis/Solution/Paper/PaperWorldConfigResetSolution.php b/src/Analysis/Solution/Paper/PaperWorldConfigResetSolution.php new file mode 100644 index 00000000..6499fae6 --- /dev/null +++ b/src/Analysis/Solution/Paper/PaperWorldConfigResetSolution.php @@ -0,0 +1,37 @@ +getTranslation("paper-world-config-reset-solution", [ + "world-name" => $this->worldName + ]); + } + + /** + * @return string + */ + public function getWorldName(): string + { + return $this->worldName; + } +} diff --git a/test/data/Vanilla/Bukkit/Paper/paper-newer-config-version-26-3.json b/test/data/Vanilla/Bukkit/Paper/paper-newer-config-version-26-3.json new file mode 100644 index 00000000..660df65f --- /dev/null +++ b/test/data/Vanilla/Bukkit/Paper/paper-newer-config-version-26-3.json @@ -0,0 +1,593 @@ +{ + "id": "paper\/server", + "name": "Paper", + "type": "Server Log", + "version": "26.3", + "title": "Paper 26.3 Server Log", + "entries": [ + { + "level": 6, + "time": null, + "prefix": null, + "lines": [ + { + "number": 1, + "content": "Starting org.bukkit.craftbukkit.Main" + }, + { + "number": 2, + "content": "2026-11-13T15:42:04.958017Z ServerMain WARN Advanced terminal features are not available in this environment" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:42:05 INFO]:", + "lines": [ + { + "number": 3, + "content": "[16:42:05 INFO]: [bootstrap] Running Java 25 (Java HotSpot(TM) 64-Bit Server VM 25.0.5.0.3+1-LTS-2; Oracle Corporation null) on Mac OS X 27.2.1 (aarch64)" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:42:05 INFO]:", + "lines": [ + { + "number": 4, + "content": "[16:42:05 INFO]: [bootstrap] Loading Paper 26.3-248-main@0727243 (2026-11-10T11:35:52Z) for Minecraft 26.3" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:42:05 INFO]:", + "lines": [ + { + "number": 5, + "content": "[16:42:05 INFO]: [PluginInitializerManager] Initializing plugins..." + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:42:05 INFO]:", + "lines": [ + { + "number": 6, + "content": "[16:42:05 INFO]: [PluginInitializerManager] Initialized 0 plugins" + } + ] + }, + { + "level": 4, + "time": null, + "prefix": "[16:42:05 WARN]:", + "lines": [ + { + "number": 7, + "content": "[16:42:05 WARN]: [oshi.software.os.mac.MacOperatingSystem] Unable to parse version 27.2 to a codename." + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:42:06 INFO]:", + "lines": [ + { + "number": 8, + "content": "[16:42:06 INFO]: [ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry] Initialising converters for DataConverter..." + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:42:06 INFO]:", + "lines": [ + { + "number": 9, + "content": "[16:42:06 INFO]: [com.destroystokyo.paper.profile.PaperServicesDiscoveryService] Environment: Environment[discoveryUrl=https:\/\/discovery.minecraftservices.com\/minecraft\/client, name=PROD]" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:42:06 INFO]:", + "lines": [ + { + "number": 10, + "content": "[16:42:06 INFO]: [ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry] Finished initialising converters for DataConverter in 184,4ms" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:42:07 INFO]:", + "lines": [ + { + "number": 11, + "content": "[16:42:07 INFO]: Loaded 1866 advancements" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:42:07 INFO]:", + "lines": [ + { + "number": 12, + "content": "[16:42:07 INFO]: Starting minecraft server version 26.3" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:42:07 INFO]:", + "lines": [ + { + "number": 13, + "content": "[16:42:07 INFO]: Loading properties" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:42:07 INFO]:", + "lines": [ + { + "number": 14, + "content": "[16:42:07 INFO]: This server is running Paper version 26.3-248-main@0727243 (2026-11-10T11:35:52Z) (Implementing API version 26.3.build.248-stable)" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:42:07 INFO]:", + "lines": [ + { + "number": 15, + "content": "[16:42:07 INFO]: [spark] This server bundles the spark profiler. For more information please visit https:\/\/docs.papermc.io\/paper\/profiling" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:42:07 INFO]:", + "lines": [ + { + "number": 16, + "content": "[16:42:07 INFO]: Server Ping Player Sample Count: 12" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:42:07 INFO]:", + "lines": [ + { + "number": 17, + "content": "[16:42:07 INFO]: Using 4 threads for Netty based IO" + } + ] + }, + { + "level": 3, + "time": null, + "prefix": "[16:42:07 ERROR]:", + "lines": [ + { + "number": 18, + "content": "[16:42:07 ERROR]: [Configurations] Loading a newer configuration than is supported (999 > 31)! You may have to backup & delete your global config file to start the server." + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:42:07 INFO]:", + "lines": [ + { + "number": 19, + "content": "[16:42:07 INFO]: [ca.spottedleaf.moonrise.common.util.FMA] FMA supported: true for all ARMv8 platforms" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:42:07 INFO]:", + "lines": [ + { + "number": 20, + "content": "[16:42:07 INFO]: [MoonriseCommon] Paper is using 4 worker threads, 1 I\/O threads" + } + ] + }, + { + "level": 3, + "time": null, + "prefix": "[16:42:07 ERROR]:", + "lines": [ + { + "number": 21, + "content": "[16:42:07 ERROR]: [Configurations] Loading a newer configuration than is supported (999 > 31)! You may have to backup & delete the world defaults config file to start the server." + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:42:07 INFO]:", + "lines": [ + { + "number": 22, + "content": "[16:42:07 INFO]: Default game type: SURVIVAL" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:42:07 INFO]:", + "lines": [ + { + "number": 23, + "content": "[16:42:07 INFO]: Generating keypair" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:42:07 INFO]:", + "lines": [ + { + "number": 24, + "content": "[16:42:07 INFO]: Starting Minecraft server on *:25599" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:42:07 INFO]:", + "lines": [ + { + "number": 25, + "content": "[16:42:07 INFO]: Paper: Using libdeflate (macOS ARM64 \/ Apple Silicon) compression from Velocity." + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:42:07 INFO]:", + "lines": [ + { + "number": 26, + "content": "[16:42:07 INFO]: Paper: Using native (macOS ARM64 \/ Apple Silicon) cipher from Velocity." + } + ] + }, + { + "level": 4, + "time": null, + "prefix": "[16:42:07 WARN]:", + "lines": [ + { + "number": 27, + "content": "[16:42:07 WARN]: **** SERVER IS RUNNING IN OFFLINE\/INSECURE MODE!" + } + ] + }, + { + "level": 4, + "time": null, + "prefix": "[16:42:07 WARN]:", + "lines": [ + { + "number": 28, + "content": "[16:42:07 WARN]: The server will make no attempt to authenticate usernames. Beware." + } + ] + }, + { + "level": 4, + "time": null, + "prefix": "[16:42:07 WARN]:", + "lines": [ + { + "number": 29, + "content": "[16:42:07 WARN]: While this makes the game possible to play without internet access, it also opens up the ability for hackers to connect with any username they choose." + } + ] + }, + { + "level": 4, + "time": null, + "prefix": "[16:42:07 WARN]:", + "lines": [ + { + "number": 30, + "content": "[16:42:07 WARN]: To change this, set \"online-mode\" to \"true\" in the server.properties file." + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:42:07 INFO]:", + "lines": [ + { + "number": 31, + "content": "[16:42:07 INFO]: Preparing level \"world\"" + } + ] + }, + { + "level": 3, + "time": null, + "prefix": "[16:42:07 ERROR]:", + "lines": [ + { + "number": 32, + "content": "[16:42:07 ERROR]: [Configurations] Loading a newer configuration than is supported (999 > 31)! You may have to backup & delete the minecraft:the_nether config file to start the server." + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:42:07 INFO]:", + "lines": [ + { + "number": 33, + "content": "[16:42:07 INFO]: Loading 0 persistent chunks for level 'minecraft:overworld'..." + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:42:07 INFO]:", + "lines": [ + { + "number": 34, + "content": "[16:42:07 INFO]: Prepared spawn area in 0 ms" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:42:07 INFO]:", + "lines": [ + { + "number": 35, + "content": "[16:42:07 INFO]: Loading 0 persistent chunks for level 'minecraft:the_nether'..." + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:42:07 INFO]:", + "lines": [ + { + "number": 36, + "content": "[16:42:07 INFO]: Prepared spawn area in 1 ms" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:42:07 INFO]:", + "lines": [ + { + "number": 37, + "content": "[16:42:07 INFO]: Loading 0 persistent chunks for level 'minecraft:the_end'..." + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:42:07 INFO]:", + "lines": [ + { + "number": 38, + "content": "[16:42:07 INFO]: Prepared spawn area in 0 ms" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:42:07 INFO]:", + "lines": [ + { + "number": 39, + "content": "[16:42:07 INFO]: Done preparing level \"world\" (0.116s)" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:42:07 INFO]:", + "lines": [ + { + "number": 40, + "content": "[16:42:07 INFO]: [spark] Starting background profiler..." + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:42:08 INFO]:", + "lines": [ + { + "number": 41, + "content": "[16:42:08 INFO]: Saving chunks for level 'ServerLevel[world]'\/minecraft:overworld" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:42:08 INFO]:", + "lines": [ + { + "number": 42, + "content": "[16:42:08 INFO]: Saving chunks for level 'ServerLevel[world]'\/minecraft:the_nether" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:42:08 INFO]:", + "lines": [ + { + "number": 43, + "content": "[16:42:08 INFO]: Saving chunks for level 'ServerLevel[world]'\/minecraft:the_end" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:42:08 INFO]:", + "lines": [ + { + "number": 44, + "content": "[16:42:08 INFO]: Running delayed init tasks" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:42:08 INFO]:", + "lines": [ + { + "number": 45, + "content": "[16:42:08 INFO]: Done (4.404s)! For help, type \"help\"" + }, + { + "number": 46, + "content": "" + } + ] + } + ], + "analysis": { + "problems": [ + { + "message": "The Paper config file 'config\/paper-global.yml' was created by a newer Paper version (config version 999, this server supports up to 31). Settings in it might not work.", + "counter": 1, + "entry": { + "level": 3, + "time": null, + "prefix": "[16:42:07 ERROR]:", + "lines": [ + { + "number": 18, + "content": "[16:42:07 ERROR]: [Configurations] Loading a newer configuration than is supported (999 > 31)! You may have to backup & delete your global config file to start the server." + } + ] + }, + "solutions": [ + { + "message": "Back up and delete the file 'config\/paper-global.yml'. Paper creates it again with default settings." + }, + { + "message": "Install the newer Paper version that created this config file." + } + ] + }, + { + "message": "The Paper config file 'config\/paper-world-defaults.yml' was created by a newer Paper version (config version 999, this server supports up to 31). Settings in it might not work.", + "counter": 1, + "entry": { + "level": 3, + "time": null, + "prefix": "[16:42:07 ERROR]:", + "lines": [ + { + "number": 21, + "content": "[16:42:07 ERROR]: [Configurations] Loading a newer configuration than is supported (999 > 31)! You may have to backup & delete the world defaults config file to start the server." + } + ] + }, + "solutions": [ + { + "message": "Back up and delete the file 'config\/paper-world-defaults.yml'. Paper creates it again with default settings." + }, + { + "message": "Install the newer Paper version that created this config file." + } + ] + }, + { + "message": "The Paper config file of the world 'minecraft:the_nether' was created by a newer Paper version (config version 999, this server supports up to 31). Settings in it might not work.", + "counter": 1, + "entry": { + "level": 3, + "time": null, + "prefix": "[16:42:07 ERROR]:", + "lines": [ + { + "number": 32, + "content": "[16:42:07 ERROR]: [Configurations] Loading a newer configuration than is supported (999 > 31)! You may have to backup & delete the minecraft:the_nether config file to start the server." + } + ] + }, + "solutions": [ + { + "message": "Back up and delete the file 'paper-world.yml' of the world 'minecraft:the_nether'. Paper creates it again with default settings." + }, + { + "message": "Install the newer Paper version that created this config file." + } + ] + } + ], + "information": [ + { + "message": "Minecraft version: 26.3", + "counter": 1, + "entry": { + "level": 6, + "time": null, + "prefix": "[16:42:07 INFO]:", + "lines": [ + { + "number": 12, + "content": "[16:42:07 INFO]: Starting minecraft server version 26.3" + } + ] + }, + "label": "Minecraft version", + "value": "26.3" + } + ] + } +} \ No newline at end of file diff --git a/test/data/Vanilla/Bukkit/Paper/paper-newer-config-version-26-3.log b/test/data/Vanilla/Bukkit/Paper/paper-newer-config-version-26-3.log new file mode 100644 index 00000000..451b0949 --- /dev/null +++ b/test/data/Vanilla/Bukkit/Paper/paper-newer-config-version-26-3.log @@ -0,0 +1,45 @@ +Starting org.bukkit.craftbukkit.Main +2026-11-13T15:42:04.958017Z ServerMain WARN Advanced terminal features are not available in this environment +[16:42:05 INFO]: [bootstrap] Running Java 25 (Java HotSpot(TM) 64-Bit Server VM 25.0.5.0.3+1-LTS-2; Oracle Corporation null) on Mac OS X 27.2.1 (aarch64) +[16:42:05 INFO]: [bootstrap] Loading Paper 26.3-248-main@0727243 (2026-11-10T11:35:52Z) for Minecraft 26.3 +[16:42:05 INFO]: [PluginInitializerManager] Initializing plugins... +[16:42:05 INFO]: [PluginInitializerManager] Initialized 0 plugins +[16:42:05 WARN]: [oshi.software.os.mac.MacOperatingSystem] Unable to parse version 27.2 to a codename. +[16:42:06 INFO]: [ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry] Initialising converters for DataConverter... +[16:42:06 INFO]: [com.destroystokyo.paper.profile.PaperServicesDiscoveryService] Environment: Environment[discoveryUrl=https://discovery.minecraftservices.com/minecraft/client, name=PROD] +[16:42:06 INFO]: [ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry] Finished initialising converters for DataConverter in 184,4ms +[16:42:07 INFO]: Loaded 1866 advancements +[16:42:07 INFO]: Starting minecraft server version 26.3 +[16:42:07 INFO]: Loading properties +[16:42:07 INFO]: This server is running Paper version 26.3-248-main@0727243 (2026-11-10T11:35:52Z) (Implementing API version 26.3.build.248-stable) +[16:42:07 INFO]: [spark] This server bundles the spark profiler. For more information please visit https://docs.papermc.io/paper/profiling +[16:42:07 INFO]: Server Ping Player Sample Count: 12 +[16:42:07 INFO]: Using 4 threads for Netty based IO +[16:42:07 ERROR]: [Configurations] Loading a newer configuration than is supported (999 > 31)! You may have to backup & delete your global config file to start the server. +[16:42:07 INFO]: [ca.spottedleaf.moonrise.common.util.FMA] FMA supported: true for all ARMv8 platforms +[16:42:07 INFO]: [MoonriseCommon] Paper is using 4 worker threads, 1 I/O threads +[16:42:07 ERROR]: [Configurations] Loading a newer configuration than is supported (999 > 31)! You may have to backup & delete the world defaults config file to start the server. +[16:42:07 INFO]: Default game type: SURVIVAL +[16:42:07 INFO]: Generating keypair +[16:42:07 INFO]: Starting Minecraft server on *:25599 +[16:42:07 INFO]: Paper: Using libdeflate (macOS ARM64 / Apple Silicon) compression from Velocity. +[16:42:07 INFO]: Paper: Using native (macOS ARM64 / Apple Silicon) cipher from Velocity. +[16:42:07 WARN]: **** SERVER IS RUNNING IN OFFLINE/INSECURE MODE! +[16:42:07 WARN]: The server will make no attempt to authenticate usernames. Beware. +[16:42:07 WARN]: While this makes the game possible to play without internet access, it also opens up the ability for hackers to connect with any username they choose. +[16:42:07 WARN]: To change this, set "online-mode" to "true" in the server.properties file. +[16:42:07 INFO]: Preparing level "world" +[16:42:07 ERROR]: [Configurations] Loading a newer configuration than is supported (999 > 31)! You may have to backup & delete the minecraft:the_nether config file to start the server. +[16:42:07 INFO]: Loading 0 persistent chunks for level 'minecraft:overworld'... +[16:42:07 INFO]: Prepared spawn area in 0 ms +[16:42:07 INFO]: Loading 0 persistent chunks for level 'minecraft:the_nether'... +[16:42:07 INFO]: Prepared spawn area in 1 ms +[16:42:07 INFO]: Loading 0 persistent chunks for level 'minecraft:the_end'... +[16:42:07 INFO]: Prepared spawn area in 0 ms +[16:42:07 INFO]: Done preparing level "world" (0.116s) +[16:42:07 INFO]: [spark] Starting background profiler... +[16:42:08 INFO]: Saving chunks for level 'ServerLevel[world]'/minecraft:overworld +[16:42:08 INFO]: Saving chunks for level 'ServerLevel[world]'/minecraft:the_nether +[16:42:08 INFO]: Saving chunks for level 'ServerLevel[world]'/minecraft:the_end +[16:42:08 INFO]: Running delayed init tasks +[16:42:08 INFO]: Done (4.404s)! For help, type "help" diff --git a/test/data/Vanilla/Bukkit/Paper/paper-newer-world-config-version-26-1-1.json b/test/data/Vanilla/Bukkit/Paper/paper-newer-world-config-version-26-1-1.json new file mode 100644 index 00000000..c47db85d --- /dev/null +++ b/test/data/Vanilla/Bukkit/Paper/paper-newer-world-config-version-26-1-1.json @@ -0,0 +1,614 @@ +{ + "id": "paper\/server", + "name": "Paper", + "type": "Server Log", + "version": "26.1.1", + "title": "Paper 26.1.1 Server Log", + "entries": [ + { + "level": 6, + "time": null, + "prefix": null, + "lines": [ + { + "number": 1, + "content": "Starting org.bukkit.craftbukkit.Main" + }, + { + "number": 2, + "content": "2026-11-13T15:44:22.823506Z ServerMain WARN Advanced terminal features are not available in this environment" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:44:22 INFO]:", + "lines": [ + { + "number": 3, + "content": "[16:44:22 INFO]: [bootstrap] Running Java 25 (Java HotSpot(TM) 64-Bit Server VM 25.0.5.0.3+1-LTS-2; Oracle Corporation null) on Mac OS X 27.2.1 (aarch64)" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:44:22 INFO]:", + "lines": [ + { + "number": 4, + "content": "[16:44:22 INFO]: [bootstrap] Loading Paper 26.1.1-29-dev\/26.1@77c0866 (2026-04-06T17:01:17Z) for Minecraft 26.1.1" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:44:23 INFO]:", + "lines": [ + { + "number": 5, + "content": "[16:44:23 INFO]: [PluginInitializerManager] Initializing plugins..." + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:44:23 INFO]:", + "lines": [ + { + "number": 6, + "content": "[16:44:23 INFO]: [PluginInitializerManager] Initialized 0 plugins" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:44:24 INFO]:", + "lines": [ + { + "number": 7, + "content": "[16:44:24 INFO]: Environment: Environment[sessionHost=https:\/\/sessionserver.mojang.com, servicesHost=https:\/\/api.minecraftservices.com, profilesHost=https:\/\/api.mojang.com, name=PROD]" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:44:25 INFO]:", + "lines": [ + { + "number": 8, + "content": "[16:44:25 INFO]: Loaded 1515 recipes" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:44:25 INFO]:", + "lines": [ + { + "number": 9, + "content": "[16:44:25 INFO]: Loaded 1617 advancements" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:44:25 INFO]:", + "lines": [ + { + "number": 10, + "content": "[16:44:25 INFO]: [ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry] Initialising converters for DataConverter..." + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:44:25 INFO]:", + "lines": [ + { + "number": 11, + "content": "[16:44:25 INFO]: [ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry] Finished initialising converters for DataConverter in 130,1ms" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:44:25 INFO]:", + "lines": [ + { + "number": 12, + "content": "[16:44:25 INFO]: Starting minecraft server version 26.1.1" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:44:25 INFO]:", + "lines": [ + { + "number": 13, + "content": "[16:44:25 INFO]: Loading properties" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:44:25 INFO]:", + "lines": [ + { + "number": 14, + "content": "[16:44:25 INFO]: This server is running Paper version 26.1.1-29-dev\/26.1@77c0866 (2026-04-06T17:01:17Z) (Implementing API version 26.1.1.build.29-alpha)" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:44:25 INFO]:", + "lines": [ + { + "number": 15, + "content": "[16:44:25 INFO]: [spark] This server bundles the spark profiler. For more information please visit https:\/\/docs.papermc.io\/paper\/profiling" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:44:25 INFO]:", + "lines": [ + { + "number": 16, + "content": "[16:44:25 INFO]: Server Ping Player Sample Count: 12" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:44:25 INFO]:", + "lines": [ + { + "number": 17, + "content": "[16:44:25 INFO]: Using 4 threads for Netty based IO" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:44:25 INFO]:", + "lines": [ + { + "number": 18, + "content": "[16:44:25 INFO]: [MoonriseCommon] Paper is using 4 worker threads, 1 I\/O threads" + } + ] + }, + { + "level": 3, + "time": null, + "prefix": "[16:44:25 ERROR]:", + "lines": [ + { + "number": 19, + "content": "[16:44:25 ERROR]: [Configurations] Loading a newer configuration than is supported (999 > 31)! You may have to backup & delete the world defaults config file to start the server." + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:44:25 INFO]:", + "lines": [ + { + "number": 20, + "content": "[16:44:25 INFO]: Default game type: SURVIVAL" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:44:25 INFO]:", + "lines": [ + { + "number": 21, + "content": "[16:44:25 INFO]: Generating keypair" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:44:25 INFO]:", + "lines": [ + { + "number": 22, + "content": "[16:44:25 INFO]: Starting Minecraft server on *:25598" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:44:25 INFO]:", + "lines": [ + { + "number": 23, + "content": "[16:44:25 INFO]: Paper: Using libdeflate (macOS ARM64 \/ Apple Silicon) compression from Velocity." + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:44:25 INFO]:", + "lines": [ + { + "number": 24, + "content": "[16:44:25 INFO]: Paper: Using native (macOS ARM64 \/ Apple Silicon) cipher from Velocity." + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:44:26 INFO]:", + "lines": [ + { + "number": 25, + "content": "[16:44:26 INFO]: Server permissions file permissions.yml is empty, ignoring it" + } + ] + }, + { + "level": 4, + "time": null, + "prefix": "[16:44:26 WARN]:", + "lines": [ + { + "number": 26, + "content": "[16:44:26 WARN]: **** SERVER IS RUNNING IN OFFLINE\/INSECURE MODE!" + } + ] + }, + { + "level": 4, + "time": null, + "prefix": "[16:44:26 WARN]:", + "lines": [ + { + "number": 27, + "content": "[16:44:26 WARN]: The server will make no attempt to authenticate usernames. Beware." + } + ] + }, + { + "level": 4, + "time": null, + "prefix": "[16:44:26 WARN]:", + "lines": [ + { + "number": 28, + "content": "[16:44:26 WARN]: While this makes the game possible to play without internet access, it also opens up the ability for hackers to connect with any username they choose." + } + ] + }, + { + "level": 4, + "time": null, + "prefix": "[16:44:26 WARN]:", + "lines": [ + { + "number": 29, + "content": "[16:44:26 WARN]: To change this, set \"online-mode\" to \"true\" in the server.properties file." + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:44:26 INFO]:", + "lines": [ + { + "number": 30, + "content": "[16:44:26 INFO]: Preparing level \"world\"" + } + ] + }, + { + "level": 3, + "time": null, + "prefix": "[16:44:26 ERROR]:", + "lines": [ + { + "number": 31, + "content": "[16:44:26 ERROR]: [Configurations] Loading a newer configuration than is supported (999 > 31)! You may have to backup & delete the world_nether config file to start the server." + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:44:26 INFO]:", + "lines": [ + { + "number": 32, + "content": "[16:44:26 INFO]: Loading 0 persistent chunks for level 'minecraft:overworld'..." + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:44:26 INFO]:", + "lines": [ + { + "number": 33, + "content": "[16:44:26 INFO]: Prepared spawn area in 1 ms" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:44:26 INFO]:", + "lines": [ + { + "number": 34, + "content": "[16:44:26 INFO]: Loading 0 persistent chunks for level 'minecraft:the_nether'..." + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:44:26 INFO]:", + "lines": [ + { + "number": 35, + "content": "[16:44:26 INFO]: Preparing spawn area: 100%" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:44:26 INFO]:", + "lines": [ + { + "number": 36, + "content": "[16:44:26 INFO]: Prepared spawn area in 1 ms" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:44:26 INFO]:", + "lines": [ + { + "number": 37, + "content": "[16:44:26 INFO]: Loading 0 persistent chunks for level 'minecraft:the_end'..." + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:44:26 INFO]:", + "lines": [ + { + "number": 38, + "content": "[16:44:26 INFO]: Prepared spawn area in 0 ms" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:44:26 INFO]:", + "lines": [ + { + "number": 39, + "content": "[16:44:26 INFO]: Done preparing level \"world\" (0.117s)" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:44:26 INFO]:", + "lines": [ + { + "number": 40, + "content": "[16:44:26 INFO]: [spark] Starting background profiler..." + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:44:26 INFO]:", + "lines": [ + { + "number": 41, + "content": "[16:44:26 INFO]: Saving chunks for level 'ServerLevel[world]'\/minecraft:overworld" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:44:26 INFO]:", + "lines": [ + { + "number": 42, + "content": "[16:44:26 INFO]: Saving chunks for level 'ServerLevel[world]'\/minecraft:the_nether" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:44:26 INFO]:", + "lines": [ + { + "number": 43, + "content": "[16:44:26 INFO]: Saving chunks for level 'ServerLevel[world]'\/minecraft:the_end" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:44:26 INFO]:", + "lines": [ + { + "number": 44, + "content": "[16:44:26 INFO]: ThreadedAnvilChunkStorage (world): All chunks are saved" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:44:26 INFO]:", + "lines": [ + { + "number": 45, + "content": "[16:44:26 INFO]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:44:26 INFO]:", + "lines": [ + { + "number": 46, + "content": "[16:44:26 INFO]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:44:26 INFO]:", + "lines": [ + { + "number": 47, + "content": "[16:44:26 INFO]: ThreadedAnvilChunkStorage: All dimensions are saved" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:44:26 INFO]:", + "lines": [ + { + "number": 48, + "content": "[16:44:26 INFO]: Running delayed init tasks" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:44:26 INFO]:", + "lines": [ + { + "number": 49, + "content": "[16:44:26 INFO]: Done (3.943s)! For help, type \"help\"" + }, + { + "number": 50, + "content": "" + } + ] + } + ], + "analysis": { + "problems": [ + { + "message": "The Paper config file 'config\/paper-world-defaults.yml' was created by a newer Paper version (config version 999, this server supports up to 31). Settings in it might not work.", + "counter": 1, + "entry": { + "level": 3, + "time": null, + "prefix": "[16:44:25 ERROR]:", + "lines": [ + { + "number": 19, + "content": "[16:44:25 ERROR]: [Configurations] Loading a newer configuration than is supported (999 > 31)! You may have to backup & delete the world defaults config file to start the server." + } + ] + }, + "solutions": [ + { + "message": "Back up and delete the file 'config\/paper-world-defaults.yml'. Paper creates it again with default settings." + }, + { + "message": "Install the newer Paper version that created this config file." + } + ] + }, + { + "message": "The Paper config file of the world 'world_nether' was created by a newer Paper version (config version 999, this server supports up to 31). Settings in it might not work.", + "counter": 1, + "entry": { + "level": 3, + "time": null, + "prefix": "[16:44:26 ERROR]:", + "lines": [ + { + "number": 31, + "content": "[16:44:26 ERROR]: [Configurations] Loading a newer configuration than is supported (999 > 31)! You may have to backup & delete the world_nether config file to start the server." + } + ] + }, + "solutions": [ + { + "message": "Back up and delete the file 'paper-world.yml' of the world 'world_nether'. Paper creates it again with default settings." + }, + { + "message": "Install the newer Paper version that created this config file." + } + ] + } + ], + "information": [ + { + "message": "Minecraft version: 26.1.1", + "counter": 1, + "entry": { + "level": 6, + "time": null, + "prefix": "[16:44:25 INFO]:", + "lines": [ + { + "number": 12, + "content": "[16:44:25 INFO]: Starting minecraft server version 26.1.1" + } + ] + }, + "label": "Minecraft version", + "value": "26.1.1" + } + ] + } +} \ No newline at end of file diff --git a/test/data/Vanilla/Bukkit/Paper/paper-newer-world-config-version-26-1-1.log b/test/data/Vanilla/Bukkit/Paper/paper-newer-world-config-version-26-1-1.log new file mode 100644 index 00000000..fd961f4c --- /dev/null +++ b/test/data/Vanilla/Bukkit/Paper/paper-newer-world-config-version-26-1-1.log @@ -0,0 +1,49 @@ +Starting org.bukkit.craftbukkit.Main +2026-11-13T15:44:22.823506Z ServerMain WARN Advanced terminal features are not available in this environment +[16:44:22 INFO]: [bootstrap] Running Java 25 (Java HotSpot(TM) 64-Bit Server VM 25.0.5.0.3+1-LTS-2; Oracle Corporation null) on Mac OS X 27.2.1 (aarch64) +[16:44:22 INFO]: [bootstrap] Loading Paper 26.1.1-29-dev/26.1@77c0866 (2026-04-06T17:01:17Z) for Minecraft 26.1.1 +[16:44:23 INFO]: [PluginInitializerManager] Initializing plugins... +[16:44:23 INFO]: [PluginInitializerManager] Initialized 0 plugins +[16:44:24 INFO]: Environment: Environment[sessionHost=https://sessionserver.mojang.com, servicesHost=https://api.minecraftservices.com, profilesHost=https://api.mojang.com, name=PROD] +[16:44:25 INFO]: Loaded 1515 recipes +[16:44:25 INFO]: Loaded 1617 advancements +[16:44:25 INFO]: [ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry] Initialising converters for DataConverter... +[16:44:25 INFO]: [ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry] Finished initialising converters for DataConverter in 130,1ms +[16:44:25 INFO]: Starting minecraft server version 26.1.1 +[16:44:25 INFO]: Loading properties +[16:44:25 INFO]: This server is running Paper version 26.1.1-29-dev/26.1@77c0866 (2026-04-06T17:01:17Z) (Implementing API version 26.1.1.build.29-alpha) +[16:44:25 INFO]: [spark] This server bundles the spark profiler. For more information please visit https://docs.papermc.io/paper/profiling +[16:44:25 INFO]: Server Ping Player Sample Count: 12 +[16:44:25 INFO]: Using 4 threads for Netty based IO +[16:44:25 INFO]: [MoonriseCommon] Paper is using 4 worker threads, 1 I/O threads +[16:44:25 ERROR]: [Configurations] Loading a newer configuration than is supported (999 > 31)! You may have to backup & delete the world defaults config file to start the server. +[16:44:25 INFO]: Default game type: SURVIVAL +[16:44:25 INFO]: Generating keypair +[16:44:25 INFO]: Starting Minecraft server on *:25598 +[16:44:25 INFO]: Paper: Using libdeflate (macOS ARM64 / Apple Silicon) compression from Velocity. +[16:44:25 INFO]: Paper: Using native (macOS ARM64 / Apple Silicon) cipher from Velocity. +[16:44:26 INFO]: Server permissions file permissions.yml is empty, ignoring it +[16:44:26 WARN]: **** SERVER IS RUNNING IN OFFLINE/INSECURE MODE! +[16:44:26 WARN]: The server will make no attempt to authenticate usernames. Beware. +[16:44:26 WARN]: While this makes the game possible to play without internet access, it also opens up the ability for hackers to connect with any username they choose. +[16:44:26 WARN]: To change this, set "online-mode" to "true" in the server.properties file. +[16:44:26 INFO]: Preparing level "world" +[16:44:26 ERROR]: [Configurations] Loading a newer configuration than is supported (999 > 31)! You may have to backup & delete the world_nether config file to start the server. +[16:44:26 INFO]: Loading 0 persistent chunks for level 'minecraft:overworld'... +[16:44:26 INFO]: Prepared spawn area in 1 ms +[16:44:26 INFO]: Loading 0 persistent chunks for level 'minecraft:the_nether'... +[16:44:26 INFO]: Preparing spawn area: 100% +[16:44:26 INFO]: Prepared spawn area in 1 ms +[16:44:26 INFO]: Loading 0 persistent chunks for level 'minecraft:the_end'... +[16:44:26 INFO]: Prepared spawn area in 0 ms +[16:44:26 INFO]: Done preparing level "world" (0.117s) +[16:44:26 INFO]: [spark] Starting background profiler... +[16:44:26 INFO]: Saving chunks for level 'ServerLevel[world]'/minecraft:overworld +[16:44:26 INFO]: Saving chunks for level 'ServerLevel[world]'/minecraft:the_nether +[16:44:26 INFO]: Saving chunks for level 'ServerLevel[world]'/minecraft:the_end +[16:44:26 INFO]: ThreadedAnvilChunkStorage (world): All chunks are saved +[16:44:26 INFO]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved +[16:44:26 INFO]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved +[16:44:26 INFO]: ThreadedAnvilChunkStorage: All dimensions are saved +[16:44:26 INFO]: Running delayed init tasks +[16:44:26 INFO]: Done (3.943s)! For help, type "help" diff --git a/test/tests/Logs/AutoLogsTest.php b/test/tests/Logs/AutoLogsTest.php index ce67cfaf..c811a1e4 100644 --- a/test/tests/Logs/AutoLogsTest.php +++ b/test/tests/Logs/AutoLogsTest.php @@ -520,6 +520,26 @@ public function test_paper_multiple_dependencies_plugin_names_with_dash_and_dot( $this->assertStringEqualsFile($log->getExpectedPath(), $log->getOutput(), $log->getLogPath()); } + /** + * @return void + * @throws Exception + */ + public function test_paper_newer_config_version_26_3(): void + { + $log = new TestLog('Vanilla/Bukkit/Paper/paper-newer-config-version-26-3.log'); + $this->assertStringEqualsFile($log->getExpectedPath(), $log->getOutput(), $log->getLogPath()); + } + + /** + * @return void + * @throws Exception + */ + public function test_paper_newer_world_config_version_26_1_1(): void + { + $log = new TestLog('Vanilla/Bukkit/Paper/paper-newer-world-config-version-26-1-1.log'); + $this->assertStringEqualsFile($log->getExpectedPath(), $log->getOutput(), $log->getLogPath()); + } + /** * @return void * @throws Exception @@ -2319,4 +2339,4 @@ public function test_velocity(): void $log = new TestLog('Velocity/velocity.log'); $this->assertStringEqualsFile($log->getExpectedPath(), $log->getOutput(), $log->getLogPath()); } -} +} \ No newline at end of file