some minor bug fixing
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
@file:Suppress("DEPRECATION")
|
||||
|
||||
package org.leaper.leaper
|
||||
|
||||
import org.bukkit.ChatColor
|
||||
@@ -29,7 +31,7 @@ class Leaper : JavaPlugin(), Listener {
|
||||
private val cooldowns = HashMap<UUID, Long>()
|
||||
private val fallProtection = HashMap<UUID, Long>()
|
||||
|
||||
// Configurable settings
|
||||
// Configurable settings ( will be stored in config.yml | if it doesn't exist anymore )
|
||||
private var cooldownTime = 5 * 1000 // Default: 5 seconds in milliseconds
|
||||
private var leapDistance = 1.5 // Default: 1.5 blocks
|
||||
private var leapHeight = 0.7 // Default: 0.7 blocks
|
||||
@@ -85,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
|
||||
// Use Enum.values() instead of Enum.entries for backward compatibility ( Won't work in the future if that function gets removed )
|
||||
particleType = Particle.values().find { it.toString() == particleTypeName } ?: Particle.CLOUD
|
||||
} catch (e: Exception) {
|
||||
logger.warning("Invalid particle type in config: $particleTypeName. Using default: CLOUD")
|
||||
|
||||
Reference in New Issue
Block a user