CarouselSelector.class
This class is intended to generate the content of the menus.
How to use
To create a 3D menu, extend your class with CarouselSelector as below.
Use "createItem(...)" to initialize new 3D items.
public class MainMenu extends CarouselSelector {
public MainMenu(Player player, String name) {
super(player, name);
}
@Override
public void init() {
// Create a new 3D item
this.createItem("Menu title", new ItemStack(Material.JUKEBOX), Item3D.ItemForm.BLOCK, () -> {
// Do whatever you want :)
this.getPlayer().playSound(this.getPlayer().getLocation(), Sound.ENTITY_VILLAGER_YES, 1, 1);
});
}
}
Last updated
Was this helpful?