Skip to content

Commit 5b48992

Browse files
Merge pull request #312 from Dans-Plugins/copilot/align-repository-with-dpc-conventions
Align repository with DPC conventions
2 parents 295694b + b195c75 commit 5b48992

9 files changed

Lines changed: 802 additions & 21 deletions

File tree

.github/copilot-instructions.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Copilot Instructions
2+
3+
This repository follows the DPC (Dans Plugins Community) conventions defined at
4+
https://github.com/Dans-Plugins/dpc-conventions. Read those conventions before
5+
making any changes.
6+
7+
## Technology Stack
8+
9+
- Language: Java
10+
- Build tool: Maven
11+
- Target platform: Spigot / Paper (Minecraft 1.13+)
12+
13+
## Project Structure
14+
15+
- `src/main/java/dansplugins/rpsystem/` – Plugin source code
16+
- `commands/` – Command executors grouped by feature
17+
- `config/` – Configuration service
18+
- `cards/` – Character card data model
19+
- `storage/` – Persistence layer
20+
- `listeners/` – Bukkit event listeners
21+
- `placeholders/` – PlaceholderAPI expansion
22+
- `utils/` – Utility classes
23+
- `src/main/resources/``plugin.yml` and `config.yml`
24+
25+
## Coding Conventions
26+
27+
- Follow the existing package structure (`dansplugins.rpsystem.*`) when adding new classes.
28+
- Annotate every command executor and event listener with `@Override` where applicable.
29+
- Never hard-code user-facing strings directly in Java; route them through the plugin's messaging helpers.
30+
- Use `ConfigService` to read configuration values rather than accessing `getConfig()` directly.
31+
32+
## Contribution Workflow
33+
34+
- Branch from `develop` for all changes.
35+
- Open a pull request against `develop`, not `main`.
36+
- Reference the related GitHub issue in every pull request description.

.github/workflows/build.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main, develop ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Set up JDK 8
20+
uses: actions/setup-java@v4
21+
with:
22+
java-version: '8'
23+
distribution: 'temurin'
24+
25+
- name: Build with Maven
26+
run: mvn clean package --batch-mode

