Skip to content

Commit

Permalink
v1.0.2 - Provide context to layout title and size
Browse files Browse the repository at this point in the history
  • Loading branch information
TechnicallyCoded committed Aug 23, 2024
1 parent fa43bc2 commit f60e06d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
}

group = 'com.tcoded.lightlibs'
version = '1.0.1'
version = '1.0.2'

repositories {
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,16 @@ public void applyClickHandlers(GuiInstance<ContextType> gui) {
public GuiLibHolder<ContextType> createInventory(OpenGuiContext<ContextType> ctx) {
GuiLibHolder<ContextType> holder = new GuiLibHolder<>(ctx.getGuiContext());

Inventory inventory = Bukkit.createInventory(holder, getSize(), getTitle());
Inventory inventory = Bukkit.createInventory(holder, getSize(ctx), getTitle(ctx));
holder.setInventory(inventory);

return holder;
}

protected abstract ItemStack getBackground();

protected abstract String getTitle();
protected abstract String getTitle(OpenGuiContext<ContextType> ctx);

protected abstract int getSize();
protected abstract int getSize(OpenGuiContext<ContextType> ctx);

}

0 comments on commit f60e06d

Please sign in to comment.