Skip to content

Commit

Permalink
fix: Added static methods, bumped version.
Browse files Browse the repository at this point in the history
  • Loading branch information
AquaticLabs committed Mar 29, 2024
1 parent 32fb9bd commit f262773
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#

# Fairy
fairy.version = 0.7.1b2-SNAPSHOT
fairy.version = 0.7.1b3-SNAPSHOT
gradle-plugin.version = 1.2.0b9

mongojack.version = 4.2.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,18 +77,34 @@ static GuiSlot nextPage(PaginatedPane pane, ItemStack itemStack) {
return new ModPageGuiSlot(pane, itemStack, 1, null);
}

static GuiSlot nextPage(PaginatedPane pane, ItemStack itemStack, @Nullable BiConsumer<Player, ClickType> clickCallback) {
return new ModPageGuiSlot(pane, itemStack, 1, clickCallback != null ? event -> clickCallback.accept((Player) event.getWhoClicked(), event.getClick()) : null);
}

static GuiSlot previousPage(PaginatedPane pane, ItemStack itemStack) {
return new ModPageGuiSlot(pane, itemStack, -1, null);
}

static GuiSlot previousPage(PaginatedPane pane, ItemStack itemStack, @Nullable BiConsumer<Player, ClickType> clickCallback) {
return new ModPageGuiSlot(pane, itemStack, -1, clickCallback != null ? event -> clickCallback.accept((Player) event.getWhoClicked(), event.getClick()) : null);
}

static GuiSlot nextPage(PaginatedPane pane) {
return new ModPageGuiSlot(pane, ItemBuilder.of(XMaterial.ARROW).name("&aNext Page").build(), 1, null);
}

static GuiSlot nextPage(PaginatedPane pane, @Nullable BiConsumer<Player, ClickType> clickCallback) {
return new ModPageGuiSlot(pane, ItemBuilder.of(XMaterial.ARROW).name("&aNext Page").build(), 1, clickCallback != null ? event -> clickCallback.accept((Player) event.getWhoClicked(), event.getClick()) : null);
}

static GuiSlot previousPage(PaginatedPane pane) {
return new ModPageGuiSlot(pane, ItemBuilder.of(XMaterial.ARROW).name("&aPrevious Page").build(), -1, null);
}

static GuiSlot previousPage(PaginatedPane pane, @Nullable BiConsumer<Player, ClickType> clickCallback) {
return new ModPageGuiSlot(pane, ItemBuilder.of(XMaterial.ARROW).name("&aPrevious Page").build(), -1, clickCallback != null ? event -> clickCallback.accept((Player) event.getWhoClicked(), event.getClick()) : null);
}

static GuiSlot modPage(PaginatedPane pane, ItemStack itemStack, int mod, @Nullable BiConsumer<Player, ClickType> clickCallback) {
return new ModPageGuiSlot(pane, itemStack, mod, clickCallback != null ? event -> clickCallback.accept((Player) event.getWhoClicked(), event.getClick()) : null);
}
Expand Down

0 comments on commit f262773

Please sign in to comment.