.github/workflows/release.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types: [ created ]
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
build-and-attach:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Set up JDK 8
18+
uses: actions/setup-java@v4
19+
with:
20+
java-version: '8'
21+
distribution: 'temurin'
22+
23+
- name: Build with Maven
24+
run: mvn clean package --batch-mode
25+
26+
- name: Determine release JAR
27+
id: determine_jar
28+
run: |
29+
JAR_PATH=$(ls target/*.jar 2>/dev/null | grep -v 'original-' | head -n 1)
30+
if [ -z "$JAR_PATH" ]; then
31+
echo "No suitable release JAR found in target/." >&2
32+
exit 1
33+
fi
34+
echo "jar_path=$JAR_PATH" >> "$GITHUB_OUTPUT"
35+
36+
- name: Upload JAR to release
37+
uses: softprops/action-gh-release@v2
38+
with:
39+
files: ${{ steps.determine_jar.outputs.jar_path }}

CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
6+
7+
## [Unreleased]
8+
9+
## [1.13.0] – 2023-01-01
10+
11+
### Added
12+
- Initial tracked release of Medieval Roleplay Engine.
13+
- Character Cards: set and view character name, race, subculture, age, gender, and religion.
14+
- Bird (mail) system for sending in-character messages to other players.
15+
- Local roleplay chat (`/local`, `/rp`).
16+
- Global OOC chat (`/global`, `/ooc`).
17+
- Whisper chat (`/whisper`).
18+
- Yell chat (`/yell`).
19+
- Emote actions (`/emote`, `/me`).
20+
- Local OOC chat (`/lo`).
21+
- Dice rolling (`/roll`, `/dice`).
22+
- Title display command (`/title`).
23+
- PlaceholderAPI integration for character card data.
24+
- Docker-based development server with hot-reload support.
25+
- In-game configuration command (`/rpconfig`).

COMMANDS.md

Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
# Commands Reference
2+
3+
## Character Card Commands
4+
5+
### /card
6+
7+
**Description:** View your own character card.
8+
**Permission:** `rp.card.show`
9+
**Usage:** `/card`
10+
**Example:** `/card`
11+
12+
### /card lookup \<player\>
13+
14+
**Description:** View the character card of another player.
15+
**Permission:** `rp.card.lookup`
16+
**Usage:** `/card lookup <player>`
17+
**Example:** `/card lookup Steve`
18+
19+
### /card name \<name\>
20+
21+
**Description:** Set your character's name. Subject to a cooldown configured by `changeNameCooldown`.
22+
**Permission:** `rp.card.name`
23+
**Usage:** `/card name <name>`
24+
**Example:** `/card name Aldric`
25+
26+
### /card race \<race\>
27+
28+
**Description:** Set your character's race.
29+
**Permission:** `rp.card.race`
30+
**Usage:** `/card race <race>`
31+
**Example:** `/card race Human`
32+
33+
### /card subculture \<subculture\>
34+
35+
**Description:** Set your character's subculture.
36+
**Permission:** `rp.card.subculture`
37+
**Usage:** `/card subculture <subculture>`
38+
**Example:** `/card subculture Nordic`
39+
40+
### /card age \<age\>
41+
42+
**Description:** Set your character's age.
43+
**Permission:** `rp.card.age`
44+
**Usage:** `/card age <age>`
45+
**Example:** `/card age 30`
46+
47+
### /card gender \<gender\>
48+
49+
**Description:** Set your character's gender.
50+
**Permission:** `rp.card.gender`
51+
**Usage:** `/card gender <gender>`
52+
**Example:** `/card gender Male`
53+
54+
### /card religion \<religion\>
55+
56+
**Description:** Set your character's religion.
57+
**Permission:** `rp.card.religion`
58+
**Usage:** `/card religion <religion>`
59+
**Example:** `/card religion Northism`
60+
61+
### /card forcesave \<player\>
62+
63+
**Description:** Force-save a player's character card (admin only).
64+
**Permission:** `rp.card.forcesave`
65+
**Usage:** `/card forcesave <player>`
66+
**Example:** `/card forcesave Steve`
67+
68+
### /card forceload \<player\>
69+
70+
**Description:** Force-load a player's character card from storage (admin only).
71+
**Permission:** `rp.card.forceload`
72+
**Usage:** `/card forceload <player>`
73+
**Example:** `/card forceload Steve`
74+
75+
---
76+
77+
## Chat Commands
78+
79+
### /local \[message\] | /rp \[message\]
80+
81+
**Description:** Send a message in local roleplay chat, visible to players within `localChatRadius` blocks. Running without a message toggles local chat mode. Use `/local hide` to hide incoming local chat.
82+
**Permission:** `rp.local` or `rp.rp`
83+
**Usage:** `/local <message>` or `/rp <message>`
84+
**Example:** `/local Good morrow, traveller!`
85+
86+
### /global \[message\] | /ooc \[message\]
87+
88+
**Description:** Send a message in global out-of-character chat, visible to all players.
89+
**Permission:** `rp.global` or `rp.ooc`
90+
**Usage:** `/global <message>` or `/ooc <message>`
91+
**Example:** `/global Anyone up for a dungeon run?`
92+
93+
### /whisper \<message\>
94+
95+
**Description:** Send a whispered message visible only to players within `whisperChatRadius` blocks.
96+
**Permission:** `rp.whisper`
97+
**Usage:** `/whisper <message>`
98+
**Example:** `/whisper Meet me at the tavern tonight.`
99+
100+
### /yell \<message\>
101+
102+
**Description:** Send a yelled message visible to players within `yellChatRadius` blocks.
103+
**Permission:** `rp.yell`
104+
**Usage:** `/yell <message>`
105+
**Example:** `/yell Guards! Intruder!`
106+
107+
### /lo \<message\>
108+
109+
**Description:** Send an out-of-character message in local range.
110+
**Permission:** `rp.localOOC`
111+
**Usage:** `/lo <message>`
112+
**Example:** `/lo brb one sec`
113+
114+
---
115+
116+
## Emote Commands
117+
118+
### /emote \<action\> | /me \<action\>
119+
120+
**Description:** Perform a roleplay action visible to players within `emoteRadius` blocks.
121+
**Permission:** `rp.emote` or `rp.me`
122+
**Usage:** `/emote <action>` or `/me <action>`
123+
**Example:** `/me bows gracefully`
124+
125+
---
126+
127+
## Dice Commands
128+
129+
### /roll \<max\> | /dice \<max\>
130+
131+
**Description:** Roll a random number from 1 to `<max>`. The result is broadcast to nearby players.
132+
**Permission:** `rp.roll` or `rp.dice`
133+
**Usage:** `/roll <max>` or `/dice <max>`
134+
**Example:** `/roll 20`
135+
136+
---
137+
138+
## Bird Commands
139+
140+
### /bird \<player\> \<message\>
141+
142+
**Description:** Send a bird (in-character mail) to another player. Requires the Mailboxes companion plugin.
143+
**Permission:** `rp.bird`
144+
**Usage:** `/bird <player> <message>`
145+
**Example:** `/bird Steve I shall arrive at dawn.`
146+
147+
---
148+
149+
## Title Commands
150+
151+
### /title \<message\>
152+
153+
**Description:** Display a title message on screen.
154+
**Permission:** `rp.title`
155+
**Usage:** `/title <message>`
156+
**Example:** `/title The battle begins!`
157+
158+
---
159+
160+
## Help Commands
161+
162+
### /rphelp
163+
164+
**Description:** Display the list of available commands.
165+
**Permission:** `rp.help`
166+
**Usage:** `/rphelp`
167+
168+
---
169+
170+
## Admin Commands
171+
172+
### /rpconfig \<option\> \<value\>
173+
174+
**Description:** View or change plugin configuration options in-game.
175+
**Permission:** `rp.config`
176+
**Usage:** `/rpconfig <option> <value>`
177+
**Example:** `/rpconfig localChatRadius 30`

0 commit comments

Comments
 (0)