Skip to content

Commit 09c1a41

Browse files
Merge pull request #62 from Dans-Plugins/copilot/align-repo-with-dpc-conventions
Align repository with DPC conventions
2 parents e22b906 + 2446cea commit 09c1a41

10 files changed

Lines changed: 349 additions & 5 deletions

File tree

.github/copilot-instructions.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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 plugin, API version 1.13+)
12+
- Test framework: Not yet configured (add JUnit via Maven Surefire in pom.xml when introducing tests)
13+
14+
## Project Structure
15+
16+
- `src/main/java/dansplugins/spawnsystem/` – Plugin source code
17+
- `commands/` – Command executor classes
18+
- `listeners/` – Bukkit event listener classes
19+
- `services/` – Business-logic services (command dispatch, storage)
20+
- `utils/` – Utility helpers (block checking, UUID lookup, event registration)
21+
- `data/` – Persistent data model
22+
- `bstats/` – bStats metrics integration
23+
- `src/main/resources/``plugin.yml` and other resources
24+
- `src/test/java/` – Unit tests (if/when a test suite is added)
25+
26+
## Coding Conventions
27+
28+
- Follow the existing package structure (`dansplugins.spawnsystem.*`) when adding new classes.
29+
- All user-facing messages are currently hard-coded strings; prefer extracting them to a lang file in `src/main/resources/lang/` for new contributions.
30+
- Annotate every command executor and event listener with `@Override` where applicable.
31+
- The plugin uses the Maven Shade plugin to produce a shaded JAR in `target/`.
32+
33+
## Contribution Workflow
34+
35+
- Branch from `develop` for all changes.
36+
- Open a pull request against `develop`, not `main`.
37+
- 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

