Skip to content

Commit 587aafa

Browse files
author
ZDiscord Maintainer
committed
docs: clean up all docs, add DiscordSRV comparison, expand listings
- Add DiscordSRV comparison table to README - Update all marketplace listings (Modrinth, CurseForge, SpigotMC, Hangar) - Expand CONTRIBUTING.md with build/test/structure guide - Clean up issue templates with additional context fields - Ensure CHANGELOG unreleased section is complete
1 parent 8d56f5a commit 587aafa

11 files changed

Lines changed: 101 additions & 21 deletions

File tree

.github/CONTRIBUTING.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,39 @@ edits are all welcome.
1212
4. Verify it builds: `mvn clean package`
1313
5. Push to your fork and open a pull request against `main`.
1414

15+
## Building
16+
17+
```bash
18+
git clone https://github.com/DemonZ-Development/ZDiscord.git
19+
cd ZDiscord
20+
mvn clean package
21+
```
22+
23+
The shaded JAR is written to `target/ZDiscord-1.1.0.jar`. The build runs
24+
tests automatically during the `test` phase.
25+
26+
## Running tests
27+
28+
```bash
29+
mvn test
30+
```
31+
32+
The test suite uses JUnit Jupiter 5.10.2. Tests cover:
33+
34+
- **ConfigManager** — schema migration, key merging, defaults
35+
- **YamlStorage** — CRUD operations for links, stats, activity, follows
36+
- **TicketModule** — category parsing from config
37+
- **StatusEmbedBuilder** — embed structure and placeholder resolution
38+
- **UpdateChecker** — semver comparison and pre-release handling
39+
- **HeadUtil** — avatar URL resolution
40+
- **ColorUtil** — Discord markdown conversion
41+
- **PlaceholderUtil** — colour code stripping and placeholder expansion
42+
- **TPSUtil** — server performance metrics
43+
44+
Tests use a `SyncPlatformAdapter` (runs tasks on the caller thread) and
45+
`BukkitStub` (fake `ServerBridge` backend) so they don't need a running
46+
server.
47+
1548
## Code style
1649

1750
- 4-space indentation, no tabs.
@@ -22,6 +55,33 @@ edits are all welcome.
2255
- Do not commit `target/`, `.jar` build outputs, secrets, tokens, or
2356
real Discord credentials.
2457

58+
## Project structure
59+
60+
```
61+
src/main/java/dev/demonz/zdiscord/
62+
ZDiscord.java # Plugin entry point
63+
platform/ # Paper / Spigot / Folia scheduler adapters
64+
config/ # ConfigManager, MessageManager
65+
storage/ # StorageManager + YamlStorage / MySQLStorage
66+
discord/ # JDA wiring (BotManager, slash/button listeners)
67+
discord/listeners/ # DiscordChatListener, ReconnectListener, etc.
68+
minecraft/ # In-game bridge
69+
ChatBridge.java # Shared MC→Discord forwarder
70+
commands/ # /zdiscord, /discord, /sc
71+
listeners/ # ChatListener, JoinQuitListener, ...
72+
modules/ # Feature modules (status, ticket, ...)
73+
util/ # ColorUtil, HeadUtil, ServerBridge, StatusEmbedBuilder, ...
74+
```
75+
76+
## Adding a new module
77+
78+
1. Create a class in `modules/` implementing `init()`, `shutdown()`, and
79+
`reload()`.
80+
2. Add a config toggle in `config.yml` (e.g. `my-module.enabled`).
81+
3. Register the module in `ZDiscord.initModules()`.
82+
4. Add a shutdown call in `ZDiscord.onDisable()`.
83+
5. Add tests for any non-trivial logic.
84+
2585
## Reporting issues
2686

2787
- Use the **Bug report** issue template for broken behaviour.

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,7 @@ What actually happens. Include the exact error message or screenshot if relevant
4242
```
4343
# Paste the relevant log output from plugins/ZDiscord/ or the server console
4444
```
45+
46+
## Additional context
47+
48+
Add any other context about the problem here (e.g., other plugins installed, Discord bot permissions, etc.).

