private void BlockEquipsIfDisabled()
        {
            var mymod = (NihilismMod)this.mod;

            if (!NihilismConfig.Instance.EnableItemEquipsFilters)
            {
                return;
            }

            var myworld = ModContent.GetInstance <NihilismWorld>();

            if (myworld.Logic == null)
            {
                return;
            }
            if (!myworld.Logic.DataAccess.IsActive())
            {
                return;
            }

            bool _;

            for (int i = 0; i < this.player.armor.Length; i++)
            {
                Item item = this.player.armor[i];
                if (item == null || item.IsAir)
                {
                    continue;
                }

                if (!myworld.Logic.DataAccess.IsItemEnabled(item, out _, out _))
                {
                    PlayerItemLibraries.DropEquippedArmorItem(player, i);
                }
            }

            for (int i = 0; i < this.player.miscEquips.Length; i++)
            {
                Item item = this.player.armor[i];
                if (item == null || item.IsAir)
                {
                    continue;
                }

                if (!myworld.Logic.DataAccess.IsItemEnabled(item, out _, out _))
                {
                    PlayerItemLibraries.DropEquippedMiscItem(player, i);
                }
            }

            if (mymod.WingSlotMod != null)
            {
                this.BlockWingSlotIfDisabled("EquipSlot");
                this.BlockWingSlotIfDisabled("VanitySlot");
            }
        }
        private void TestMiscSlots(ISet <Type> abilityItemTypes)
        {
            int maxMiscSlot = this.player.miscEquips.Length;

            string alert;

            // Test each item against equipped ability items
            for (int slot = 0; slot < maxMiscSlot; slot++)
            {
                Item item = this.player.miscEquips[slot];
                if (item == null || item.IsAir)
                {
                    continue;
                }

                if (!this.TestMiscAgainstMissingAbilities(abilityItemTypes, slot, out alert))
                {
                    Main.NewText(alert, Color.Yellow);
                    PlayerItemLibraries.DropEquippedMiscItem(this.player, slot, 0);
                    continue;
                }
            }
        }
        private void BlockEquipsIf()
        {
            var config = RuinedItemsConfig.Instance;

            if (!config.Get <bool>(nameof(config.RuinedItemsLockedFromUse)))
            {
                return;
            }

            for (int i = 0; i < this.player.armor.Length; i++)
            {
                Item item = this.player.armor[i];
                if (item == null || item.IsAir)
                {
                    continue;
                }

                if (item.prefix == ModContent.PrefixType <RuinedPrefix>())
                {
                    PlayerItemLibraries.DropEquippedArmorItem(player, i);
                }
            }

            for (int i = 0; i < this.player.miscEquips.Length; i++)
            {
                Item item = this.player.armor[i];
                if (item == null || item.IsAir)
                {
                    continue;
                }

                if (item.prefix == ModContent.PrefixType <RuinedPrefix>())
                {
                    PlayerItemLibraries.DropEquippedMiscItem(player, i);
                }
            }
        }