修复了操作领地时自动选择领地失败问题
All checks were successful
Java CI-CD with Maven / build (push) Successful in 12m11s
All checks were successful
Java CI-CD with Maven / build (push) Successful in 12m11s
This commit is contained in:
parent
a34cc43cbf
commit
5d614d4760
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>cn.lunadeer</groupId>
|
||||
<artifactId>Dominion</artifactId>
|
||||
<version>1.30.8-beta</version>
|
||||
<version>1.30.9-beta</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>Dominion</name>
|
||||
|
@ -3,12 +3,7 @@ package cn.lunadeer.dominion.controllers;
|
||||
import cn.lunadeer.dominion.Cache;
|
||||
import cn.lunadeer.dominion.dtos.DominionDTO;
|
||||
import cn.lunadeer.dominion.dtos.PlayerPrivilegeDTO;
|
||||
import cn.lunadeer.minecraftpluginutils.Notification;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class Apis {
|
||||
|
||||
@ -43,7 +38,10 @@ public class Apis {
|
||||
return null;
|
||||
}
|
||||
DominionDTO dominion = Cache.instance.getDominion(location);
|
||||
if (dominion == null || dominion.getParentDomId() != -1) {
|
||||
if (dominion == null) {
|
||||
return null;
|
||||
}
|
||||
if (dominion.getParentDomId() == -1) {
|
||||
return dominion;
|
||||
} else {
|
||||
player.setResponse(new AbstractOperator.Result(AbstractOperator.Result.FAILURE, "你当前在子领地内,请指定要操作的领地名称"));
|
||||
|
Reference in New Issue
Block a user