EpicBanItemTeam / VirtualChest

A sponge plugin providing virtual chest GUIs for menus like ChestCommands
https://ore.spongepowered.org/zzzz/VirtualChest
GNU Lesser General Public License v3.0
34 stars 12 forks source link

vchest nolonger accepting our requirements after updating #106

Closed KhaozFrost closed 5 years ago

KhaozFrost commented 5 years ago

https://pastebin.com/UtscMKcw

Slot10 = [{
    Item {
        Count = 1
        ItemType = "pixelmon:pixelmon_sprite"
        UnsafeDamage = 0
        DisplayName = "&cEgg Information Unavailable."
        ItemLore = []
        UnsafeData {
            SpriteName = "pixelmon:sprites/eggs/egg1"
        }
    }
    PrimaryAction {
        Command = "console: vchest open poke1 %player%"
        KeepInventoryOpen = false
    }
    Requirements = "%trainer_team_1% == 'The eggs are disabled.'"
}, {
    Item {
        Count = 1
        ItemType = "pixelmon:pixelmon_sprite"
        UnsafeDamage = 0
        DisplayName = "&a%trainer_team_1% &8&l: &eLvl %trainer_team_1_level%"
        ItemLore = [
            "%javascript_unbreedable_1% &8&l: %javascript_untradeable_1%"
            ""
            "&7Ball: &e%trainer_team_1_ball%"
            "&7Ability: &e%javascript_formability_1%"
            "&7Nature: &e%trainer_team_1_nature% &8(&a+%trainer_team_1_nature_increased% &8| &c-%trainer_team_1_nature_decreased%&8)"
            "&7Gender: &e%trainer_team_1_gender%"
            "&7Size: &e%trainer_team_1_growth%"
            "&7HiddenPower: &e%trainer_team_1_hiddenpower%"
            ""
            "&7IVs: &e%trainer_team_1_stats_ivs_total%&7/&e186 &8(&f%trainer_team_1_stats_ivs_totalpercentage%%&8)"
            "&cHP: %trainer_team_1_stats_ivs_hp% &7/ &6Atk: %trainer_team_1_stats_ivs_atk% &7/ &eDef: %trainer_team_1_stats_ivs_def%"
            "&9SpA: %trainer_team_1_stats_ivs_spa% &7/ &aSpD: %trainer_team_1_stats_ivs_spd% &7/ &dSpe: %trainer_team_1_stats_ivs_spe%"
            "&7EVs: &e%trainer_team_1_stats_evs_total%&7/&e510 &8(&f%trainer_team_1_stats_evs_totalpercentage%%&8)"
            "&cHP: %trainer_team_1_stats_evs_hp% &7/ &6Atk: %trainer_team_1_stats_evs_atk% &7/ &eDef: %trainer_team_1_stats_evs_def%"
            "&9SpA: %trainer_team_1_stats_evs_spa% &7/ &aSpD: %trainer_team_1_stats_evs_spd% &7/ &dSpe: %trainer_team_1_stats_evs_spe%"
            ""
            "&7Moves:"
            "&7-&f %trainer_team_1_moveset_1%"
            "&7-&f %trainer_team_1_moveset_2%"
            "&7-&f %trainer_team_1_moveset_3%"
            "&7-&f %trainer_team_1_moveset_4%"
        ]
        UnsafeData {
            SpriteName = "%trainer_team_1_texturelocation%"
        }
    }
    PrimaryAction {
        Command = "console: vchest open poke1 %player%"
        KeepInventoryOpen = false
    }
    Requirements = "%trainer_team_1% != '' && %javascript_canbeused_1% != 'false'"
}, {
    Item {
        Count = 1
        ItemType = "%javascript_canbeuseditem_1%"
        UnsafeDamage = 0
        DisplayName = "%javascript_canbeusedslot_1%"
        ItemLore = []
        Requirements = "%trainer_team_1% != ''"
    }
}, {
    Item {
        Count = 1
        ItemType = "%javascript_canbeuseditem_1%"
        UnsafeDamage = 0
        DisplayName = "&a%trainer_team_1% &8&l: &eLvl %trainer_team_1_level%"
        ItemLore = [
            "%javascript_canbeusedslot_1%"
        ]
    }
}]
ustc-zzzz commented 5 years ago

Requirements is not a child option of Item.

# incorrect
{
    Item {
        Count = 1
        ItemType = "%javascript_canbeuseditem_1%"
        UnsafeDamage = 0
        DisplayName = "%javascript_canbeusedslot_1%"
        ItemLore = []
        Requirements = "%trainer_team_1% != ''"
    }
}

# correct
{
    Item {
        Count = 1
        ItemType = "%javascript_canbeuseditem_1%"
        UnsafeDamage = 0
        DisplayName = "%javascript_canbeusedslot_1%"
        ItemLore = []
    }
    Requirements = "%trainer_team_1% != ''"
}

Besides, try vscode plugin for formatting hocon files.