Search in sources :

Example 1 with DisplayConfig

use of cc.hyperium.mods.levelhead.display.DisplayConfig in project Hyperium by HyperiumClient.

the class Levelhead method refreshPurchaseStates.

public synchronized void refreshPurchaseStates() {
    purchaseStatus = new LevelheadJsonHolder(rawWithAgent("https://api.sk1er.club/levelhead_purchase_status/" + Minecraft.getMinecraft().getSession().getProfile().getId().toString()));
    levelheadPurchaseStates.setChat(purchaseStatus.optBoolean("chat"));
    levelheadPurchaseStates.setTab(purchaseStatus.optBoolean("tab"));
    levelheadPurchaseStates.setExtraHead(purchaseStatus.optInt("head"));
    DisplayManager displayManager = this.displayManager;
    while (displayManager.getAboveHead().size() <= levelheadPurchaseStates.getExtraHead()) {
        displayManager.getAboveHead().add(new AboveHeadDisplay(new DisplayConfig()));
    }
    displayManager.adjustIndexes();
}
Also used : DisplayManager(cc.hyperium.mods.levelhead.display.DisplayManager) LevelheadJsonHolder(cc.hyperium.mods.levelhead.util.LevelheadJsonHolder) DisplayConfig(cc.hyperium.mods.levelhead.display.DisplayConfig) AboveHeadDisplay(cc.hyperium.mods.levelhead.display.AboveHeadDisplay)

Aggregations

AboveHeadDisplay (cc.hyperium.mods.levelhead.display.AboveHeadDisplay)1 DisplayConfig (cc.hyperium.mods.levelhead.display.DisplayConfig)1 DisplayManager (cc.hyperium.mods.levelhead.display.DisplayManager)1 LevelheadJsonHolder (cc.hyperium.mods.levelhead.util.LevelheadJsonHolder)1