mirror of
https://github.com/BentoBoxWorld/Level.git
synced 2024-11-25 03:55:31 +01:00
Skip null worlds that have not been loaded but in database.
This commit is contained in:
parent
dbf3621cee
commit
10d1709c6f
@ -107,7 +107,8 @@ public class LevelsManager {
|
|||||||
* @return true if successful, false if not added
|
* @return true if successful, false if not added
|
||||||
*/
|
*/
|
||||||
private boolean addToTopTen(Island island, long lv) {
|
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()
|
topTenLists.computeIfAbsent(island.getWorld(), k -> new TopTenData(island.getWorld())).getTopTen()
|
||||||
.put(island.getUniqueId(), lv);
|
.put(island.getUniqueId(), lv);
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user