Search in sources :

Example 1 with SkullItem

use of com.archyx.aureliumskills.menu.items.SkullItem in project AureliumSkills by Archy-X.

the class StatsMenu method init.

@Override
public void init(Player player, InventoryContents contents) {
    PlayerData playerData = plugin.getPlayerManager().getPlayerData(player);
    if (playerData != null) {
        // Fill item
        if (options.isFillEnabled()) {
            contents.fill(ClickableItem.empty(options.getFillItem()));
        }
        SkullItem skullItem = (SkullItem) options.getItem(ItemType.SKULL);
        contents.set(skullItem.getPos(), ClickableItem.empty(skullItem.getItem(player, playerData, locale)));
        StatTemplate statTemplate = (StatTemplate) options.getTemplate(TemplateType.STAT);
        contents.set(statTemplate.getPos(Stats.STRENGTH), ClickableItem.empty(statTemplate.getItem(Stats.STRENGTH, playerData, player, locale)));
        contents.set(statTemplate.getPos(Stats.HEALTH), ClickableItem.empty(statTemplate.getItem(Stats.HEALTH, playerData, player, locale)));
        contents.set(statTemplate.getPos(Stats.REGENERATION), ClickableItem.empty(statTemplate.getItem(Stats.REGENERATION, playerData, player, locale)));
        contents.set(statTemplate.getPos(Stats.LUCK), ClickableItem.empty(statTemplate.getItem(Stats.LUCK, playerData, player, locale)));
        contents.set(statTemplate.getPos(Stats.WISDOM), ClickableItem.empty(statTemplate.getItem(Stats.WISDOM, playerData, player, locale)));
        contents.set(statTemplate.getPos(Stats.TOUGHNESS), ClickableItem.empty(statTemplate.getItem(Stats.TOUGHNESS, playerData, player, locale)));
    }
}
Also used : SkullItem(com.archyx.aureliumskills.menu.items.SkullItem) StatTemplate(com.archyx.aureliumskills.menu.templates.StatTemplate) PlayerData(com.archyx.aureliumskills.data.PlayerData)

Aggregations

PlayerData (com.archyx.aureliumskills.data.PlayerData)1 SkullItem (com.archyx.aureliumskills.menu.items.SkullItem)1 StatTemplate (com.archyx.aureliumskills.menu.templates.StatTemplate)1