From c37f8ccb6c4b34523fe72d4b8f4598714d2f3f5d Mon Sep 17 00:00:00 2001 From: Quentin Legot Date: Sun, 7 Jun 2020 22:41:06 +0200 Subject: [PATCH] Update Book.java --- src/fr/topeka/HelpRulesBook/Book.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/fr/topeka/HelpRulesBook/Book.java b/src/fr/topeka/HelpRulesBook/Book.java index d67c2bd..1f1075c 100644 --- a/src/fr/topeka/HelpRulesBook/Book.java +++ b/src/fr/topeka/HelpRulesBook/Book.java @@ -31,7 +31,7 @@ public class Book { meta.setTitle(_title); meta.setAuthor(_author); int lastCaracter = 0; - BaseComponent[] page = new ComponentBuilder().create(); + BaseComponent[] page = new ComponentBuilder("").create(); List subPage = new ArrayList(); for (String rawPage: _pages){ if (rawPage.contains("{") && rawPage.contains("}")) { @@ -66,9 +66,6 @@ public class Book { if (subPage.get(i).split(",")[2].startsWith("CHANGE_PAGE", 5)) { eventBuilder.setClickEvent(new ClickEvent(ClickEvent.Action.CHANGE_PAGE, subPage.get(i).split(",")[2].substring(subPage.get(i).split(",")[2].indexOf(".") + 1, subPage.get(i).split(",")[2].length() - 2))); } - else if (subPage.get(i).split(",")[2].startsWith("COPY_TO_CLIPBOARD", 5)) { - eventBuilder.setClickEvent(new ClickEvent(ClickEvent.Action.COPY_TO_CLIPBOARD, subPage.get(i).split(",")[2].substring(subPage.get(i).split(",")[2].indexOf(".") + 1, subPage.get(i).split(",")[2].length() - 2))); - } else if (subPage.get(i).split(",")[2].startsWith("OPEN_URL", 5)) { eventBuilder.setClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, subPage.get(i).split(",")[2].substring(subPage.get(i).split(",")[2].indexOf(".") + 1, subPage.get(i).split(",")[2].length() - 2))); }