PageItem class are broken from 1.13-1.19
PizzaThatCodes opened this issue · 2 comments
Using a PagedGUI with trying the examples of the Forward/Back buttons on the documentation causes the buttons to not switch the pages. The last working version of the Forward/Back items is InvUI version 1.12, not sure if one of the functions changed and the documentation hasn't been updated, or if the check was removed.
Works fine for me on InvUI v1.19 with Spigot 1.20.2
javaw_qIQdTrPUY0.mp4
Currently running version InvUI 1.19 (I tried 1.18, 1.19, 1.13, and 1.12 worked) the server is Pufferfish version git-Pufferfish-15 (MC: 1.20.1) (Implementing API version 1.20.1-R0.1-SNAPSHOT) (Git: 30537a0 on HEAD)
Using default items that were on https://xenondevs.xyz/docs/invui/guis/paged/ (except for the ArrayList)
When using ArrayList<Item>
items = new ArrayList<>();` using AbstractItem for each of the items. It seems to get all the correct items from the ArrayList for the first page, but when trying to switch the page does not work at all, zero errors inside the console, and the items are the same on the first page. Without changing any of the code 1.12 works perfectly fine, switching between the pages, while 1.13,1.18,1.19 doesn't. Something must of changed between 1.12 and 1.13 to cause AbstractItem inside of the arraylist to somehow break switching pages I guess.
The example list does appear to work, but yeah, to use an ArrayList with abstract items appear to break it quietly for some reason which makes no sense.
It's weird how it works on 1.12 compared to 1.13, 1.18, 1.19 though, not sure why tbh.