.github/ISSUE_TEMPLATE/documentation.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,7 @@ What is wrong or missing?
1717
## Suggested fix
1818

1919
If you have a proposed change, describe it.
20+
21+
## Additional context
22+
23+
Add any other context about the documentation issue here.

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ Any other approaches you considered.
2424

2525
## Additional context
2626

27-
Anything else relevant.
27+
Anything else relevant (e.g., similar features in other plugins, Discord API capabilities, etc.).

.github/ISSUE_TEMPLATE/question.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,10 @@ Steps you have already attempted.
1919
- ZDiscord version:
2020
- Server software and version:
2121
- Storage backend:
22+
- Java version: (`java -version`)
23+
24+
## Logs
25+
26+
```
27+
# If applicable, paste relevant log output from plugins/ZDiscord/ or the server console
28+
```

.github/listings/curseforge.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ Discord integration for Paper, Folia, and Spigot. Chat bridge with player heads,
2020

2121
ZDiscord bridges your Minecraft server and Discord guild. Chat flows both ways, players see server status from Discord, and staff manage tickets from a dropdown panel.
2222

23+
Built with modern JDA 5 for native slash commands and button interactions. Supports Paper, Folia, and Spigot out of the box. 15+ toggleable modules — use what you need, disable what you don't.
24+
2325
### Features
2426

2527
- **Chat bridge** — Two-way chat between Minecraft and Discord. Webhooks display player heads as avatars. Linked players show their Discord name and avatar.
@@ -58,10 +60,6 @@ ZDiscord bridges your Minecraft server and Discord guild. Chat flows both ways,
5860
5. Restart the server.
5961
6. Run `/setup` in Discord to configure the remaining channels.
6062

