Search in sources :

Example 1 with SmartInventory

use of fr.minuskube.inv.SmartInventory in project Nexus by ProjectEdenGG.

the class AchievementProvider method open.

public static void open(Player player) {
    SmartInventory inv = SmartInventory.builder().provider(new AchievementGroupProvider()).size((int) ((Math.ceil(AchievementGroup.values().length / 9)) + 2), 9).title(colorize("&3Achievements")).build();
    inv.open(player);
}
Also used : SmartInventory(fr.minuskube.inv.SmartInventory)

Example 2 with SmartInventory

use of fr.minuskube.inv.SmartInventory in project Nexus by ProjectEdenGG.

the class CombinationLockProvider method parseCode.

public void parseCode(Player player, InventoryContents contents) {
    int[][] groups = { { 0, 1, 2 }, { 3, 4, 5 }, { 6, 7, 8 } };
    boolean[] correct = { false, false, false };
    for (int i = 0; i < groups.length; i++) {
        if (!isNullOrEmpty(playerCode) && playerCode.length() == CORRECT_CODE.length())
            for (int j = 0; j < groups[i].length; j++) if (playerCode.charAt(groups[i][j]) == CORRECT_CODE.charAt(groups[i][j]))
                correct[i] = true;
            else {
                correct[i] = false;
                break;
            }
        for (int j = 0; j < groups[i].length; j++) {
            Material mat = correct[i] ? Material.LIME_STAINED_GLASS_PANE : Material.RED_STAINED_GLASS_PANE;
            contents.set(4, groups[i][j], ClickableItem.empty(new ItemBuilder(mat).name(" ").build()));
        }
    }
    Tasks.wait(TickTime.SECOND.x(5), () -> {
        if (correct[0] && correct[1] && correct[2])
            complete(player);
        else {
            SmartInventory inv = SmartInvsPlugin.manager().getInventory(player).orElse(null);
            if (inv != null && inv.getProvider() == this)
                Halloween20Menus.openComboLock(player);
        }
    });
}
Also used : SmartInventory(fr.minuskube.inv.SmartInventory) ItemBuilder(gg.projecteden.nexus.utils.ItemBuilder) Material(org.bukkit.Material)

Example 3 with SmartInventory

use of fr.minuskube.inv.SmartInventory in project Nexus by ProjectEdenGG.

the class ItemEditorMenu method openItemEditor.

public static void openItemEditor(Player player, ItemEditMenu menu) {
    SmartInventory inv = SmartInventory.builder().provider(new ItemEditorProvider(menu)).size(menu.getSize(), 9).title("Customize Item").build();
    inv.open(player);
}
Also used : SmartInventory(fr.minuskube.inv.SmartInventory) ItemEditorProvider(gg.projecteden.nexus.features.menus.itemeditor.providers.ItemEditorProvider)

Example 4 with SmartInventory

use of fr.minuskube.inv.SmartInventory in project Nexus by ProjectEdenGG.

the class TeamMenus method openTeamsEditorMenu.

public void openTeamsEditorMenu(Player player, Arena arena, Team team) {
    SmartInventory INV = SmartInventory.builder().id("teamEditorMenu").title("Team Editor Menu").provider(new TeamEditorMenu(arena, team)).size(3, 9).build();
    INV.open(player);
}
Also used : SmartInventory(fr.minuskube.inv.SmartInventory)

Example 5 with SmartInventory

use of fr.minuskube.inv.SmartInventory in project Nexus by ProjectEdenGG.

the class TeamMenus method openDeleteTeamMenu.

public void openDeleteTeamMenu(Player player, Arena arena, Team team) {
    SmartInventory INV = SmartInventory.builder().id("teamDeleteMenu").title("Delete Team?").provider(new DeleteTeamMenu(arena, team)).size(3, 9).build();
    INV.open(player);
}
Also used : SmartInventory(fr.minuskube.inv.SmartInventory)

Aggregations

SmartInventory (fr.minuskube.inv.SmartInventory)22 InventoryProvider (fr.minuskube.inv.content.InventoryProvider)3 Material (org.bukkit.Material)3 ClickableItem (fr.minuskube.inv.ClickableItem)2 InventoryContents (fr.minuskube.inv.content.InventoryContents)2 DeleteLoadoutMenu (gg.projecteden.nexus.features.minigames.menus.teams.loadout.DeleteLoadoutMenu)2 List (java.util.List)2 Player (org.bukkit.entity.Player)2 ItemStack (org.bukkit.inventory.ItemStack)2 AureliumSkills (com.archyx.aureliumskills.AureliumSkills)1 OptionL (com.archyx.aureliumskills.configuration.OptionL)1 PlayerData (com.archyx.aureliumskills.data.PlayerData)1 Lang (com.archyx.aureliumskills.lang.Lang)1 MenuMessage (com.archyx.aureliumskills.lang.MenuMessage)1 com.archyx.aureliumskills.menu.items (com.archyx.aureliumskills.menu.items)1 InProgressTemplate (com.archyx.aureliumskills.menu.templates.InProgressTemplate)1 LockedTemplate (com.archyx.aureliumskills.menu.templates.LockedTemplate)1 TemplateType (com.archyx.aureliumskills.menu.templates.TemplateType)1 UnlockedTemplate (com.archyx.aureliumskills.menu.templates.UnlockedTemplate)1 Skill (com.archyx.aureliumskills.skills.Skill)1