gay shit fix
This commit is contained in:
@@ -87,7 +87,7 @@ class Leaper : JavaPlugin(), Listener {
|
|||||||
// Load particle settings
|
// Load particle settings
|
||||||
val particleTypeName = config.getString("effects.particle-type", "CLOUD")
|
val particleTypeName = config.getString("effects.particle-type", "CLOUD")
|
||||||
try {
|
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
|
particleType = Particle.values().find { it.toString() == particleTypeName } ?: Particle.CLOUD
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
logger.warning("Invalid particle type in config: $particleTypeName. Using default: CLOUD")
|
logger.warning("Invalid particle type in config: $particleTypeName. Using default: CLOUD")
|
||||||
@@ -98,7 +98,7 @@ class Leaper : JavaPlugin(), Listener {
|
|||||||
// Load sound settings
|
// Load sound settings
|
||||||
val soundEffectName = config.getString("effects.sound", "ENTITY_RABBIT_JUMP")
|
val soundEffectName = config.getString("effects.sound", "ENTITY_RABBIT_JUMP")
|
||||||
try {
|
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
|
soundEffect = Sound.values().find { it.toString() == soundEffectName } ?: Sound.ENTITY_RABBIT_JUMP
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
logger.warning("Invalid sound effect in config: $soundEffectName. Using default: ENTITY_RABBIT_JUMP")
|
logger.warning("Invalid sound effect in config: $soundEffectName. Using default: ENTITY_RABBIT_JUMP")
|
||||||
|
|||||||
Reference in New Issue
Block a user