修复了使用永久称号时报错的问题
All checks were successful
Java CI-CD with Maven / build (push) Successful in 7m59s

This commit is contained in:
zhangyuheng 2024-06-08 15:38:45 +08:00
parent 3c54272686
commit 20cd4278ad
2 changed files with 2 additions and 2 deletions

View File

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

View File

@ -160,7 +160,7 @@ public class TitleManage {
MiniPlayerTitle.notification.error(sender, "获取玩家信息时出现错误"); MiniPlayerTitle.notification.error(sender, "获取玩家信息时出现错误");
return; return;
} }
if (title.getExpireAt().isBefore(LocalDateTime.now())) { if (title.isExpired()) {
MiniPlayerTitle.notification.error(sender, "称号 %s 已过期", title.getTitle().getTitlePlainText()); MiniPlayerTitle.notification.error(sender, "称号 %s 已过期", title.getTitle().getTitlePlainText());
playerInfo.setUsingTitle(null); playerInfo.setUsingTitle(null);
updateName(player, null); updateName(player, null);