|
3 | 3 |
|
4 | 4 | ## About |
5 | 5 |
|
6 | | -Add-on for BentoBox to calculate island levels for AOneBlock specifically. Ranks are determined by how many magic blocks have been mined - the count. |
| 6 | +TopBlock is a [BentoBox](https://github.com/BentoBoxWorld/BentoBox) addon that produces a Top Ten ranking for the [AOneBlock](https://github.com/BentoBoxWorld/AOneBlock) game mode based on how many magic blocks each island has mined. |
| 7 | + |
| 8 | +## Requirements |
| 9 | + |
| 10 | +- Paper 1.21.x (Spigot is no longer supported) |
| 11 | +- Java 21 |
| 12 | +- BentoBox 3.14.0 or later |
| 13 | +- AOneBlock 1.18.0 or later |
7 | 14 |
|
8 | 15 | ## How to use |
9 | 16 |
|
10 | | -1. Place the level addon jar in the addons folder of the BentoBox plugin. Make sure you have AOneBlock installed too! |
11 | | -2. Restart the server |
12 | | -3. The addon will create a data folder and inside the folder will be a config.yml |
13 | | -4. Edit the config.yml how you want. |
14 | | -5. Restart the server if you make a change |
| 17 | +1. Drop the TopBlock jar into your server's `plugins/BentoBox/addons/` folder. AOneBlock must already be installed there too. |
| 18 | +2. Restart the server. TopBlock will create `addons/TopBlock/config.yml` and `addons/TopBlock/panels/top_panel.yml`. |
| 19 | +3. Edit `config.yml` if you want to tune anything (see below) and restart the server again to apply. |
| 20 | + |
| 21 | +## Configuration |
| 22 | + |
| 23 | +`addons/TopBlock/config.yml`: |
| 24 | + |
| 25 | +| Option | Default | Description | |
| 26 | +|----------------|---------|-------------------------------------------------------------------------------------------------------------------| |
| 27 | +| `refresh-time` | `5` | How often the Top Ten is recalculated, in minutes. Minimum 1. Each refresh reads every island, so don't set it too low. | |
| 28 | +| `shorthand` | `false` | If `true`, format large counts using units — `10,500` becomes `10.5k`, `1,527,314` becomes `1.5M`, etc. | |
| 29 | + |
| 30 | +The panel layout lives in `addons/TopBlock/panels/top_panel.yml`. Edits are preserved across restarts. |
15 | 31 |
|
16 | 32 | ## Commands |
17 | 33 |
|
18 | | -`/ob topblock` - this shows the Top Ten |
| 34 | +`/ob topblock` (alias: `/oneblock topblock`) — opens the Top Ten panel. |
| 35 | + |
| 36 | +To get into the top ten, a player just needs to mine at least one magic block on their AOneBlock island. The list refreshes every `refresh-time` minutes; a player who just started mining may need to wait that long before appearing. |
19 | 37 |
|
20 | 38 | ## Permissions |
21 | | -Permissions are given automatically to players as listed below. If your permissions plugin strips permissions then you may have to allocate these manually. Note that if a player doesn't have the `intopten` permission, they will not be listed in the top ten. |
22 | 39 |
|
23 | | -``` |
24 | | -permissions: |
| 40 | +Permissions are given automatically to players. If your permissions plugin strips defaults, allocate them manually: |
| 41 | + |
| 42 | +```yaml |
| 43 | +permissions: |
25 | 44 | 'aoneblock.island.topblock': |
26 | | - description: Player can use TopBlock command |
| 45 | + description: Player can use the TopBlock command |
| 46 | + default: true |
| 47 | + 'aoneblock.intopten': |
| 48 | + description: Player's island will be listed in the top ten. Remove from admins or testers to hide them. |
27 | 49 | default: true |
28 | 50 | ``` |
29 | 51 |
|
| 52 | +If an island owner is **online** and lacks `aoneblock.intopten`, their island is excluded from the top ten panel and from placeholders. **Offline** owners are always included — to hide an admin or tester, remove the perm from the player who can actually log in. Removing the perm from an entire group (e.g. ops) excludes everyone in that group while online. |
| 53 | + |
| 54 | +The icon shown for each rank can be overridden per player by granting `aoneblock.topblock.icon.<MATERIAL>` (for example `aoneblock.topblock.icon.diamond_block`). Without an override, the rank icon is the player's head. |
| 55 | + |
30 | 56 | ## Placeholders |
31 | 57 |
|
32 | 58 | ``` |
33 | | -%aoneblock_island_player_name_top_RANK% where RANK is 1 to 10 - Island owner's name |
34 | | -%aoneblock_island_member_names_top_RANK% where RANK is 1 to 10 - Name of island team members |
35 | | -%aoneblock_island_phase_name_top_RANK% where RANK is 1 to 10 - Name of the phase they have reached |
36 | | -%aoneblock_island_phase_number_top_RANK% where RANK is 1 to 10 - Phase number, e.g. Plains is 1, Underground is 2, etc. |
37 | | -%aoneblock_island_count_top_RANK% where RANK is 1 to 10 - Block Count of magic blocks mined this round |
38 | | -%aoneblock_island_lifetime_top_RANK% where RANK is 1 to 10 - Lifetime count of magic blocks mined |
| 59 | +%aoneblock_island_player_name_top_RANK% - Island owner's name |
| 60 | +%aoneblock_island_member_names_top_RANK% - Comma-separated team members (highest rank first) |
| 61 | +%aoneblock_island_phase_name_top_RANK% - Name of the phase the island has reached |
| 62 | +%aoneblock_island_phase_number_top_RANK% - Phase number, e.g. Plains is 1, Underground is 2 |
| 63 | +%aoneblock_island_count_top_RANK% - Block count of magic blocks mined this round |
| 64 | +%aoneblock_island_lifetime_top_RANK% - Lifetime count of magic blocks mined |
39 | 65 | ``` |
| 66 | +
|
| 67 | +`RANK` is `1` to `10`. If fewer than `RANK` islands qualify for the top ten, the placeholder returns an empty string. |
| 68 | +
|
| 69 | +## Building from source |
| 70 | +
|
| 71 | +```bash |
| 72 | +mvn clean package |
| 73 | +``` |
| 74 | + |
| 75 | +Produces `target/TopBlock-<version>.jar`. |
| 76 | + |
| 77 | +## License |
| 78 | + |
| 79 | +[EPL-2.0](LICENSE) |
0 commit comments