From 34380d67c0f073628ee44dad0a3ce2631986b496 Mon Sep 17 00:00:00 2001 From: tobias Date: Wed, 3 Jul 2024 08:21:51 +0200 Subject: [PATCH] fixed missing transaction --- .../modules/wilderness/commands/WildernessCommand.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/improved-factions-base/src/main/kotlin/io/github/toberocat/improvedfactions/modules/wilderness/commands/WildernessCommand.kt b/improved-factions-base/src/main/kotlin/io/github/toberocat/improvedfactions/modules/wilderness/commands/WildernessCommand.kt index 557ae4ae..ebe6ad95 100644 --- a/improved-factions-base/src/main/kotlin/io/github/toberocat/improvedfactions/modules/wilderness/commands/WildernessCommand.kt +++ b/improved-factions-base/src/main/kotlin/io/github/toberocat/improvedfactions/modules/wilderness/commands/WildernessCommand.kt @@ -1,6 +1,7 @@ package io.github.toberocat.improvedfactions.modules.wilderness.commands import io.github.toberocat.improvedfactions.ImprovedFactionsPlugin +import io.github.toberocat.improvedfactions.database.DatabaseManager.loggedTransaction import io.github.toberocat.improvedfactions.modules.wilderness.WildernessModule import io.github.toberocat.improvedfactions.modules.wilderness.config.WildernessModuleConfig import io.github.toberocat.improvedfactions.translation.sendLocalized @@ -77,6 +78,8 @@ class WildernessCommand( private fun cancelCommand(player: Player) { cooldownManager.removeCooldown(player.uniqueId) - PlayerUsageLimits.getUsageLimit("wilderness", player.uniqueId).used-- + loggedTransaction { + PlayerUsageLimits.getUsageLimit("wilderness", player.uniqueId).used-- + } } } \ No newline at end of file