Animated Button
How to create an Animated button and put it into the gui
// Create the gui with only a line
McGUI gui = new McGUI("§7Name", GuiLines.ONE_LINE, Main.getInstance());
// Create an item
GUItem item = new GUICustomItem(Material.BARRIER);
// All the item configurations ...
// Create the animation
ItemAnimation animation = new ItemAnimation(0, true);
// All the animation configurations ...
// And create the GUIAnimatedItem
GUIAnimatedItem animatedItem = new GUIAnimatedItem(item, animation);
gui.createAnimatedButton(animatedItem , 0, new GUIButtonEvents(() -> {
// Left click actions
}, () -> { /* Right click actions */}));Last updated