From 9bef3ef129dbe4697b73d03ecd69e351fa472b73 Mon Sep 17 00:00:00 2001 From: kernitus <2789734+kernitus@users.noreply.github.com> Date: Thu, 26 Dec 2024 19:39:09 +0100 Subject: [PATCH] refactor: fix onPLayerQuit return type warnings --- .../module/ModuleDisableEnderpearlCooldown.kt | 4 +++- .../plugin/OldCombatMechanics/module/ModulePlayerRegen.kt | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/kernitus/plugin/OldCombatMechanics/module/ModuleDisableEnderpearlCooldown.kt b/src/main/kotlin/kernitus/plugin/OldCombatMechanics/module/ModuleDisableEnderpearlCooldown.kt index 47845fb2..e02a6564 100644 --- a/src/main/kotlin/kernitus/plugin/OldCombatMechanics/module/ModuleDisableEnderpearlCooldown.kt +++ b/src/main/kotlin/kernitus/plugin/OldCombatMechanics/module/ModuleDisableEnderpearlCooldown.kt @@ -102,7 +102,9 @@ class ModuleDisableEnderpearlCooldown(plugin: OCMMain) : OCMModule(plugin, "disa private fun isEnderPearl(itemStack: ItemStack?) = itemStack?.type == Material.ENDER_PEARL @EventHandler - fun onPlayerQuit(e: PlayerQuitEvent) = lastLaunched?.remove(e.player.uniqueId) + fun onPlayerQuit(e: PlayerQuitEvent) { + lastLaunched?.remove(e.player.uniqueId) + } /** * Get the remaining cooldown time for ender pearls for a given player. diff --git a/src/main/kotlin/kernitus/plugin/OldCombatMechanics/module/ModulePlayerRegen.kt b/src/main/kotlin/kernitus/plugin/OldCombatMechanics/module/ModulePlayerRegen.kt index 817632eb..1cfb464f 100644 --- a/src/main/kotlin/kernitus/plugin/OldCombatMechanics/module/ModulePlayerRegen.kt +++ b/src/main/kotlin/kernitus/plugin/OldCombatMechanics/module/ModulePlayerRegen.kt @@ -81,5 +81,7 @@ class ModulePlayerRegen(plugin: OCMMain) : OCMModule(plugin, "old-player-regen") } @EventHandler - fun onPlayerQuit(e: PlayerQuitEvent) = healTimes.remove(e.player.uniqueId) + fun onPlayerQuit(e: PlayerQuitEvent) { + healTimes.remove(e.player.uniqueId) + } }