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(); }