mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-01-26 18:11:43 +01:00
Setup the basic Catalog panel
This commit is contained in:
parent
d1732e4f20
commit
70f589538c
@ -1,6 +1,10 @@
|
||||
package world.bentobox.bentobox.panels;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.eclipse.jdt.annotation.NonNull;
|
||||
import world.bentobox.bentobox.BentoBox;
|
||||
import world.bentobox.bentobox.api.panels.builders.PanelBuilder;
|
||||
import world.bentobox.bentobox.api.panels.builders.PanelItemBuilder;
|
||||
import world.bentobox.bentobox.api.user.User;
|
||||
|
||||
/**
|
||||
@ -9,7 +13,23 @@ import world.bentobox.bentobox.api.user.User;
|
||||
*/
|
||||
public class CatalogPanel {
|
||||
|
||||
private static final String LOCALE_REF = "catalog.panel.";
|
||||
private static final int[] PANES = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 17, 18, 26, 27, 35, 36, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53};
|
||||
|
||||
private CatalogPanel() {}
|
||||
|
||||
public static void openPanel(@NonNull User user) {
|
||||
user.sendRawMessage("open the catalog (it's coming soon!)");
|
||||
BentoBox plugin = BentoBox.getInstance();
|
||||
|
||||
PanelBuilder builder = new PanelBuilder()
|
||||
.name(user.getTranslation(LOCALE_REF + "title"))
|
||||
.size(54);
|
||||
|
||||
// Setup header and corners
|
||||
for (int i : PANES) {
|
||||
builder.item(i, new PanelItemBuilder().icon(Material.LIGHT_BLUE_STAINED_GLASS_PANE).name(" ").build());
|
||||
}
|
||||
|
||||
builder.build().open(user);
|
||||
}
|
||||
}
|
||||
|
@ -1022,6 +1022,10 @@ management:
|
||||
&cWeird behaviour and bugs can occur
|
||||
&cand most features may be unstable.
|
||||
|
||||
catalog:
|
||||
panel:
|
||||
title: "Addons Catalog"
|
||||
|
||||
successfully-loaded: |
|
||||
|
||||
&6 ____ _ ____
|
||||
|
Loading…
Reference in New Issue
Block a user