Skip to content

Releases: coderFlameyosFlow/WoodyMenus

v2.0.6

24 Jan 09:18
f76465b
Compare
Choose a tag to compare

Full Changelog: 2.0.5...2.0.6

v2.0.5

24 Jan 09:15
1be68bc
Compare
Choose a tag to compare

Full Changelog: 2.0.4...2.0.5

v2.0.4

24 Jan 09:11
614f4c7
Compare
Choose a tag to compare

The letter "a" is a menace, that's all I'll say

Full Changelog: 2.0.3...2.0.4

v2.0.3

24 Jan 09:00
214965a
Compare
Choose a tag to compare

Features: 1. Additions 2. Improvements 3. Bug fixes

Additions

  • TextHolder can now be applied to MenuItem via BaseItemBuilder and extenders
  • Now attribute (modifiers) can be added to items via builders and editors
  • You can apply ItemFlags
  • etc.

Improvements

Not much, just removed like 250+ line off PaginatedMenu by removing redundant methods.

Also optimized PaginatedMenu sorta because the optimizations coming from Menu are working now

Fixes

  • Since the redundant methods are removed, now the changed variable will work and it will update for PaginatedMenu
    Full Changelog: 2.0.2...2.0.3

2.0.2

23 Jan 19:52
ba9bdd8
Compare
Choose a tag to compare

Bug Fixes:

  • States would only be able to change the lore once, fixed.
  • ItemEditor had the class MenuItem and not the class ItemEditor and idk how 2.0.1 even compiled and passed all checks 💀

Full Changelog: 2.0.1...2.0.2

2.0.1

23 Jan 10:32
8d2279c
Compare
Choose a tag to compare

Features: 1. Bug fixes 2. Improvements 3. Additions

