From 5530987e6e3c2fea15623dced71b961da556884c Mon Sep 17 00:00:00 2001 From: yoyosource Date: Mon, 8 Aug 2022 16:49:08 +0200 Subject: [PATCH] Hotfix SchematicCommandUtils --- .../schematicsystem/commands/SchematicCommandUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommandUtils.java b/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommandUtils.java index a7e1a75..3a37c78 100644 --- a/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommandUtils.java +++ b/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommandUtils.java @@ -148,7 +148,7 @@ public class SchematicCommandUtils { if (chunk > 0) { beforePage.setColor(ChatColor.YELLOW); beforePage.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new TextComponent[] {SchematicSystem.MESSAGE.parseToComponent("UTIL_LIST_BACK_ARROW_HOVER", false, player)})); - beforePage.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, behavior.getPageCommandGen().apply(chunk - 1))); + beforePage.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, behavior.getPageCommandGen().apply(chunk))); } else { beforePage.setColor(ChatColor.RED); } @@ -157,7 +157,7 @@ public class SchematicCommandUtils { if (chunk < pageCount - 1) { nextPage.setColor(ChatColor.YELLOW); nextPage.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new TextComponent[] {SchematicSystem.MESSAGE.parseToComponent("UTIL_LIST_NEXT_HOVER", false, player)})); - nextPage.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, behavior.getPageCommandGen().apply(chunk + 1))); + nextPage.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, behavior.getPageCommandGen().apply(chunk + 2))); } else { nextPage.setColor(ChatColor.RED); }