From 52e137124df8e530e18a7ae4a4f1a80b1b0c4909 Mon Sep 17 00:00:00 2001 From: LT_Name <572413378@qq.com> Date: Fri, 12 Jan 2024 20:27:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A3=80=E6=9F=A5=E9=BB=98=E8=AE=A4=E5=AF=B9?= =?UTF-8?q?=E8=AF=9D=E6=A1=86=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/smallaswater/npc/dialog/DialogPages.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/smallaswater/npc/dialog/DialogPages.java b/src/main/java/com/smallaswater/npc/dialog/DialogPages.java index 674e757..8b9c193 100644 --- a/src/main/java/com/smallaswater/npc/dialog/DialogPages.java +++ b/src/main/java/com/smallaswater/npc/dialog/DialogPages.java @@ -14,10 +14,7 @@ import lombok.Setter; import org.jetbrains.annotations.NotNull; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; /** * @author LT_Name @@ -43,9 +40,10 @@ private void load() { DialogPage dialogPage = new DialogPage(this, page); this.dialogPageMap.put(dialogPage.getKey(), dialogPage); } catch (Exception e) { - RsNPC.getInstance().getLogger().error("加载对话页面失败:" + this.name + "." + page.get("key"), e); + RsNPC.getInstance().getLogger().error(RsNPC.getInstance().getLanguage().translateString("plugin.load.dialog.dataError", this.name + "." + page.get("key")), e); } }); + Objects.requireNonNull(getDefaultDialogPage(), "Default dialog page cannot be null"); } public DialogPage getDefaultDialogPage() {