Bug Fixes

  • MenuBuilder#nextPageItem and vice versa did not return the builder, fixed.
  • If you used adventure and states in 2.0.0, rip all the decorations
  • Fixed an IndexOutOfBoundsException by checking for that exception, and try to size if possible, if 6 rows then it can fail fast and sleep peacefully (sucks, I wanna sleep, I feel like I'm in college)

Improved

  • State and Adventure support compatibility with each other
  • Improved Slot safety using the Slot class, requires you to use Slot#of, if you need an unsafe slot use .ofUnsafe (used for iteration for example)

Added

  • Lore and some other adventure stuff to help with Adventure compatibility with State.

Deprecations

  • Slot#isSlot is now deprecated due to confusion (I was the only one confused :D), use Slot#isValid instead.
  • PaginatedMenu#setNextPageItem and PaginatedMenu#setPreviousPageItem are now deprecated,
    Use PaginatedMenu#setPageItem, or even better, use Menu.builder#nextPageItem and Menu.builder#previousPageItem
  • ItemEditor#setActionAsync and similar are deprecated, do NOT set the action async that way, set it through the MenuItem and use MenuItem#setAsync.
  • Slot#new is now deprecated for safety reasons, use Slot#of or for unsafety (like you be working in C), use Slot#ofUnsafe

Full Changelog: 2.0.0...2.0.1

v2.0.0 - TEN N' TUT!

20 Jan 16:49
e89fde0
Compare
Choose a tag to compare

After so much hype (I was hyping up about 3 members and me), It has finally arrived, and the amount of work I put into this version will not disappoint you.

This wasn't supposed to take 3 months, but I've been distro-hopping and losing my work without backing it up.

Features: 1. Additions, 2. Performance, 3. Flexibility, 4. Extensibility, 5. Bug Fixes.

Just to go over a simple fixes beforehand, I've fixed:

  • Slot.FIRST and Slot.getFirst() returning the SECOND slot ever since release ;-;
  • Menu#getFiller will not cast to Filler.class, instead it will directly return the filler.
  • removed unnecessary "updating" field modifications that would also poorly be handled and disallow openAction and closeAction to execute.
  • some others I forgor they're too small

Deprecations

  • Slot#isSlot is now deprecated due to confusion (I was the only one confused :D), use Slot#isValid instead.
  • PaginatedMenu#setNextPageItem and PaginatedMenu#setPreviousPageItem are now deprecated,
    Use PaginatedMenu#setPageItem, or even better, use Menu.builder#nextPageItem and Menu.builder#previousPageItem

Improvements (Generic)

  • Menus now removed; plugin initialization is 100% automatic now.

Improvements (Performance)

  • Updated from Java 8 to Java 11.
    This is a really good update not just for me, but for others too!
    It improves internal performance, JVM performance, allows for more stabilization, and will make me and you write less code in the long run!

    When writing states I wrote my own replace method because Java 8 and under uses Regex to replace strings, which isn't a good idea.
    Java 9 and above optimizes such methods in String, and adds nice API to Stream and the collections API overall that improves memory consumption!

  • Woody now compiled differently.
    Applying the error_prone compilation to the compiler arguments in the project, now woody can compile more efficient runtime code, and detect errors better, and integrate error_prone and lombok annotations better.

    Also now that Slot.FIRST and Slot.NaS are now compile time constants

  • MenuIterator now has slightly optimized iteration.

  • Added Menu#allModifiersAdded to optimize performance slightly if all modifiers are actually in the Enum set by checking the size instead of checking #contains

  • fillRow now only affects the slots it needs to affect.
    on a related improvement, fillArea will now use bitwise to get the first area slot, improving performance, not because bitwise is used, but because we can now have the first slot and avoid unnecessary looping

  • LegacyNbt is rewritten; using a guava Table (or a safer wrapper for Map<R, Map<C, V>>
    instead of reflection, to optimize performance.

  • Improve performance for Menu#addItem by avoiding recursion as much as possible (by directing the size checking in another method)

  • List Modifier.ALL was replaced to EnumSet Modifier.ALL to avoid copying of the List and improve boilerplate handling

Internal Reductions & breaking changes

  • Removed Page, PageIterator.
    Pagination wasn't rewritten as much as 1.4.0 since it's similar, but PaginatedMenu and Menu now internally work off a new class called ItemData, to improve following the DRY principle (saving my time) and to lower the amount of lines!

  • PaginatedBuilder and NormalBuilder was removed in favor of MenuBuilder which is both of those combined.

  • getRows() and getSize() replaced with rows() and size()

  • MenuException removed

  • BaseMenu removed in favor of Menu.

  • Decorator was now removed, now PageDecoration implements MenuFiller instead of Decorator, allowing for extra flexibility with Filler and PageDecoration

Additions

  • New Stating API
    New States that would automatically change values of in the lore, for example:

    MenuItem item = ...;
    item.addState(State.of("%players-size%", () -> Bukkit.getOnlinePlayers().size(), item));
    
    item.addState(State.of("%cool-player%", () -> "FlameyosFlow", item));
    
    // to automatically update every item with a state on menus
    menu.setUpdateStatesOnUpdate(true);

    Includes a supplier of IntSupplier, DoubleSupplier, LongSupplier and just a Supplier which is normal.
    Would definitely save the hassle of you getting your hands dirty and ugly looking. 😜

  • Reworked Animating API and stabilized it.
    Now animations made manual animating automatic, better, more flexible, faster, and (unfortunately) more verbose.

    Important Note: DO NOT SET IT TO A LOW DELAY! These animations are done synchronously (for now) and can block your server from running (It was tested at delay of 0, a.k.a no delay)

    A good usage of these new animations:

    Menu menu = ...;
    Animation animation = Animation.builder()
            .frames(
                Frame.builder()
                    .setItem(0, ItemBuilder.of(Material.STONE).buildItem();
                    .addItem(
                        ItemBuilder.of(Material.IRON_SWORD).buildItem(),
                        // others
                    )
                    // other items
                    .build(),
                // other frames
             )
             .type(Animation.Type.NORMAL)
             .delay(10) // 500ms
             .build();
    menu.addAnimation(animation); // you can have as much animations as you want
  • New Adventure API
    This API is very similar to IF's adventure support, where you use holders that allow compatibility for Legacy component handling or native component handling, or using StringHolders, it allows for extra flexibility and also being able to use Components

    Some servers use your plugin on a version under 1.16.5 and/or not on paper? no problem!
    The adventure implementation internally will switch to a legacy component handler on older versions.
    so you can use adventure on under 1.16.5 anyways!

    Good usage of this:

    Menu menu = Menu.builder()
        .title(CompHolder.of(Component.text("UO").color(TextColor.color(255, 192, 11))) // uses RGB
        .rows(6)
        .normal();
    
    menu.updateTitle(CompHolder.of(Component.text("AC").color(TextColor.color(255, 192, 11)))
        
    // MenuItems
    MenuItem item = ItemBuilder.of(Material.STONE)
        .title(CompHolder.of(Component.text("A Cool Stone").color(TextColor.color(255, 192, 11)))
        .buildItem()
    
    // so on in MenuData, etc.
  • MenuItem additions:
    Apart from the States, now MenuItem clicking can have an optional cooldown (map with lazy initialization to have just about no memory impact if not used)
    Here's how it can be initialized:

    MenuItem item = ...;
    item.addCooldown(player, 1000); // 1 second cooldown.

    That's it for cooldowns,

    also now SkullItemEditor is a thing, simple, it edits skulls, that's it.

  • New menu Actions:
    Normal & paginated:
    BeforeAnimatingEvent, menu.setOnAnimate, called right before the animations start, and if cancelled then the animations will not start on the open of the menu and it moves from 0 viewers.

    Paginated:
    PageChangedEvent, menu.setOnPageChange, called after a page is changed, much more options, and cancellable, and if cancelled then the page will switch to the next page if it was switched to the previous, or it will switch to the previous page if it was switched to the next

  • New Filler methods.
    fillSide methods with incredibly smart indexing to optimize performance rather than performing mathematical operations or (much worse) looping through the entire menu

  • Menu Slot Actions
    Now slot actions exist, and they are externally very similar to triumph-gui so I don't need to go much in detail.

Smaller additions

  • Slot#equals is now implemented including Slot#equals(int slot)

This took weeks of programming and algorithm research and more, there's just so much more optimizations, improvements and more, so enjoy!

v1.5.7 - Goodbye!

04 Oct 23:59
a4bc244
Compare
Choose a tag to compare

No, This is not the end of me or this project, don't worry 😄.

Category: 1. Bug Fixes, 2. Extensibility, ...

Bug Fixes

  • MenuLayoutBuilder would always ignore the last slot. fix

Improvements

  • Slot.getFirst() now public.
  • Simplified the MenuLayoutBuilder size in createMenu and createPaginated from ((rows * 9) + 9 - 10) to (rows * 9).

v1.5.6 - Teen titans deserved it.

27 Sep 11:32
316b5d9
Compare
Choose a tag to compare

Jitpack is building 1.2.x jars? not sure

v1.5.5 - ROBIN OUT!

27 Sep 04:55
316b5d9
Compare
Choose a tag to compare

Fixed an issue that could have been bad. Real bad

Full Changelog: 1.5.4...1.5.5