mirror of
https://github.com/ColdeZhang/Dominion.git
synced 2025-01-12 00:24:27 +08:00
修复了错误的放置检测逻辑
This commit is contained in:
parent
606d7b8a3b
commit
4af0ba761d
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>cn.lunadeer</groupId>
|
||||
<artifactId>Dominion</artifactId>
|
||||
<version>1.11.2-beta</version>
|
||||
<version>1.11.3-beta</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>Dominion</name>
|
||||
|
@ -98,8 +98,10 @@ public class DominionController {
|
||||
return null;
|
||||
}
|
||||
// 是否是父领地的拥有者
|
||||
if (notOwner(owner, parent_dominion) && parent_dominion.getId() != -1) {
|
||||
return null;
|
||||
if (parent_dominion.getId() != -1) {
|
||||
if (notOwner(owner, parent_dominion)) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
// 如果parent_dominion不为-1 检查是否在同一世界
|
||||
if (parent_dominion.getId() != -1 && !parent_dominion.getWorld().equals(dominion.getWorld())) {
|
||||
|
@ -887,7 +887,7 @@ public class PlayerEvents implements Listener {
|
||||
public static boolean onPlace(Player player) {
|
||||
DominionDTO dom = Cache.instance.getPlayerCurrentDominion(player);
|
||||
if (dom == null) {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
if (Apis.hasPermission(player, dom)) {
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user