Added an islands count for gamemodes in Management Panel

This commit is contained in:
Florian CUNY 2019-05-12 11:38:30 +02:00
parent b89b3972cb
commit c60e790749
2 changed files with 8 additions and 1 deletions

View File

@ -57,9 +57,12 @@ public class ManagementPanel {
break;
}
for (Addon addon : addons) {
GameModeAddon gameModeAddon = (GameModeAddon) addon;
PanelItem addonItem = new PanelItemBuilder()
.icon(addon.getDescription().getIcon())
.name(ChatColor.WHITE + addon.getDescription().getName())
.name(user.getTranslation(LOCALE_REF + "views.gamemodes.gamemode.name", TextVariables.NAME, addon.getDescription().getName()))
.description(user.getTranslation(LOCALE_REF + "views.gamemodes.gamemode.description",
"[islands]", String.valueOf(addon.getIslands().getIslandCount(gameModeAddon.getOverWorld()))))
.build();
builder.item(startSlot + i, addonItem);

View File

@ -1001,6 +1001,10 @@ management:
schems:
name: "&6Schems"
description: "&aOpens the Admin Schem menu."
gamemode:
name: "&f[name]"
description: |+
&aIslands: &b[islands]
addons:
name: "&6Addons"
description: "&eClick &ato display currently loaded Addons"