From 5d614d47609631ddd2a56a19a66277c0c7ee2e33 Mon Sep 17 00:00:00 2001 From: zhangyuheng Date: Fri, 31 May 2024 21:03:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E9=A2=86=E5=9C=B0=E6=97=B6=E8=87=AA=E5=8A=A8=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E9=A2=86=E5=9C=B0=E5=A4=B1=E8=B4=A5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../java/cn/lunadeer/dominion/controllers/Apis.java | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/pom.xml b/pom.xml index a4a971f..195fe7b 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ cn.lunadeer Dominion - 1.30.8-beta + 1.30.9-beta jar Dominion diff --git a/src/main/java/cn/lunadeer/dominion/controllers/Apis.java b/src/main/java/cn/lunadeer/dominion/controllers/Apis.java index 0ef6c8f..4e8f27a 100644 --- a/src/main/java/cn/lunadeer/dominion/controllers/Apis.java +++ b/src/main/java/cn/lunadeer/dominion/controllers/Apis.java @@ -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, "你当前在子领地内,请指定要操作的领地名称"));