Releases: coderFlameyosFlow/WoodyMenus
v1.3.0 - Sonic Breaks
We have sonic breaking his own speed limit with this release!
Severe performance improvements this release
Improved - Performance
- MenuLayoutBuilderImpl row() reworked; much faster
- BaseMenu has a fixed "addItem" method; instead of doing it the way triumph-gui (my base, thanks bro), instead there's a while loop that increments the slot when the integer exists, much faster than looping through every slot.
- Internalize menu item action clicking; removing 1 need for the getClickAction getter.
- recreateItems reworked; now it's a simple for each, also removed unnecessary checks, significantly improving update() and even open()
- Instead of naturally looping through Lists (iterator()), we manually use listIterator() which is a better, faster alternative to iterator(), improving any case of updating (updateTitle, update)
- Inline most methods in MenuIterator (not significant but oh well)
- when executing ItemEditor#editor, the raw field of "itemStack" is used instead of getItemStack().
- Much more.
Improved - Generic
- Error handling improved; generic fixes can be found in some confusing errors
- MenuIterator#nextNotNull does a better job at going through not null values
I know, wow, I literally had to separate "Improved" to modules.
Fixed
- While testing, Actions and Modifiers wouldn't work because the listener wasn't properly registered.
This fix requires you to use "Menus.init(Plugin)" at onEnable() - Fix addItem
Added
- New Result API, non-close-able menus now exist.
v1.2.8 (Final 1.2.x) Hulk.. is no longer Angry :D
What's Changed
- Update copyrights by @coderFlameyosFlow in #10
Improved
- Improved performance when iterating through slots via Slot#isSlot instead of executing 5 getters and comparing them, in MenuIterator.
Fixed
- Action execution in MenuListeners
- Slot Algorithm.
- 0-Indexed to fix more bugs and.. improve performance by maybe 4 bits a time ;D
And more.
Full Changelog: 1.2.7...1.2.8
v1.2.7 - Hulk Lifted Thor's Hammer
v1.2.6 - Hulk (me) Finally Calmed Down!
FINALLY
Fixed
- Base .open(Player) fixes.
- All 0-indexing fixed
- recreateItems() now uses itemMap.entrySet().iterator() (which fixed my issue alhamdulilah)
v1.2.5 - Hulk's still Angry
I won't even detail this please this is a bug fix, work
v1.2.4 - We saved the World!
Fixed
Another case of 0 indexing ._.
recreateItems() for loops from 0 not 1
v1.2.3 - We Snapped Again!
Humanity is now back to how it was. no 50% of the universe.
Anyways, HUGE BUG FIX.
Fixes
- This fixes a shading issue which makes the library heavy and interrupts coding with it.
This would make the library alone BIG; everything was shaded in the jar.
It would also interfere with the spigotmc/papermc library in the plugin's pom.xml or build.gradle(.kts) - This improves safety when iterating through a BaseMenu since now .next() actually throws NoSuchElementException when no elements exist.
- This fixes 0-indexing at BaseMenu#addItem(MenuItem item) when everything should be 1 indexed.
Added
- Most missing .hasItem() methods and .iterator() methods (.iterator() methods with extra parameters)
v1.2.2 - We're attacking Thanos!
Fixed
Fix shifting in MenuIterator
v1.2.1 - Thanos Snapped
v1.2.0 - The Avengers Building Exploded!
What's Changed
- Update README.md by @coderFlameyosFlow in #6
- Update README.md by @coderFlameyosFlow in #7
- A LOT of features. by @coderFlameyosFlow in #8
- MenuIterator by @Mqzn, This is the class
Improved
- Improved performance of startup time at LegacyNbt
- Improved row safety; rows now checked when creating menus/paginated menus
Added
-
MenuLayoutBuilder/MenuLayoutBuilderImpl
Now you can create menus like this:// Map#of exists in Java 9/10/11+ Menu menu = MenuLayoutBuilder.bind(Map.of('X', ItemBuilder.of(Material.STONE).buildItem())) .row("XXXXXXXXX") .row("X X") // one white space = one empty slot .row("XXXXXXXXX") .createMenu();
Sweet right?
-
Most iteration/streams/loops are now implemented in BaseMenu BaseMenu now implements the Iterable<?> interface, .stream() and .parallelStream() now exist aswell
-
Dynamic (automatic) resizing now exists (but optional), won't work if rows > 6 or MenuType != MenuType.CHEST
-
hasItem(Slot) now exists.
AND MORE!
Full Changelog: 1.1.3...1.2.0