|
1 | 1 | # PluginVersions <a href="https://hangar.papermc.io/SlimeDog/PluginVersions"></a> <a href="https://www.spigotmc.org/resources/70927/"></a> |
2 | 2 |
|
3 | | -Create an alphabetically-sorted list of loaded plugins and versions. |
| 3 | +PluginVersions creates an alphabetically sorted list of loaded plugins and their versions. This 1MB update also keeps a human-readable plugin inventory database, lets you curate plugin URLs over time, and exports Markdown reports for GitHub, Discord, or server documentation. |
4 | 4 |
|
5 | | -### Tested Environments |
| 5 | +## Tested Environment |
6 | 6 |
|
7 | | -**PluginVersions** was originally written for Spigot 1.8.8, and has worked for every Spigot version since then. |
| 7 | +This Paper build targets PaperMC `26.1.2` (`paper-api:26.1.2.build.20-alpha`) and compiles with Java 25. The plugin uses `api-version: 1.21.11` and reports version `2.0.0`. |
8 | 8 |
|
9 | | -All commands may be executed at the console, and in-game with appropriate permissions. |
| 9 | +The plugin data folder is `plugins/1MB-PluginVersions/`. |
10 | 10 |
|
11 | | -### Commands |
| 11 | +The only root command is `/pv`. The long `/pluginversions` command is not registered; the namespaced command remains available as `pluginversions:pv`. |
12 | 12 |
|
13 | | -> _pluginversions list_ |
14 | | -> Create an alphabetically-sorted columnar list of plugins and versions. |
15 | | -> |
16 | | -> _pluginversions reload_ |
17 | | -> Reload configuration file. |
18 | | -> At present, the only configuration option is whether to send metrics to MCStats.org. |
| 13 | +All commands can be executed from the console. In-game use requires the matching permission. |
19 | 14 |
|
20 | | -### Command aliases |
| 15 | +## Build |
21 | 16 |
|
22 | | -- pv :: Spigot, Paper |
23 | | -- pvb :: BungeeCord, Waterfall |
24 | | -- pvv :: Velocity |
| 17 | +```bash |
| 18 | +gradle clean build |
| 19 | +``` |
25 | 20 |
|
26 | | -### Permissions |
| 21 | +The compiled jar is written to `builds/libs/1MB-PluginVersions-v2.0.0-003-j25-26.1.2.jar`. |
27 | 22 |
|
28 | | -Permissions reflect the commands they allow. All permissions default to op. |
| 23 | +## Commands |
29 | 24 |
|
30 | | -> _pluginversions.list_ |
| 25 | +| Command | Description | |
| 26 | +| --- | --- | |
| 27 | +| `/pv help [page\|topic]` | Shows help pages. | |
| 28 | +| `/pv list [page]` | Lists loaded plugins and versions. Without a page, it lists every loaded plugin. | |
| 29 | +| `/pv reload` | Reloads `config.yml` and the active translation file. | |
| 30 | +| `/pv debug [page\|topic]` | Shows status, plugin details, server details, counts, commands, permissions, placeholders, config, set, and URL pages. | |
| 31 | +| `/pv debug url add <plugin> <url>` | Stores a manual URL and infers the URL type. | |
| 32 | +| `/pv debug url add <plugin> <type> <url>` | Stores a manual URL with a custom type such as `source`, `docs`, or `download`. | |
| 33 | +| `/pv debug url del <plugin> [type] <url>` | Removes a stored manual URL. | |
| 34 | +| `/pv debug url list <plugin>` | Lists manual URLs stored for a plugin. | |
| 35 | +| `/pv debug url audit [page]` | Shows URL coverage for tracked plugins. | |
| 36 | +| `/pv config [page]` | Shows active configuration values. | |
| 37 | +| `/pv set <path> <value>` | Updates a known `config.yml` setting, saves it, and reloads the plugin settings. Filesystem paths are console-only. | |
| 38 | +| `/pv export [markdown\|discord]` | Updates the database and writes timestamped plus stable latest export files. | |
31 | 39 |
|
32 | | -> _pluginversions.reload_ |
| 40 | +## Permissions |
| 41 | + |
| 42 | +All permissions except `pluginversions.help` default to op. |
| 43 | + |
| 44 | +| Permission | Description | |
| 45 | +| --- | --- | |
| 46 | +| `pluginversions.*` | Grants every PluginVersions command and URL action. | |
| 47 | +| `pluginversions.help` | Allows access to help pages. | |
| 48 | +| `pluginversions.list` | Allows listing loaded plugins. | |
| 49 | +| `pluginversions.reload` | Allows reloading config and translations. | |
| 50 | +| `pluginversions.debug` | Allows viewing debug pages. | |
| 51 | +| `pluginversions.config` | Allows viewing active config values. | |
| 52 | +| `pluginversions.set` | Allows changing known config values. | |
| 53 | +| `pluginversions.export` | Allows exporting plugin inventory reports. | |
| 54 | +| `pluginversions.url.*` | Grants all manual URL database actions. | |
| 55 | +| `pluginversions.url.list` | Allows listing and auditing URL entries. | |
| 56 | +| `pluginversions.url.add` | Allows adding manual URL entries. | |
| 57 | +| `pluginversions.url.del` | Allows removing manual URL entries. | |
| 58 | + |
| 59 | +## Placeholders |
| 60 | + |
| 61 | +Language phrases live in `translations/Locale_EN.yml` and use MiniMessage. Legacy ampersand color codes are migrated at runtime if older values are found, but new phrases should use MiniMessage tags. |
| 62 | + |
| 63 | +Language tokens include `{name}`, `{display-name}`, `{internal-name}`, `{version}`, `{spacing}`, `{page}`, `{pages}`, `{count}`, `{enabled}`, and `{disabled}`. |
| 64 | + |
| 65 | +If PlaceholderAPI is installed, PluginVersions registers these placeholders: |
| 66 | + |
| 67 | +| Placeholder | Result | |
| 68 | +| --- | --- | |
| 69 | +| `%pluginversions_total%` | Loaded plugin count. | |
| 70 | +| `%pluginversions_enabled%` | Enabled plugin count. | |
| 71 | +| `%pluginversions_disabled%` | Disabled plugin count. | |
| 72 | +| `%pluginversions_database_tracked%` | Plugins currently tracked in the inventory database. | |
| 73 | +| `%pluginversions_version_<plugin>%` | Version for a loaded plugin. | |
| 74 | +| `%pluginversions_url_<plugin>_<type>%` | First matching detected or manual URL for a plugin and type. | |
| 75 | + |
| 76 | +## Configuration |
| 77 | + |
| 78 | +`config.yml` contains only operational settings and is fully commented. Player-facing phrases, command text, colors, and placeholders are kept in `translations/Locale_EN.yml`. |
| 79 | + |
| 80 | +Anonymous metrics are disabled by default with `settings.enable-metrics: false`. |
| 81 | + |
| 82 | +Update checks are disabled by default with `check-for-updates: false`. |
| 83 | + |
| 84 | +The YAML database is stored at `plugins/1MB-PluginVersions/plugins-database.yml` by default. It tracks each plugin's display name, internal name, version, enabled state, description, authors, contributors, dependencies, provided plugins, website, detected URLs, manual URLs, and scan history. |
| 85 | + |
| 86 | +`database.file` and `exports.directory` are filesystem paths and can only be changed from the console or by editing `config.yml`. |
| 87 | + |
| 88 | +## URL Database |
| 89 | + |
| 90 | +Detected URLs come from plugin metadata such as website and description fields. Manual URLs are stored under `manual-urls` and are merged with detected URLs in exports. |
| 91 | + |
| 92 | +Known inferred URL types include `github`, `jenkins`, `modrinth`, `hangar`, `spigot`, `dev-bukkit`, `ci`, and `website`. You can also provide your own type: |
| 93 | + |
| 94 | +```text |
| 95 | +/pv debug url add LuckPerms source https://github.com/LuckPerms/LuckPerms |
| 96 | +/pv debug url add LuckPerms download https://modrinth.com/plugin/luckperms |
| 97 | +``` |
| 98 | + |
| 99 | +## Exports |
| 100 | + |
| 101 | +Exports are written to `plugins/1MB-PluginVersions/exports/` by default. |
| 102 | + |
| 103 | +| Command | Files | |
| 104 | +| --- | --- | |
| 105 | +| `/pv export markdown` | `plugins-YYYY-MM-DD-HHMMSS.md` and `plugins-latest.md` | |
| 106 | +| `/pv export discord` | `plugins-discord-YYYY-MM-DD-HHMMSS.md` and `plugins-discord-latest.md` | |
| 107 | + |
| 108 | +## Credits |
| 109 | + |
| 110 | +PluginVersions credits mart-r, GabrielHD150, SlimeDog, and mrfloris as authors. Updates in this branch include implementation help from OpenAI. |
0 commit comments