From b35218fef9cef5a39d9dbc6c2ac338fff5527249 Mon Sep 17 00:00:00 2001 From: ChomeNS <95471003+ChomeNS@users.noreply.github.com> Date: Fri, 13 Oct 2023 20:24:03 +0700 Subject: [PATCH] mabe fix but mabe not --- .../chomens_bot/util/PersistentDataUtilities.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/land/chipmunk/chayapak/chomens_bot/util/PersistentDataUtilities.java b/src/main/java/land/chipmunk/chayapak/chomens_bot/util/PersistentDataUtilities.java index 4fe5cc3..dcc76dd 100644 --- a/src/main/java/land/chipmunk/chayapak/chomens_bot/util/PersistentDataUtilities.java +++ b/src/main/java/land/chipmunk/chayapak/chomens_bot/util/PersistentDataUtilities.java @@ -40,11 +40,13 @@ public class PersistentDataUtilities { final String property = entry.getKey(); final JsonElement value = entry.getValue(); - jsonObject.add(property, value); + Main.executorService.submit(() -> { + jsonObject.add(property, value); - write(jsonObject.toString()); + write(jsonObject.toString()); - queue.remove(property); + queue.remove(property); + }); } catch (Exception e) { e.printStackTrace(); }