Releases: Mqzn/Lotus
v1.6.0
Lotus v1.5.1
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
Changes
PageViewis 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
Nothing much, updated kyori adventure dependencies to the latest ver
Lotus v1.4.2
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
Quick Patch
- Fixed
IncompatibleClassChangeErroron opening for newer paper versions
Lotus v1.4
Changes
- Added
Capacity#flexiblefor flexible size of a gui
Lotus v1.3
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 isLOW - Internal: Added listener for
InventoryDragEvent - Removed method
Menu#onClick - Added methods:
Menu#onDragMenu#onPreClickMenu#onPostClickMenuView#refresh
Lotus v1.2
Changes:
- Bug fix >> start parameter isn't properly working with the
FillRangeAPI - Added methods
Page#onSwitchingToNextPageandPage#onSwitchingToPreviousPage
for hooking up whenever a page is switched
Lotus v1.1.9
Changes:
- Bug-fix: fixed
Button's data registry not working properly.