From 03ae2d53c7df6d4193bc85ca0371b917c4fb7681 Mon Sep 17 00:00:00 2001 From: rattatwinko Date: Sun, 4 May 2025 19:01:44 +0200 Subject: [PATCH] some minor bug fixing --- src/main/kotlin/org/leaper/leaper/Leaper.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/org/leaper/leaper/Leaper.kt b/src/main/kotlin/org/leaper/leaper/Leaper.kt index 51dc0e3..6604758 100644 --- a/src/main/kotlin/org/leaper/leaper/Leaper.kt +++ b/src/main/kotlin/org/leaper/leaper/Leaper.kt @@ -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() private val fallProtection = HashMap() - // 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")