From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Zeanon Date: Wed, 14 Apr 2021 16:18:13 +0200 Subject: [PATCH] Dont write unwritable json files paper diff --git a/src/main/java/net/minecraft/server/JsonList.java b/src/main/java/net/minecraft/server/JsonList.java index c97be42dd7b4c6ea2cadcc97f47185c7f02e2cce..3298ed8dcf5e86afefcb9d55447cff7435eaaee7 100644 --- a/src/main/java/net/minecraft/server/JsonList.java +++ b/src/main/java/net/minecraft/server/JsonList.java @@ -168,6 +168,11 @@ public class JsonList> { } public void save() throws IOException { + //Steamwar Start + if (!this.c.canWrite()) { + return; + } + //Steamwar End Don't write to unwriteable files this.removeStaleEntries(); // Paper - remove expired values before saving Collection collection = this.d.values(); String s = this.b.toJson(collection);