-
Notifications
You must be signed in to change notification settings - Fork 7
Creating custom sidebars
PXAV edited this page Jan 27, 2021
·
3 revisions
This tutorial demonstrates how sidebars are used in kelp-v0.1.0 and above. The old annotation-based sidebar system (v.0.0.5 and below) is not supported anymore.
There are different types of sidebars offered by Kelp.
Type | Description |
---|---|
SimpleSidebar |
Used to display plain sidebars. Can hold all components, but has a static title. |
AnimatedSidebar |
Can holld all components, but the title can be animated. |
We will use the SimpleSidebar
first and then look at the differences to the AnimatedSidebar
.
To create a new instance of a sidebar, you can call the static factory method of one of the sidebar types.
SimpleSidebar sidebar = SimpleSidebar.create();
sidebar.staticTitle("§b§lWELCOME ON THE SERVER!");
// title won't change if you update it
sidebar.title(() -> "§b§l" + player.getLocation());
// title will change if you call the update method
// and display the latest location of the player
Work in progress
(c) 2019-2021 pxav.
Kelp is an open-source project maintained by multiple developers. If you have additions/questions/problems to report about the wiki, feel free to create an issue here on GitHub or join the Discord
- SQL Module coming soon
- Documentation in progress