mirror of
https://github.com/ColdeZhang/Dominion.git
synced 2025-01-27 10:34:16 +08:00
修复了当关闭领地传送时拥有者也无法传送的问题
This commit is contained in:
parent
d492663e8d
commit
78095df43a
@ -375,15 +375,17 @@ public class DominionOperate {
|
||||
}
|
||||
|
||||
PlayerPrivilegeDTO privilegeDTO = PlayerPrivilegeDTO.select(player.getUniqueId(), dominionDTO.getId());
|
||||
if (privilegeDTO == null) {
|
||||
if (!dominionDTO.getFlagValue(Flag.TELEPORT)) {
|
||||
Notification.error(sender, "此领地禁止传送");
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if (!privilegeDTO.getFlagValue(Flag.TELEPORT)) {
|
||||
Notification.error(sender, "你不被允许传送到这个领地");
|
||||
return;
|
||||
if (!player.getUniqueId().equals(dominionDTO.getOwner())) { // 领地所有人可以传送到自己的领地
|
||||
if (privilegeDTO == null) {
|
||||
if (!dominionDTO.getFlagValue(Flag.TELEPORT)) {
|
||||
Notification.error(sender, "此领地禁止传送");
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if (!privilegeDTO.getFlagValue(Flag.TELEPORT)) {
|
||||
Notification.error(sender, "你不被允许传送到这个领地");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user