61-
### bStats
62-
63-
[![bStats Server Signature](https://bstats.org/signatures/bukkit/MyZDiscord.svg)](https://bstats.org/plugin/bukkit/MyZDiscord/29652)
64-
6563
### License
6664

6765
Apache License 2.0

.github/listings/hangar.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Discord integration for Paper servers. Chat bridge, status, tickets, account lin
2020

2121
ZDiscord bridges your Minecraft server and Discord guild. Chat flows both ways, players see server status from Discord, and staff manage tickets from a dropdown panel.
2222

23-
It supports Paper 1.20.4 or newer, Folia, and Spigot 1.20.4 or newer.
23+
Built with modern JDA 5 for native slash commands and button interactions. Supports Paper 1.20.4 or newer, Folia, and Spigot 1.20.4 or newer. 15+ toggleable modules — use what you need, disable what you don't.
2424

2525
### Features
2626

@@ -60,10 +60,6 @@ It supports Paper 1.20.4 or newer, Folia, and Spigot 1.20.4 or newer.
6060
5. Restart the server.
6161
6. Run `/setup` in Discord to configure the remaining channels.
6262

63-
### bStats
64-
65-
[![bStats Server Signature](https://bstats.org/signatures/bukkit/MyZDiscord.svg)](https://bstats.org/plugin/bukkit/MyZDiscord/29652)
66-
6763
### License
6864

6965
Apache License 2.0

.github/listings/modrinth.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,16 @@ Server-side
1818

1919
## Short description (max 100 chars)
2020

21-
Discord integration for Paper, Folia, and Spigot servers. Chat bridge, tickets, leaderboards, anti-raid, player profiles, confessions.
21+
Discord integration for Paper, Folia, and Spigot. Chat bridge, tickets, leaderboards, anti-raid, player profiles, confessions.
2222

2323
## Long description
2424

2525
ZDiscord bridges your Minecraft server and Discord guild. Chat flows both ways, players see server status from Discord, and staff manage tickets from a dropdown panel.
2626

27+
### Why ZDiscord?
28+
29+
Built with modern JDA 5 for native slash commands and button interactions. Supports Paper, Folia, and Spigot out of the box. 15+ toggleable modules — use what you need, disable what you don't.
30+
2731
### Features
2832

2933
- **Chat bridge** — Two-way chat between Minecraft and Discord. Webhooks display player heads as avatars. Linked players show their Discord name and avatar.
@@ -66,10 +70,6 @@ ZDiscord bridges your Minecraft server and Discord guild. Chat flows both ways,
6670

6771
All configuration lives in `plugins/ZDiscord/config.yml`. User-facing strings are in `messages.yml`. See the wiki for a full reference.
6872

69-
### bStats
70-
71-
[![bStats Server Signature](https://bstats.org/signatures/bukkit/MyZDiscord.svg)](https://bstats.org/plugin/bukkit/MyZDiscord/29652)
72-
7373
### License
7474

7575
Apache License 2.0
@@ -80,8 +80,6 @@ Apache License 2.0
8080
- Issues: https://github.com/DemonZ-Development/ZDiscord/issues
8181
- Wiki: https://github.com/DemonZ-Development/ZDiscord/wiki
8282

83-
84-
8583
## Tags
8684

8785
`paper` `folia` `spigot` `discord` `chat` `tickets` `linking` `anti-raid` `utility`

.github/listings/spigot.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ Chat bridge, tickets, status, account linking, anti-raid, player profiles, confe
1616

1717
ZDiscord bridges your Minecraft server and Discord guild. Chat flows both ways, players see server status from Discord, and staff manage tickets from a dropdown panel.
1818

19+
Built with modern JDA 5 for native slash commands and button interactions. Supports Paper, Folia, and Spigot out of the box. 15+ toggleable modules — use what you need, disable what you don't.
20+
1921
### Features
2022

2123
- **Chat bridge** — Two-way chat between Minecraft and Discord. Webhooks display player heads as avatars. Linked players show their Discord name and avatar.
@@ -77,8 +79,6 @@ Apache License 2.0
7779
- `zdiscord.bypass.link` (op) — bypass link-to-join enforcement
7880
- `zdiscord.bypass.console` (op) — reserved (currently unused)
7981

80-
[URL=https://bstats.org/plugin/bukkit/MyZDiscord/29652][IMG]https://bstats.org/signatures/bukkit/MyZDiscord.svg[/IMG][/URL]
81-
8282
## External links
8383

8484
- Source: https://github.com/DemonZ-Development/ZDiscord

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
88

99
### Added
1010
- `/profile [player]` — renders a player card embed with avatar, NameMC link, first/last seen (Discord timestamps), sessions, playtime, advancement count, link status, follower count, and online indicator. Follow/Unfollow button on the embed subscribes the requester to DM notifications.
11-
- `/seen <player]` — quick last-seen lookup. Returns online/offline status, last-seen timestamp, playtime, and session count.
11+
- `/seen <player>` — quick last-seen lookup. Returns online/offline status, last-seen timestamp, playtime, and session count.
1212
- `/following` — lists the Minecraft players the requester follows.
13-
- `/unfollow <player]` — stops following a player (previously only the button on `/profile`).
13+
- `/unfollow <player>` — stops following a player (previously only the button on `/profile`).
1414
- `/confess <message>` — posts an anonymous confession to `channels.confessions`. Rate-limited (configurable via `confessions.cooldown`, default 300s). Stable monotonic handle per confessor. `&` colour codes convert to Discord markdown.
1515
- Silent update check every 5 hours (was 6). One quiet embed to `misc.update-channel`, no pings. `misc.update-silent` suppresses both the in-game banner and Discord notice.
1616
- Achievement rarity display — "First of the day" badge when the player is the first to unlock that advancement in 24 hours, and "Rare — only N% of players have this" badge below a configurable threshold (default 25%).

0 commit comments

Comments
 (0)