Prevent server.properties overwrite on save #3

Merged
NotAlexNoyle merged 1 commits from codex/patch-server.jar-to-preserve-server.properties into ver/1.19.4 2026-01-20 11:52:35 -05:00
NotAlexNoyle commented 2026-01-20 11:51:40 -05:00 (Migrated from github.com)

Motivation

  • Prevent the server from overwriting an existing server.properties file by only creating it when missing.

Description

  • Add patches/server/0313-Prevent-server-properties-overwrite.patch which updates DedicatedServerSettings.save() to import java.nio.file.Files and early-return when Files.exists(this.path) so the file is not overwritten.

Testing

  • No automated tests were run.

Codex Task

### Motivation - Prevent the server from overwriting an existing `server.properties` file by only creating it when missing. ### Description - Add `patches/server/0313-Prevent-server-properties-overwrite.patch` which updates `DedicatedServerSettings.save()` to import `java.nio.file.Files` and early-return when `Files.exists(this.path)` so the file is not overwritten. ### Testing - No automated tests were run. ------ [Codex Task](https://chatgpt.com/codex/tasks/task_e_696fa6096ac8832fa894d6a343f480ae)
Sign in to join this conversation.