Skip to content

Releases: Mqzn/Lotus

v1.6.0

21 Jul 13:08

Choose a tag to compare

Hot patch

  • Removed the need for adding kyori-adventure lib as a dependency
  • Added compatibility with paper newer versions

Lotus v1.5.1

12 Jul 17:18

Choose a tag to compare

Animations arrived !

This update adds a per button animation tasks, fully automated with
no need for manual intervention.

You can customize the animation task delay, update speed/ticks,
and whether the update should be asynchronous or synchronous.

AnimatedButton

A new abstract class has arrived providing a solid way of creating animations per one button.
You should be able to extend this class, creating your own buttons, and override the AnimatedButton#animate ,
This is method is the main method that will run the actual changes per frame.

TransformingButton

It's an automated animation where an button's itemstack is changed per frame, and this is called a transformation
Example use inside of your Menu#getContent :

private final static ItemStack[] ITEM_FRAMES = {
            ItemBuilder.legacy(Material.FIREWORK).build(),
            ItemBuilder.legacy(Material.TNT).build(),
            ItemBuilder.legacy(Material.SKULL_ITEM, 1, (short)1).build(),
            ItemBuilder.legacy(Material.SNOW_BALL).build()
    };
    
    @Override
    public @NotNull Content getContent(
            DataRegistry extraData,
            Player opener,
            Capacity capacity
    ) {
        
        TransformingButton randomGameButton = new TransformingButton(
                AnimationTaskData
                        .builder()
                        .delay(10L)
                        .ticks(12L) 
                        .async(true)
                        .build(),
                
                (item) -> ItemBuilder.legacy(item)
                        .setDisplay("&aRandom Game")
                        .setLore("&7Click to play a random game")
                        .build(), //an item modifier lambda, that can modify current changeable itemstacks for consistent item meta.
                ITEM_FRAMES
        ).click((view, event) -> {
            // Handle the click event here
            Player player = (Player) event.getWhoClicked();
            player.sendMessage("You clicked the random game button!");
        });

        return Content.builder(capacity)
            .setButton(1, randomGameButton)
            .build();
    }

Full Changelog: 1.4.4b...1.5.1

Lotus v1.4.4b

07 Apr 02:31

Choose a tag to compare

Changes

  • PageView is no longer treated as internal class.
  • Reverted the whole project to be based on Java 8

Full Changelog: 1.4.3...1.4.4b

Lotus v1.4.3

11 Mar 04:46

Choose a tag to compare

Nothing much, updated kyori adventure dependencies to the latest ver

Lotus v1.4.2

11 Mar 04:30

Choose a tag to compare

Changes

This update is more of a small patch

  • Removed static initializers for kyori adventure type fields.
  • Fixed max page=0 if components are empty, atleast 1 page will be available

Lotus v1.4.1

16 Jan 23:43

Choose a tag to compare

Quick Patch

  • Fixed IncompatibleClassChangeError on opening for newer paper versions

Lotus v1.4

13 Dec 20:10

Choose a tag to compare

Changes

  • Added Capacity#flexible for flexible size of a gui

Lotus v1.3

19 Oct 22:19

Choose a tag to compare

What's new in Lotus v1.3 ?

  • BUG-FIX: click actions being triggered twice per single click.
  • Removed the option for modifying the event priority of a click event,
    the priority for all Lotus's event-listeners is LOW
  • Internal: Added listener for InventoryDragEvent
  • Removed method Menu#onClick
  • Added methods:
    • Menu#onDrag
    • Menu#onPreClick
    • Menu#onPostClick
    • MenuView#refresh

Lotus v1.2

17 Oct 00:57

Choose a tag to compare

Changes:

  • Bug fix >> start parameter isn't properly working with the FillRange API
  • Added methods Page#onSwitchingToNextPage and Page#onSwitchingToPreviousPage
    for hooking up whenever a page is switched

Lotus v1.1.9

16 Oct 19:10

Choose a tag to compare

Changes:

  • Bug-fix: fixed Button's data registry not working properly.