.github/workflows/release.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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
25+
26+
- name: Upload JAR to release
27+
uses: softprops/action-gh-release@v2
28+
with:
29+
files: |
30+
target/*.jar
31+
!target/original-*.jar

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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.2] – (date unknown)
10+
11+
### Changed
12+
- Internal refactoring of spawn storage and event handling.
13+
14+
## [1.0] – (date unknown)
15+
16+
### Added
17+
- Initial release.
18+
- `[Spawn]` sign mechanic: right-clicking a sign sets the player's respawn point.
19+
- `/resetspawn` command to clear a player's custom spawn.
20+
- bStats metrics integration (plugin ID 12161).

COMMANDS.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Commands Reference
2+
3+
## Spawn Commands
4+
5+
### /resetspawn [player]
6+
7+
**Description:** Resets a player's custom spawn point, returning them to the world's default spawn on next death.
8+
**Permission (no argument):** `spawnsystem.reset.self` or `spawnsystem.admin`
9+
**Permission (with argument):** `spawnsystem.reset.others` or `spawnsystem.admin`
10+
**Usage:** (in-game players only) `/resetspawn` or `/resetspawn <player>`
11+
**Example:** `/resetspawn` — resets your own spawn
12+
**Example:** `/resetspawn Steve` — resets Steve's spawn

CONFIG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Configuration Guide
2+
3+
Dans-Spawn-System does not currently use a `config.yml` file. All configuration is performed through in-game signs and permissions.
4+
5+
## Permissions Configuration
6+
7+
Permissions can be managed through any standard Bukkit permissions plugin (e.g. LuckPerms).
8+
9+
| Permission Node | Default | Description |
10+
|-----------------|---------|-------------|
11+
| `spawnsystem.placeSpawnSign` | op | Allows placing `[Spawn]` signs |
12+
| `spawnsystem.breakSpawnSign` | op | Allows breaking `[Spawn]` signs |
13+
| `spawnsystem.reset.self` | op | Allows a player to reset their own spawn |
14+
| `spawnsystem.reset.others` | op | Allows resetting another player's spawn |
15+
| `spawnsystem.admin` | op | Grants all plugin permissions |
16+
17+
By default, these permissions are granted to server operators (`op`) and can be overridden by your permissions plugin.

CONTRIBUTING.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Contributing
2+
3+
## Thank You
4+
5+
Thank you for your interest in contributing to Dans-Spawn-System! This guide will help you get started.
6+
7+
## Links
8+
9+
- [Website](https://dansplugins.com)
10+
- [Discord](https://discord.gg/xXtuAQ2)
11+
12+
## Requirements
13+
14+
- A GitHub account
15+
- Git installed on your local machine
16+
- A Java IDE or text editor
17+
- A basic understanding of Java
18+
19+
## Getting Started
20+
21+
1. [Sign up for GitHub](https://github.com/signup) if you don't have an account.
22+
2. Fork the repository by clicking **Fork** at the top right of the repo page.
23+
3. Clone your fork: `git clone https://github.com/<your-username>/Dans-Spawn-System.git`
24+
4. Open the project in your IDE.
25+
5. Build the plugin: `mvn clean package`
26+
If you encounter errors, please open an issue.
27+
28+
## Identifying What to Work On
29+
30+
### Issues
31+
32+
Work items are tracked as [GitHub issues](https://github.com/Dans-Plugins/Dans-Spawn-System/issues).
33+
34+
### Milestones
35+
36+
Issues are grouped into [milestones](https://github.com/Dans-Plugins/Dans-Spawn-System/milestones) representing upcoming releases.
37+
38+
## Making Changes
39+
40+
1. Make sure an issue exists for the work. If not, create one.
41+
2. Switch to `develop`: `git checkout develop`
42+
3. Create a branch: `git checkout -b <branch-name>`
43+
4. Make your changes.
44+
5. Test your changes.
45+
6. Commit: `git commit -m "Description of changes"`
46+
7. Push: `git push origin <branch-name>`
47+
8. Open a pull request against `develop`, link the related issue with `#<number>`.
48+
9. Address review feedback.
49+
50+
## Testing
51+
52+
There are currently no automated unit tests configured for this project.
53+
54+
Please verify your changes manually by:
55+
56+
- Building the plugin: `mvn clean package`
57+
- Copying the built JAR from `target/` into your test server's `plugins/` folder
58+
- Starting the server and ensuring the plugin loads without errors in the console
59+
- Exercising relevant spawn-related functionality to confirm your changes behave as expected
60+
61+
## Questions
62+
63+
Ask in the [Discord server](https://discord.gg/xXtuAQ2).

README.md

Lines changed: 82 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,94 @@
11
# Dans-Spawn-System
2-
An open source plugin that allows players to use signs to select a custom spawn in their world.
2+
3+
## Description
4+
5+
Dans-Spawn-System is a Minecraft plugin that allows players to use signs to select a custom spawn point in their world. Server operators place `[Spawn]` signs with coordinates, and players right-click those signs to set their personal respawn location.
6+
7+
## Installation
8+
9+
### First Time Installation
10+
11+
1. Download the plugin from [SpigotMC](https://www.spigotmc.org/resources/dans-spawn-system.95997/).
12+
2. Place the jar in the `plugins` folder of your server.
13+
3. Restart your server.
14+
15+
## Usage
16+
17+
### Documentation
18+
19+
- [User Guide](USER_GUIDE.md) – Getting started and common scenarios
20+
- [Commands Reference](COMMANDS.md) – Complete list of all commands
21+
- [Configuration Guide](CONFIG.md) – Detailed configuration options
22+
23+
### Wiki & Additional Resources
24+
25+
- [Wiki Guide](https://github.com/Dans-Plugins/Dans-Spawn-System/wiki)
26+
27+
## Support
28+
29+
You can find the support Discord server [here](https://discord.gg/xXtuAQ2).
30+
31+
### Experiencing a bug?
32+
33+
Please fill out a bug report [here](https://github.com/Dans-Plugins/Dans-Spawn-System/issues/new).
34+
35+
- [Known Bugs](https://github.com/Dans-Plugins/Dans-Spawn-System/issues?q=is%3Aissue+is%3Aopen+label%3Abug)
36+
37+
## Contributing
38+
39+
- [CONTRIBUTING.md](CONTRIBUTING.md)
40+
- [Notes for Developers](https://github.com/Dans-Plugins/Dans-Spawn-System/wiki)
41+
42+
## Testing
43+
44+
### Automated Tests
45+
46+
This project does not currently include automated unit tests.
47+
48+
To verify that the project builds successfully, run:
49+
50+
Linux:
51+
52+
mvn clean package
53+
54+
Windows:
55+
56+
mvn.cmd clean package
57+
58+
If you see `BUILD SUCCESS`, the project compiled successfully. For validating functional changes, follow the steps in the **Development** section below to run the plugin on a test server.
59+
60+
## Development
61+
62+
### Manual Testing on a Server
63+
64+
1. Build the plugin: `mvn clean package`
65+
2. Copy the resulting jar from `target/` into your server's `plugins/` folder (exclude `original-*.jar`).
66+
3. Start your test server and verify the plugin loads without errors.
67+
68+
## Authors
69+
70+
### Developers
71+
72+
| Name | Main Contributions |
73+
|------|--------------------|
74+
| DanTheTechMan | Original author and lead developer |
375

476
## License
577

678
This project is licensed under the [GNU General Public License v3.0](LICENSE) (GPL-3.0).
779

880
You are free to use, modify, and distribute this software, provided that:
81+
982
- Source code is made available under the same license when distributed.
1083
- Changes are documented and attributed.
1184
- No additional restrictions are applied.
1285

1386
See the [LICENSE](LICENSE) file for the full text of the GPL-3.0 license.
87+
88+
## Project Status
89+
90+
This project is in active development.
91+
92+
### bStats
93+
94+
You can view the bStats page for the plugin [here](https://bstats.org/plugin/bukkit/DansSpawnSystem/12161).

USER_GUIDE.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# User Guide
2+
3+
## Prerequisites
4+
5+
- A Spigot or Paper Minecraft server (1.13 or later)
6+
- The Dans-Spawn-System plugin installed in your `plugins/` folder
7+
8+
## First Steps
9+
10+
After installing the plugin and restarting your server, players can have their respawn location customised by interacting with spawn-selection signs placed by administrators.
11+
12+
## Common Scenarios
13+
14+
### Setting Up a Spawn Selection Sign (Admin)
15+
16+
1. Place a sign in the world.
17+
2. On the **first line** of the sign, type `[Spawn]`.
18+
3. On the **second line**, enter the X coordinate of the target spawn location.
19+
4. On the **third line**, enter the Y coordinate.
20+
5. On the **fourth line**, enter the Z coordinate.
21+
6. Confirm placement — you will see a green confirmation message if you have the required permission.
22+
23+
**Example sign contents:**
24+
25+
```
26+
[Spawn]
27+
100
28+
64
29+
-200
30+
```
31+
32+
Players who right-click this sign will have their respawn point set to coordinates (100, 64, -200) in their current world.
33+
34+
### Selecting a Spawn (Player)
35+
36+
Simply **right-click** any `[Spawn]` sign to set your personal respawn location to the coordinates written on that sign.
37+
38+
### Resetting a Player's Spawn (Admin)
39+
40+
Use the `/resetspawn` command to clear a player's custom spawn:
41+
42+
- Reset your own spawn: `/resetspawn`
43+
- Reset another player's spawn: `/resetspawn <player>`
44+
45+
See [COMMANDS.md](COMMANDS.md) for full command details.
46+
47+
## Permissions
48+
49+
| Permission Node | Default | Description |
50+
|-----------------|---------|-------------|
51+
| `spawnsystem.placeSpawnSign` | op | Allows placing `[Spawn]` signs |
52+
| `spawnsystem.breakSpawnSign` | op | Allows breaking `[Spawn]` signs |
53+
| `spawnsystem.reset.self` | op | Allows resetting your own spawn with `/resetspawn` |
54+
| `spawnsystem.reset.others` | op | Allows resetting another player's spawn with `/resetspawn <player>` |
55+
| `spawnsystem.admin` | op | Grants all plugin permissions |

src/main/resources/plugin.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@ commands:
88
resetspawn:
99

1010
permissions:
11-
dansplugins.spawnsystem.reset.self:
11+
spawnsystem.reset.self:
1212
default: op
13-
dansplugins.spawnsystem.reset.others:
13+
spawnsystem.reset.others:
1414
default: op
15-
dansplugins.placeSpawnSign:
15+
spawnsystem.placeSpawnSign:
1616
default: op
17-
dansplugins.breakSpawnSign:
17+
spawnsystem.breakSpawnSign:
18+
default: op
19+
spawnsystem.admin:
1820
default: op

0 commit comments

Comments
 (0)