Skip to content

Commit

Permalink
Skip null worlds that have not been loaded but in database.
Browse files Browse the repository at this point in the history
  • Loading branch information
tastybento committed Sep 17, 2024
1 parent dbf3621 commit 10d1709
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/world/bentobox/level/LevelsManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 10d1709

Please sign in to comment.