-
Notifications
You must be signed in to change notification settings - Fork 1
Documentation
Koboo edited this page May 14, 2025
·
5 revisions
stomui is a flexible component-based inventory framework for Minestom.
- Minestom:
1.21.4- Snapshot-Version
ebaa2bbf64
- Snapshot-Version
- JDK:
21
stomui has only one dependency.
-
adventure-minimessage- Version:
4.18.0
- Version:
This library is hosted on maven central.
Note: You can find the latest version here.
Adding dependency in Maven:
<dependency>
<groupId>eu.koboo</groupId>
<artifactId>stomui</artifactId>
<version>${version}</version>
</dependency>Adding dependency in Gradle (Groovy):
implementation "eu.koboo:stomui:${version}"To use stomui you have to create a ViewRegistry using the following calls:
// Creates a new ViewRegistry instance to use
ViewRegistry viewRegistry = MinestomUI.create();
// Registers the listeners of stomui on the Minestom Server
viewRegistry.enable();
// You could also disable the created ViewRegistry (e.g. on shutdown to cleanup safely)
viewRegistry.disable();If you want to open anything to a Player you have to create a ViewProvider first.
public class MyViewProvider extends ViewProvider {
public MyViewProvider(ViewRegistry viewRegistry) {
super(registry, ViewBuilder.of(ViewType.SIZE_6_X_9)
.title("MyMiniMessageTitle"));
}
}Now you can create a new instance of MyViewProvider and open it to any Player.
ViewRegistry viewRegistry = YOUR_VIEW_REGISTRY_INSTANCE;
Player player = ANY_MINESTOM_PLAYER;
MyViewProvider myViewProvider = new MyViewProvider(viewRegistry);
myViewProvider.open(player);