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() {