mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-01-23 16:41:42 +01:00
Added /bentobox catalog
This commit is contained in:
parent
e7cd9d1453
commit
8601cd6a0d
@ -0,0 +1,31 @@
|
||||
package world.bentobox.bentobox.commands;
|
||||
|
||||
import world.bentobox.bentobox.api.commands.CompositeCommand;
|
||||
import world.bentobox.bentobox.api.user.User;
|
||||
import world.bentobox.bentobox.panels.CatalogPanel;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Displays the Addons Catalog.
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @author Poslovitch
|
||||
*/
|
||||
public class BentoBoxCatalogCommand extends CompositeCommand {
|
||||
|
||||
public BentoBoxCatalogCommand(CompositeCommand parent) {
|
||||
super(parent, "catalog");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setOnlyPlayer(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean execute(User user, String label, List<String> args) {
|
||||
CatalogPanel.openPanel(user);
|
||||
return true;
|
||||
}
|
||||
}
|
@ -20,6 +20,7 @@ public class BentoBoxCommand extends CompositeCommand {
|
||||
new BentoBoxVersionCommand(this);
|
||||
new BentoBoxAboutCommand(this);
|
||||
new BentoBoxManageCommand(this);
|
||||
new BentoBoxCatalogCommand(this);
|
||||
new BentoBoxReloadCommand(this);
|
||||
}
|
||||
|
||||
|
@ -117,7 +117,7 @@ public class ManagementPanel {
|
||||
.name(user.getTranslation(LOCALE_REF + "buttons.catalog.name"))
|
||||
.description(user.getTranslation(LOCALE_REF + "buttons.catalog.description"))
|
||||
.clickHandler((panel, user1, clickType, slot) -> {
|
||||
user1.sendRawMessage("opening the catalog... (not implemented yet)");
|
||||
CatalogPanel.openPanel(user);
|
||||
return true;
|
||||
})
|
||||
.build();
|
||||
@ -230,7 +230,7 @@ public class ManagementPanel {
|
||||
.name(user.getTranslation(LOCALE_REF + "buttons.empty-here.name"))
|
||||
.description(user.getTranslation(LOCALE_REF + "buttons.empty-here.description"))
|
||||
.clickHandler((panel, user1, clickType, slot) -> {
|
||||
user1.sendRawMessage("opening the catalog... (not implemented yet)");
|
||||
CatalogPanel.openPanel(user);
|
||||
return true;
|
||||
})
|
||||
.build();
|
||||
|
Loading…
Reference in New Issue
Block a user