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

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 Likes

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

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

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.

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

Does this plugin support variables ?Some placeholder plugin?

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.

@honeybee, yes, you can.

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

In our continuing effort to phase out the Plugin Releases category, this thread is being locked because the plugin is already listed on Ore.

Check it out: Xakep_SDK / ViewAPI