🐛 Fix can repeat using a same order

This commit is contained in:
2025-02-03 13:24:55 +08:00
parent 100d8bc747
commit affe9a40f5
2 changed files with 28 additions and 0 deletions

View File

@@ -43,6 +43,7 @@ class SnCommand(private val sn: SnService, private val eco: Economy?) : CommandE
val order: SnOrder
try {
order = orderSrv.getOrder(orderNumber);
orderSrv.cancelOrder(orderNumber);
} catch (_: Exception) {
p0.sendMessage(ChatColor.RED.toString() + "An error occurred while pulling transaction. Make sure the order is exists then try again later.")
return true;