mirror of
https://github.com/ColdeZhang/Dominion.git
synced 2024-12-24 13:28:55 +08:00
修复领地所有者可以被添加为领地成员的漏洞
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));
|
||||
|
Loading…
Reference in New Issue
Block a user