isEmpty addition

This commit is contained in:
Rsl1122 2017-11-27 12:22:37 +02:00
parent 46ea5ccc6e
commit ec3d2eba02

View File

@ -57,6 +57,8 @@ public class KingdomsData extends PluginData {
Map<String, OfflineKingdom> kingdoms = GameManagement.getKingdomManager().getKingdomList(); Map<String, OfflineKingdom> kingdoms = GameManagement.getKingdomManager().getKingdomList();
analysisContainer.addValue(getWithIcon("Kingdoms", "shield", "amber"), kingdoms.size()); analysisContainer.addValue(getWithIcon("Kingdoms", "shield", "amber"), kingdoms.size());
if (!kingdoms.isEmpty()) {
analysisContainer.addHtml("kingdomsAccordion", KingdomAccordionCreator.createAccordion(kingdoms)); analysisContainer.addHtml("kingdomsAccordion", KingdomAccordionCreator.createAccordion(kingdoms));
Map<UUID, String> userKingDoms = new HashMap<>(); Map<UUID, String> userKingDoms = new HashMap<>();
@ -67,6 +69,7 @@ public class KingdomsData extends PluginData {
} }
} }
analysisContainer.addPlayerTableValues(getWithIcon("Kingdom", "shield"), userKingDoms); analysisContainer.addPlayerTableValues(getWithIcon("Kingdom", "shield"), userKingDoms);
}
return analysisContainer; return analysisContainer;
} }