This commit is contained in:
Auxilor 2022-10-04 00:09:43 +01:00
parent 6ecf7b8a01
commit 30c25ac16a
4 changed files with 6 additions and 6 deletions

View File

@ -65,8 +65,9 @@ abstract class EcoEnchant(
private val conflictNames = config.getStrings("conflicts")
val conflictsWithEverything = conflictNames.containsIgnoreCase("all")
|| conflictNames.containsIgnoreCase("everything")
val conflictsWithEverything: Boolean
get() = conflictNames.containsIgnoreCase("all")
|| conflictNames.containsIgnoreCase("everything")
val conflicts: Collection<Enchantment>
get() = if (conflictsWithEverything) values().toList()
@ -228,7 +229,7 @@ abstract class EcoEnchant(
}
fun conflictsWithDirectly(other: Enchantment): Boolean {
return conflictNames.containsIgnoreCase(other.key.key)
return conflictNames.containsIgnoreCase(other.key.key) || conflictsWithEverything
}
override fun conflictsWith(other: Enchantment): Boolean {

View File

@ -7,6 +7,7 @@ import com.willfp.eco.core.gui.GUIComponent
import com.willfp.eco.core.gui.menu
import com.willfp.eco.core.gui.menu.Menu
import com.willfp.eco.core.gui.menu.MenuLayer
import com.willfp.eco.core.gui.onRender
import com.willfp.eco.core.gui.page.Page
import com.willfp.eco.core.gui.page.PageChanger
import com.willfp.eco.core.gui.slot
@ -152,7 +153,6 @@ object EnchantGUI {
setSlot(
plugin.configYml.getInt("enchantinfo.item.row"),
plugin.configYml.getInt("enchantinfo.item.column"),
enchant.getInformationSlot(plugin)
)

View File

@ -49,7 +49,6 @@ class GrindstoneSupport(
val toKeep = mutableMapOf<Enchantment, Int>()
for ((enchant, level) in topEnchants) {
println("Enchantment $enchant can grindstone? ${enchant.wrap().type.noGrindstone}")
if (enchant.wrap().type.noGrindstone) {
toKeep[enchant] = level
}

View File

@ -20,4 +20,4 @@ messages:
all: "All"
no-conflicts: "No Conflicts"
all-conficts: "All Other Enchantments"
all-conflicts: "All Other Enchantments"