mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2025-01-21 00:21:20 +01:00
Fixed display not working for some users
This commit is contained in:
parent
19c0cca3b5
commit
cc7cc0f08f
@ -57,8 +57,6 @@ object LengthSorter : EnchantmentSorter {
|
||||
object TypeSorter : EnchantmentSorter {
|
||||
private val types = mutableListOf<EnchantmentType>()
|
||||
|
||||
@JvmStatic
|
||||
@ConfigUpdater
|
||||
fun update(plugin: EcoEnchantsPlugin) {
|
||||
types.clear()
|
||||
types.addAll(plugin.configYml.getStrings("display.sort.type-order").mapNotNull {
|
||||
@ -86,8 +84,6 @@ object TypeSorter : EnchantmentSorter {
|
||||
object RaritySorter : EnchantmentSorter {
|
||||
private val rarities = mutableListOf<EnchantmentRarity>()
|
||||
|
||||
@JvmStatic
|
||||
@ConfigUpdater
|
||||
fun update(plugin: EcoEnchantsPlugin) {
|
||||
rarities.clear()
|
||||
rarities.addAll(plugin.configYml.getStrings("display.sort.rarity-order").mapNotNull {
|
||||
|
@ -2,6 +2,7 @@ package com.willfp.ecoenchants.rarity
|
||||
|
||||
import com.willfp.eco.core.registry.Registry
|
||||
import com.willfp.ecoenchants.EcoEnchantsPlugin
|
||||
import com.willfp.ecoenchants.display.RaritySorter
|
||||
|
||||
@Suppress("UNUSED")
|
||||
object EnchantmentRarities : Registry<EnchantmentRarity>() {
|
||||
@ -12,5 +13,7 @@ object EnchantmentRarities : Registry<EnchantmentRarity>() {
|
||||
for (config in plugin.rarityYml.getSubsections("rarities")) {
|
||||
register(EnchantmentRarity(config))
|
||||
}
|
||||
|
||||
RaritySorter.update(plugin)
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package com.willfp.ecoenchants.type
|
||||
|
||||
import com.willfp.eco.core.registry.Registry
|
||||
import com.willfp.ecoenchants.EcoEnchantsPlugin
|
||||
import com.willfp.ecoenchants.display.TypeSorter
|
||||
|
||||
@Suppress("UNUSED")
|
||||
object EnchantmentTypes: Registry<EnchantmentType>() {
|
||||
@ -18,5 +19,7 @@ object EnchantmentTypes: Registry<EnchantmentType>() {
|
||||
for (config in plugin.typesYml.getSubsections("types")) {
|
||||
register(EnchantmentType(plugin, config))
|
||||
}
|
||||
|
||||
TypeSorter.update(plugin)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user