From 1175b7d533d1cc0a3ad0a9116ecae45c09da2133 Mon Sep 17 00:00:00 2001 From: Silent Date: Sat, 19 Jun 2021 17:25:26 +0200 Subject: [PATCH] update inventory opening --- src/main/java/tsp/headdb/inventory/PagedPane.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/main/java/tsp/headdb/inventory/PagedPane.java b/src/main/java/tsp/headdb/inventory/PagedPane.java index 4e71492..c05ae81 100644 --- a/src/main/java/tsp/headdb/inventory/PagedPane.java +++ b/src/main/java/tsp/headdb/inventory/PagedPane.java @@ -261,11 +261,8 @@ public class PagedPane implements InventoryHolder { Utils.sendMessage(player, "&cPage number is out of bounds! Max: &e" + getPageAmount()); return AnvilGUI.Response.text("&cOut of bounds!"); } - Bukkit.getScheduler().runTaskLater(HeadDB.getInstance(), () -> { - open(player); - selectPage(i - 1); - }, 40L); - return AnvilGUI.Response.close(); + selectPage(i - 1); + return AnvilGUI.Response.openInventory(this.getInventory()); } catch (NumberFormatException nfe) { Utils.sendMessage(player, "&cValue must be a number!"); return AnvilGUI.Response.text(Utils.colorize("&cValue must be a number!"));