diff --git a/plugin-modules/Core/src/com/songoda/epicbosses/panel/droptables/types/give/GiveRewardPositionListPanel.java b/plugin-modules/Core/src/com/songoda/epicbosses/panel/droptables/types/give/GiveRewardPositionListPanel.java index 500ff6f..9176128 100644 --- a/plugin-modules/Core/src/com/songoda/epicbosses/panel/droptables/types/give/GiveRewardPositionListPanel.java +++ b/plugin-modules/Core/src/com/songoda/epicbosses/panel/droptables/types/give/GiveRewardPositionListPanel.java @@ -49,6 +49,14 @@ public class GiveRewardPositionListPanel extends SubVariablePanelHandler keys = new ArrayList<>(rewardSections.keySet()); int maxPage = panel.getMaxPage(keys); + panel.setOnPageChange(((player, currentPage, requestedPage) -> { + if(requestedPage < 0 || requestedPage > maxPage) return false; + + loadPage(panel, requestedPage, dropTable, giveTableElement, keys, rewardSections); + return true; + })); + + loadPage(panel, 0, dropTable, giveTableElement, keys, rewardSections); } @Override diff --git a/plugin-modules/Core/src/com/songoda/epicbosses/panel/droptables/types/give/GiveRewardRewardsListPanel.java b/plugin-modules/Core/src/com/songoda/epicbosses/panel/droptables/types/give/GiveRewardRewardsListPanel.java index 34bea55..3b5bb57 100644 --- a/plugin-modules/Core/src/com/songoda/epicbosses/panel/droptables/types/give/GiveRewardRewardsListPanel.java +++ b/plugin-modules/Core/src/com/songoda/epicbosses/panel/droptables/types/give/GiveRewardRewardsListPanel.java @@ -1,9 +1,35 @@ package com.songoda.epicbosses.panel.droptables.types.give; +import com.songoda.epicbosses.CustomBosses; +import com.songoda.epicbosses.droptable.DropTable; +import com.songoda.epicbosses.droptable.elements.GiveTableElement; +import com.songoda.epicbosses.managers.BossPanelManager; +import com.songoda.epicbosses.utils.panel.base.handlers.SubSubVariablePanelHandler; +import com.songoda.epicbosses.utils.panel.builder.PanelBuilder; +import org.bukkit.entity.Player; + /** * @author Charles Cullen * @version 1.0.0 * @since 31-Dec-18 */ -public class GiveRewardRewardsListPanel { +public class GiveRewardRewardsListPanel extends SubSubVariablePanelHandler { + + private CustomBosses plugin; + + public GiveRewardRewardsListPanel(BossPanelManager bossPanelManager, PanelBuilder panelBuilder, CustomBosses plugin) { + super(bossPanelManager, panelBuilder); + + this.plugin = plugin; + } + + @Override + public void openFor(Player player, DropTable dropTable, GiveTableElement giveTableElement, String s) { + + } + + @Override + public void initializePanel(PanelBuilder panelBuilder) { + + } } diff --git a/pom.xml b/pom.xml index 5190cf4..7f1b1e0 100644 --- a/pom.xml +++ b/pom.xml @@ -20,7 +20,7 @@ - 1.0.0-U153 + 1.0.0-U154 EpicBosses com.songoda.epicbosses.CustomBosses AMinecraftDev