mirror of
https://github.com/ColdeZhang/Dominion.git
synced 2024-10-19 00:36:40 +08:00
修复了不能卸下权限组称号的问题
This commit is contained in:
parent
c0fcc2aaa0
commit
a37f194d1b
@ -4,7 +4,7 @@ plugins {
|
||||
}
|
||||
|
||||
group = "cn.lunadeer"
|
||||
version = "2.1.6-beta"
|
||||
version = "2.1.7-beta"
|
||||
|
||||
java {
|
||||
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
|
||||
|
@ -29,8 +29,13 @@ public class Title {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
int id = Integer.parseInt(args[1]);
|
||||
PlayerDTO player = PlayerDTO.get(bukkit_player);
|
||||
GroupDTO group = Cache.instance.getGroup(Integer.parseInt(args[1]));
|
||||
if (id == -1) {
|
||||
player.setUsingGroupTitleID(id);
|
||||
Notification.info(sender, "成功卸下权限组称号");
|
||||
} else {
|
||||
GroupDTO group = Cache.instance.getGroup(id);
|
||||
if (group == null) {
|
||||
Notification.error(sender, "权限组不存在");
|
||||
return;
|
||||
@ -51,6 +56,7 @@ public class Title {
|
||||
}
|
||||
player.setUsingGroupTitleID(group.getId());
|
||||
Notification.info(sender, "成功使用权限组 %s 称号", group.getName());
|
||||
}
|
||||
int page = getPage(args, 2);
|
||||
TitleList.show(sender, page);
|
||||
} catch (Exception e) {
|
||||
|
Loading…
Reference in New Issue
Block a user