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