mirror of
https://github.com/songoda/EpicBosses.git
synced 2024-12-23 08:27:49 +01:00
1.0.0-SNAPSHOT-U154
+ Fixed issue with pages not being loaded in the RewardPositionListPanel
This commit is contained in:
parent
3078389e74
commit
c9b4fe0ca5
@ -49,6 +49,14 @@ public class GiveRewardPositionListPanel extends SubVariablePanelHandler<DropTab
|
||||
List<String> 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
|
||||
|
@ -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<DropTable, GiveTableElement, String> {
|
||||
|
||||
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) {
|
||||
|
||||
}
|
||||
}
|
||||
|
2
pom.xml
2
pom.xml
@ -20,7 +20,7 @@
|
||||
|
||||
<properties>
|
||||
<!--<plugin.version>maven-version-number-SNAPSHOT-U90</plugin.version>-->
|
||||
<plugin.version>1.0.0-U153</plugin.version>
|
||||
<plugin.version>1.0.0-U154</plugin.version>
|
||||
<plugin.name>EpicBosses</plugin.name>
|
||||
<plugin.main>com.songoda.epicbosses.CustomBosses</plugin.main>
|
||||
<plugin.author>AMinecraftDev</plugin.author>
|
||||
|
Loading…
Reference in New Issue
Block a user