[API] ViewAPI | Simple api for scoreboards and menus!


#1

Description

Simple API for creating scoreboards!

Usage

Optional<SidebarManager> sidebarManagerOpt = Sponge.getServiceManager().provide(SidebarManager.class);
if (sidebarManagerOpt.isPresent()) {
    SidebarManager sidebarManager = sidebarManagerOpt.get();
    Sidebar sidebar = sidebarManager.createSidebar(player);
    sidebar.setTitle(new StaticText(Text.of("Title!")));
    sidebar.addLine(new StaticText(Text.of("First line!")));
    sidebar.addLine(sidebar.getEmptyText());
    sidebar.addLine(new StaticText(Text.of("Second line!")));
}

Links

ORE | Download

Issues


#2

Bump. Look at changelog.
Now possible to create inventory menus.


#3

Fixed sidebar api impl. Should be working now. Check out View API 2.2!


#4

Would you be interested in supporting PlaceholderAPI in this API? It seems like you have a foundation for different types of texts in sidebars and items so a PlaceholderText type of object might be useful. I can understand wanting to minimize dependencies so if you don’t want to add this it’s fine (PlaceholderAPI tries to minimize as well).

If you want I can create a PR that adds basic support (though you may want to add more complicated support later) to help this process along.


#5

Hi! Yes, please! I’ll make something like extensions plugin for viewapi and include your PlaceholderText to extensions plugin!


#6

Does this plugin support variables ?Some placeholder plugin?


#7

Can I move this plug-in to the MCBBS forum in China?
I will show the original author and the original page.

If you like, I will send you the link of the web page after the successful removal.

I will not provide other download addresses.


#8

@honeybee, yes, you can.


#9

Thank you,Thank you. I will provide the website after the successful removal.