From cb3eaba58075b998080d926004d9dcf856aa03b3 Mon Sep 17 00:00:00 2001 From: Niklas Ehlen Date: Thu, 18 Jul 2024 15:15:14 +0200 Subject: [PATCH] Updated canvas in incorporated new api --- .../de/spookly/inventory/AbstractMultiPageInventory.java | 5 +++++ build.gradle | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/SpooklyCoreAPI/src/main/java/de/spookly/inventory/AbstractMultiPageInventory.java b/SpooklyCoreAPI/src/main/java/de/spookly/inventory/AbstractMultiPageInventory.java index 242feae..e555b74 100644 --- a/SpooklyCoreAPI/src/main/java/de/spookly/inventory/AbstractMultiPageInventory.java +++ b/SpooklyCoreAPI/src/main/java/de/spookly/inventory/AbstractMultiPageInventory.java @@ -8,6 +8,7 @@ import org.ipvp.canvas.mask.BinaryMask; import org.ipvp.canvas.mask.Mask; import org.ipvp.canvas.paginate.PaginatedMenuBuilder; +import org.ipvp.canvas.paginate.PaginatedMenuTitles; import org.ipvp.canvas.slot.ClickOptions; import org.ipvp.canvas.slot.Slot; import org.ipvp.canvas.slot.SlotSettings; @@ -127,6 +128,10 @@ public void add(ItemStack itemStack, HandleResult handleResult) { .item(itemStack).build()); } + public void titles(PaginatedMenuTitles titles) { + switcherInventoryPages = switcherInventoryPages.paginateMenuTitles(titles); + } + /** * Adds a new menu modifier to the inventory. * diff --git a/build.gradle b/build.gradle index 165f024..2f86639 100644 --- a/build.gradle +++ b/build.gradle @@ -40,7 +40,7 @@ allprojects { //Internal API's //Canvas is a spookly fork from another project. Will prop. have another namespace in the future to reslove conflicts with original - implementation 'org.ipvp:canvas:1.7.2' + implementation 'org.ipvp:canvas:1.7.3' //NMS / Paper-API paperweight.paperDevBundle(project.paper_version)