fix bought with -2
All checks were successful
Java CI-CD with Maven / build (push) Successful in 1h44m58s

This commit is contained in:
zhangyuheng 2024-01-11 00:15:57 +08:00
parent c71266627f
commit c4a1cdcbaf
2 changed files with 4 additions and 2 deletions

View File

@ -6,7 +6,7 @@
<groupId>cn.lunadeer</groupId>
<artifactId>MiniPlayerTitle</artifactId>
<version>2.3</version>
<version>2.4</version>
<packaging>jar</packaging>
<name>MiniPlayerTitle</name>

View File

@ -181,7 +181,9 @@ public class XPlayer {
return;
}
set_coin(_coin - title.getPrice());
if (title.getAmount() > 0) {
SaleTitle.setAmount(title.getId(), title.getAmount() - 1);
}
Notification.info(_player, Component.text("成功购买称号: ").append(title.getTitle()));
Notification.info(_player, "花费: " + title.getPrice() + "称号币,余额: " + _coin + "称号币");