diff --git a/src/main/kotlin/org/leaper/leaper/Leaper.kt b/src/main/kotlin/org/leaper/leaper/Leaper.kt index 6604758..0078396 100644 --- a/src/main/kotlin/org/leaper/leaper/Leaper.kt +++ b/src/main/kotlin/org/leaper/leaper/Leaper.kt @@ -87,7 +87,7 @@ class Leaper : JavaPlugin(), Listener { // Load particle settings val particleTypeName = config.getString("effects.particle-type", "CLOUD") try { - // Use Enum.values() instead of Enum.entries for backward compatibility ( Won't work in the future if that function gets removed ) + // Future wont work ; cyka particleType = Particle.values().find { it.toString() == particleTypeName } ?: Particle.CLOUD } catch (e: Exception) { logger.warning("Invalid particle type in config: $particleTypeName. Using default: CLOUD") @@ -98,7 +98,7 @@ class Leaper : JavaPlugin(), Listener { // Load sound settings val soundEffectName = config.getString("effects.sound", "ENTITY_RABBIT_JUMP") try { - // Use Enum.values() instead of Enum.entries for backward compatibility + // Use values function => In the future this might not work anymore! soundEffect = Sound.values().find { it.toString() == soundEffectName } ?: Sound.ENTITY_RABBIT_JUMP } catch (e: Exception) { logger.warning("Invalid sound effect in config: $soundEffectName. Using default: ENTITY_RABBIT_JUMP")