From 10d1709c6f0aa25690cc129dc92f82c9f4399525 Mon Sep 17 00:00:00 2001 From: tastybento Date: Mon, 16 Sep 2024 20:41:06 -0700 Subject: [PATCH 1/2] Skip null worlds that have not been loaded but in database. --- src/main/java/world/bentobox/level/LevelsManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/world/bentobox/level/LevelsManager.java b/src/main/java/world/bentobox/level/LevelsManager.java index 39316f6..448757a 100644 --- a/src/main/java/world/bentobox/level/LevelsManager.java +++ b/src/main/java/world/bentobox/level/LevelsManager.java @@ -107,7 +107,8 @@ public void migrate() { * @return true if successful, false if not added */ private boolean addToTopTen(Island island, long lv) { - if (island != null && island.getOwner() != null && hasTopTenPerm(island.getWorld(), island.getOwner())) { + if (island != null && island.getOwner() != null && island.getWorld() != null + && hasTopTenPerm(island.getWorld(), island.getOwner())) { topTenLists.computeIfAbsent(island.getWorld(), k -> new TopTenData(island.getWorld())).getTopTen() .put(island.getUniqueId(), lv); return true; From 2c21c8da71d9707b67f285f81e96e2a69dc4b343 Mon Sep 17 00:00:00 2001 From: tastybento Date: Mon, 16 Sep 2024 20:42:16 -0700 Subject: [PATCH 2/2] Version 2.16.1 --- pom.xml | 2 +- src/test/java/world/bentobox/level/LevelsManagerTest.java | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 57014a2..268f834 100644 --- a/pom.xml +++ b/pom.xml @@ -71,7 +71,7 @@ -LOCAL - 2.16.0 + 2.16.1 BentoBoxWorld_Level bentobox-world https://sonarcloud.io diff --git a/src/test/java/world/bentobox/level/LevelsManagerTest.java b/src/test/java/world/bentobox/level/LevelsManagerTest.java index e8b0361..2155ee2 100644 --- a/src/test/java/world/bentobox/level/LevelsManagerTest.java +++ b/src/test/java/world/bentobox/level/LevelsManagerTest.java @@ -4,7 +4,6 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import static org.mockito.ArgumentMatchers.any; -import static org.mockito.ArgumentMatchers.anyBoolean; import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.eq;