From ecf762947e3adc6e2595c0d6e1de6bcff318ee2e Mon Sep 17 00:00:00 2001 From: Auxilor Date: Tue, 4 Oct 2022 12:16:46 +0100 Subject: [PATCH] Fixed EnchantGUI --- .../kotlin/com/willfp/ecoenchants/enchants/EnchantGUI.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/enchants/EnchantGUI.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/enchants/EnchantGUI.kt index 6844b729..6ee627c7 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/enchants/EnchantGUI.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/enchants/EnchantGUI.kt @@ -3,6 +3,7 @@ package com.willfp.ecoenchants.enchants import com.github.benmanes.caffeine.cache.Caffeine import com.willfp.eco.core.config.updating.ConfigUpdater import com.willfp.eco.core.drops.DropQueue +import com.willfp.eco.core.fast.fast import com.willfp.eco.core.gui.GUIComponent import com.willfp.eco.core.gui.menu import com.willfp.eco.core.gui.menu.Menu @@ -77,7 +78,11 @@ object EnchantGUI { if (atCaptive.isEmpty || atCaptive == null || atCaptive.type == Material.BOOK) { menu.addState(player, "enchants", EcoEnchants.values().sortForDisplay()) } else { - menu.addState(player, "enchants", atCaptive.applicableEnchantments.sortForDisplay()) + menu.addState( + player, + "enchants", + atCaptive.applicableEnchantments.sortForDisplay().subtract(atCaptive.fast().enchants.keys) + ) } if (menu.getPage(player) > menu.getMaxPage(player)) {