Removed condition that always waa true.

This commit is contained in:
tastybento 2019-12-18 13:27:59 -08:00
parent 002da7594f
commit 5c9c84c98a

View File

@ -7,7 +7,6 @@ import org.bukkit.Bukkit;
import world.bentobox.bentobox.api.addons.request.AddonRequestHandler;
import world.bentobox.level.Level;
import world.bentobox.level.objects.TopTenData;
/**
@ -54,8 +53,7 @@ public class TopTenRequestHandler extends AddonRequestHandler {
return Collections.emptyMap();
}
// Null-point check.
TopTenData data = addon.getTopTen().getTopTenList(Bukkit.getWorld((String) map.get(WORLD_NAME)));
return data != null ? data.getTopTen() : Collections.emptyMap();
// No null check required
return addon.getTopTen().getTopTenList(Bukkit.getWorld((String) map.get(WORLD_NAME))).getTopTen();
}
}