mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2025-02-02 02:11:21 +01:00
Fixes
This commit is contained in:
parent
6ecf7b8a01
commit
30c25ac16a
@ -65,7 +65,8 @@ abstract class EcoEnchant(
|
|||||||
|
|
||||||
private val conflictNames = config.getStrings("conflicts")
|
private val conflictNames = config.getStrings("conflicts")
|
||||||
|
|
||||||
val conflictsWithEverything = conflictNames.containsIgnoreCase("all")
|
val conflictsWithEverything: Boolean
|
||||||
|
get() = conflictNames.containsIgnoreCase("all")
|
||||||
|| conflictNames.containsIgnoreCase("everything")
|
|| conflictNames.containsIgnoreCase("everything")
|
||||||
|
|
||||||
val conflicts: Collection<Enchantment>
|
val conflicts: Collection<Enchantment>
|
||||||
@ -228,7 +229,7 @@ abstract class EcoEnchant(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun conflictsWithDirectly(other: Enchantment): Boolean {
|
fun conflictsWithDirectly(other: Enchantment): Boolean {
|
||||||
return conflictNames.containsIgnoreCase(other.key.key)
|
return conflictNames.containsIgnoreCase(other.key.key) || conflictsWithEverything
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun conflictsWith(other: Enchantment): Boolean {
|
override fun conflictsWith(other: Enchantment): Boolean {
|
||||||
|
@ -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
|
||||||
import com.willfp.eco.core.gui.menu.Menu
|
import com.willfp.eco.core.gui.menu.Menu
|
||||||
import com.willfp.eco.core.gui.menu.MenuLayer
|
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.Page
|
||||||
import com.willfp.eco.core.gui.page.PageChanger
|
import com.willfp.eco.core.gui.page.PageChanger
|
||||||
import com.willfp.eco.core.gui.slot
|
import com.willfp.eco.core.gui.slot
|
||||||
@ -152,7 +153,6 @@ object EnchantGUI {
|
|||||||
setSlot(
|
setSlot(
|
||||||
plugin.configYml.getInt("enchantinfo.item.row"),
|
plugin.configYml.getInt("enchantinfo.item.row"),
|
||||||
plugin.configYml.getInt("enchantinfo.item.column"),
|
plugin.configYml.getInt("enchantinfo.item.column"),
|
||||||
|
|
||||||
enchant.getInformationSlot(plugin)
|
enchant.getInformationSlot(plugin)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -49,7 +49,6 @@ class GrindstoneSupport(
|
|||||||
val toKeep = mutableMapOf<Enchantment, Int>()
|
val toKeep = mutableMapOf<Enchantment, Int>()
|
||||||
|
|
||||||
for ((enchant, level) in topEnchants) {
|
for ((enchant, level) in topEnchants) {
|
||||||
println("Enchantment $enchant can grindstone? ${enchant.wrap().type.noGrindstone}")
|
|
||||||
if (enchant.wrap().type.noGrindstone) {
|
if (enchant.wrap().type.noGrindstone) {
|
||||||
toKeep[enchant] = level
|
toKeep[enchant] = level
|
||||||
}
|
}
|
||||||
|
@ -20,4 +20,4 @@ messages:
|
|||||||
|
|
||||||
all: "All"
|
all: "All"
|
||||||
no-conflicts: "No Conflicts"
|
no-conflicts: "No Conflicts"
|
||||||
all-conficts: "All Other Enchantments"
|
all-conflicts: "All Other Enchantments"
|
Loading…
Reference in New Issue
Block a user