Merge branch 'ver/1.19.4' into codex/patch-server.jar-to-preserve-server.properties-7sk4pj
This commit is contained in:
2 files changed
+1
-21
No files matched your search
@@ -28,6 +28,7 @@ Purpur is a drop-in replacement for [Paper](https://github.com/PaperMC/Paper) se
|
||||
EXPERIMENTAL (may break things):
|
||||
|
||||
- Keep chunks loaded while a villager is being cured.
|
||||
- Prevent server.properties from being overwritten by the server.
|
||||
|
||||
## Downloads
|
||||
Downloads can be obtained from the [downloads page](https://purpurmc.org/downloads/) or the [downloads API](https://api.purpurmc.org).
|
||||
|
||||
@@ -25,24 +25,3 @@ index 1111111111111111111111111111111111111111..22222222222222222222222222222222
|
||||
try {
|
||||
this.properties.store(this.path);
|
||||
} catch (Exception var2) {
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/Settings.java b/src/main/java/net/minecraft/server/dedicated/Settings.java
|
||||
index 3333333333333333333333333333333333333333..4444444444444444444444444444444444444444 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/Settings.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/Settings.java
|
||||
@@ -1,6 +1,7 @@
|
||||
import com.mojang.logging.LogUtils;
|
||||
+import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.Properties;
|
||||
import org.slf4j.Logger;
|
||||
@@ -40,6 +41,10 @@ public abstract class Settings<T extends Settings<T>> {
|
||||
}
|
||||
|
||||
public void store(Path path) {
|
||||
+ if (Files.exists(path)) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
try {
|
||||
this.properties.store(path);
|
||||
} catch (Exception var3) {
|
||||
Reference in new issue
Block a user