use of me.tom.sparse.spigot.chat.menu.ChatMenu in project VoxelGamesLibv2 by VoxelGamesLib.
the class TestCommands method chatmenu.
@Subcommand("chatmenu")
@CommandPermission("%admin")
public void chatmenu(@Nonnull User user) {
ChatMenu menu = new ChatMenu().pauseChat(0, 0, ChatColor.RED + "[Close]");
menu.add(new TextElement("Hello, world2!", 10, 10));
IncrementalElement incr = new IncrementalElement(5, 5, 10);
incr.value.setChangeCallback((s) -> System.out.println("IncrementalElement changed! " + s.getPrevious() + " -> " + s.getCurrent()));
menu.add(incr);
menu.openFor(user.getPlayer());
}
Aggregations