Skip to content

Commit

Permalink
refactor: fix onPLayerQuit return type warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
kernitus committed Dec 26, 2024
1 parent 53a4e42 commit 9bef3ef
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

0 comments on commit 9bef3ef

Please sign in to comment.