You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the page reward type in the pagelayout.yml file, you can never switch to the final page when using the actual page value (e.g. 3, 4) - it switches to the page before that instead.
Rather than using getHighestPage (which would return 3 in this scenario), getDisplayHighestPage should be used in this scenario. I did also test it in my own environment with that method instead, and that fixed the problem. I did test the fix with an erroneous input as well (page 5 when there were only 4 pages) and the plugin responded fine.
If required I can open a pull request for this but this is a tiny fix I'm sure can also be done yourself, I just wanted to highlight the actual cause (since I'm like that, unfortunately for a lot of people ;) ).
Thanks in advance!
The text was updated successfully, but these errors were encountered:
When using the page reward type in the pagelayout.yml file, you can never switch to the final page when using the actual page value (e.g. 3, 4) - it switches to the page before that instead.
Files used to reproduce:
menu.yml - https://pastebin.com/2zCv8r25
buy-menu.yml - https://pastebin.com/TSs12q5Q
pagelayout.yml - https://pastebin.com/0qJYDhAm
The line of code that I suspect to cause this is the following:
BossShopPro/src/main/java/org/black_ixx/bossshop/core/rewards/BSRewardTypeShopPage.java
Line 74 in b8ebbfc
Rather than using getHighestPage (which would return 3 in this scenario), getDisplayHighestPage should be used in this scenario. I did also test it in my own environment with that method instead, and that fixed the problem. I did test the fix with an erroneous input as well (page 5 when there were only 4 pages) and the plugin responded fine.
If required I can open a pull request for this but this is a tiny fix I'm sure can also be done yourself, I just wanted to highlight the actual cause (since I'm like that, unfortunately for a lot of people ;) ).
Thanks in advance!
The text was updated successfully, but these errors were encountered: