Archiviert
13
0
Dieses Repository wurde am 2021-12-14 archiviert. Du kannst Dateien ansehen und es klonen, aber nicht pushen oder Issues/Pull-Requests öffnen.
SteamSpigot/Paper/SteamWar-Patches/Dont_write_unwritable_json_files_paper.patch

21 Zeilen
917 B
Diff

2020-12-26 23:49:53 +01:00
Index: src/main/java/net/minecraft/server/JsonList.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/src/main/java/net/minecraft/server/JsonList.java b/src/main/java/net/minecraft/server/JsonList.java
2021-04-12 19:54:42 +02:00
--- a/src/main/java/net/minecraft/server/JsonList.java (revision 403d1f3f73eeb2b64054992d57aaacd68d0b4547)
+++ b/src/main/java/net/minecraft/server/JsonList.java (date 1618244429374)
@@ -168,6 +168,11 @@
2020-12-26 23:49:53 +01:00
}
public void save() throws IOException {
2021-04-12 19:54:42 +02:00
+ //Steamwar Start
2021-04-13 20:03:49 +02:00
+ if (!this.c.canWrite()) {
2020-12-26 23:49:53 +01:00
+ return;
2021-04-12 19:54:42 +02:00
+ }
+ //Steamwar End Don't write to unwriteable files
this.removeStaleEntries(); // Paper - remove expired values before saving
2020-12-26 23:49:53 +01:00
Collection<V> collection = this.d.values();
String s = this.b.toJson(collection);