From d7d53bf9e2f8f97ff9bfcb8df0c751dde2d1e772 Mon Sep 17 00:00:00 2001 From: Intelli Date: Sat, 8 Jul 2023 13:57:36 -0600 Subject: [PATCH] Fixed NullPointerException while performing rollbacks --- src/main/java/net/coreprotect/database/Rollback.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/coreprotect/database/Rollback.java b/src/main/java/net/coreprotect/database/Rollback.java index e2abda03..aa0c2efc 100644 --- a/src/main/java/net/coreprotect/database/Rollback.java +++ b/src/main/java/net/coreprotect/database/Rollback.java @@ -349,8 +349,8 @@ else if (table == 1) { // container clearInventories = true; } - ArrayList data = finalBlockList.get(chunkKey); - ArrayList itemData = finalItemList.get(chunkKey); + ArrayList data = finalBlockList.getOrDefault(chunkKey, new ArrayList<>()); + ArrayList itemData = finalItemList.getOrDefault(chunkKey, new ArrayList<>()); Map chunkChanges = new LinkedHashMap<>(); for (Object[] row : data) {