Skip to content

Commit

Permalink
Fix paginated item's actions not working on PaginatedGuiComplex
Browse files Browse the repository at this point in the history
  • Loading branch information
EverNife committed Oct 10, 2024
1 parent df33d16 commit 828071e
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import dev.triumphteam.gui.guis.GuiItem;
import org.bukkit.entity.HumanEntity;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.Nullable;

import java.util.*;

Expand Down Expand Up @@ -234,6 +235,15 @@ public List<GuiItem> getPaginatedItemsAtPageNumber(final int givenPage) {
// Override GuiUpdate
//------------------------------------------------------------------------------------------------------------------

@Override
public @Nullable GuiItem getGuiItem(int slot) {
GuiItem guiItem = super.getGuiItem(slot);
if (guiItem == null){
guiItem = currentPage.get(slot);
}
return guiItem;
}

@Override
protected List<Map.Entry<Integer, GuiItemComplex>> getAllGuiItemsComplexThatCanBeUpdated() {
List<Map.Entry<Integer, GuiItemComplex>> allComplexGuiItemsOfThisPage = new ArrayList<>();
Expand Down

0 comments on commit 828071e

Please sign in to comment.