Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/foxfirecodes/scoreboardmenu
A unique Bukkit GUI library which allows you to use Scoreboards for option selection GUIs
https://github.com/foxfirecodes/scoreboardmenu
Last synced: 5 days ago
JSON representation
A unique Bukkit GUI library which allows you to use Scoreboards for option selection GUIs
- Host: GitHub
- URL: https://github.com/foxfirecodes/scoreboardmenu
- Owner: foxfirecodes
- Created: 2018-05-28T23:51:59.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-12-22T00:16:09.000Z (about 1 year ago)
- Last Synced: 2025-01-01T14:07:15.483Z (5 days ago)
- Language: Java
- Size: 3.47 MB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ScoreboardMenu
> A unique Bukkit GUI library which allows you to use Scoreboards for option selection GUIs.
![Demo](res/demo.gif)
With **ScoreboardMenu** you can easily use Scoreboards as option selectors.
- Left Click to cycle forwards in a menu.
- Right Click to cycle backwards in a menu.
- Shift + Left Click to select a menu option.## Usage
First, [install the plugin](#installation). Any plugin that uses this library will require the library itself to be installed.
Next, add the following to your Maven `pom.xml` file:
```xml
rayzr-repo
https://cdn.rawgit.com/Rayzr522/maven-repo/master/me.rayzr522
scoreboardmenu
1.0.0```
Then, in your `plugin.yml` file, add the following:
```yaml
depend: [ScoreboardMenu]
```Now you can easily create a ScoreboardMenu using the simple builder-style API. Example:
```java
Player player; // Retrieve player from somewhere.new ScoreboardMenu()
.setTitle(ChatColor.BLUE + "Choose Type")
.setSelectedPrefix(ChatColor.GREEN.toString())
.setOtherPrefix(ChatColor.RED.toString())
.setRenderTransformer(type -> type.toString().toLowerCase().replace("_", " "))
.setCallback(type -> {
player.getInventory().addItem(new ItemStack(type));
player.sendMessage("Gave you an item of type: " + type);
});
.openFor(player);
```Full documentation is available in the form of JavaDocs which are part of the Maven dependency, and should be viewable from within your IDE.
## Installation
Just grab the latest JAR file off of the [releases page](https://github.com/Rayzr522/ScoreboardMenu/releases) and drop it in your plugins folder.