Skip to content

Commit

Permalink
Merge pull request #197 from ToberoCat/wilderness-fix
Browse files Browse the repository at this point in the history
fixed missing transaction
  • Loading branch information
ToberoCat authored Jul 3, 2024
2 parents eb048f9 + 34380d6 commit cd2c120
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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--
}
}
}

0 comments on commit cd2c120

Please sign in to comment.