From 271b9f556ffd9559f391cb2f01d24a6fff08c875 Mon Sep 17 00:00:00 2001 From: Auxilor Date: Thu, 28 Oct 2021 16:39:36 +0100 Subject: [PATCH] Fixed effect load order --- .../main/kotlin/com/willfp/ecoskills/effects/Effect.kt | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/effects/Effect.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/effects/Effect.kt index 27f0f96..aaa4356 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/effects/Effect.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/effects/Effect.kt @@ -16,15 +16,11 @@ abstract class Effect( ) : SkillObject(id), Listener { protected val plugin: EcoSkillsPlugin = EcoSkillsPlugin.getInstance() - val key: NamespacedKey - val uuid: UUID + val key: NamespacedKey = plugin.namespacedKeyFactory.create(id) + val uuid: UUID = UUID.nameUUIDFromBytes(id.toByteArray()) lateinit var config: Config init { - update() - uuid = UUID.nameUUIDFromBytes(id.toByteArray()) - key = plugin.namespacedKeyFactory.create(id) - finishLoading() } @@ -32,6 +28,7 @@ abstract class Effect( config = loadConfig() Effects.registerNewEffect(this) + update() } open fun loadConfig(): Config {