修复领地所有者可以被添加为领地成员的漏洞
All checks were successful
Java CI-CD with Gradle / build (push) Successful in 15m10s
All checks were successful
Java CI-CD with Gradle / build (push) Successful in 15m10s
This commit is contained in:
parent
7f04300fc3
commit
16d2ae73d8
@ -4,7 +4,7 @@ plugins {
|
||||
}
|
||||
|
||||
group = "cn.lunadeer"
|
||||
version = "2.1.16-beta"
|
||||
version = "2.1.17-beta"
|
||||
|
||||
java {
|
||||
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
|
||||
|
@ -100,6 +100,10 @@ public class MemberController {
|
||||
operator.setResponse(FAIL.addMessage("玩家 %s 不存在或没有登录过", player_name));
|
||||
return;
|
||||
}
|
||||
if (dominion.getOwner().equals(player.getUuid())) {
|
||||
operator.setResponse(FAIL.addMessage("玩家 %s 是领地 %s 的拥有者,不可以被添加为成员", player_name, dominionName));
|
||||
return;
|
||||
}
|
||||
MemberDTO privilege = MemberDTO.select(player.getUuid(), dominion.getId());
|
||||
if (privilege != null) {
|
||||
operator.setResponse(FAIL.addMessage("玩家 %s 已经是领地 %s 的成员", player_name, dominionName));
|
||||
|
Reference in New Issue
Block a user