From 2a82a2a796aa3b689044f9fb81074dd07b62f06f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 22 Mar 2026 17:43:57 +0000 Subject: [PATCH 1/4] Initial plan From e7613b11d1fc6ec71c8be2a954aa547a9c853750 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 22 Mar 2026 17:48:52 +0000 Subject: [PATCH 2/4] Align repository with DPC conventions Ref: https://github.com/Dans-Plugins/dpc-conventions Co-authored-by: dmccoystephenson <21204351+dmccoystephenson@users.noreply.github.com> Agent-Logs-Url: https://github.com/Dans-Plugins/Nether-Access-Controller/sessions/d06b5d6f-3f34-4ebd-8c29-4d833bcdb02c --- .github/copilot-instructions.md | 39 +++++++++++++++++ .github/workflows/build.yml | 26 +++++++++++ .github/workflows/release.yml | 29 ++++++++++++ CHANGELOG.md | 26 +++++++++++ COMMANDS.md | 55 +++++++++++++++++++++++ CONFIG.md | 63 ++++++++++++++++++++++++++ CONTRIBUTING.md | 66 ++++++++++++++++++++++++++++ README.md | 78 +++++++++++++++++++++++++-------- USER_GUIDE.md | 65 +++++++++++++++++++++++++++ 9 files changed, 429 insertions(+), 18 deletions(-) create mode 100644 .github/copilot-instructions.md create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/release.yml create mode 100644 CHANGELOG.md create mode 100644 COMMANDS.md create mode 100644 CONFIG.md create mode 100644 CONTRIBUTING.md create mode 100644 USER_GUIDE.md diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 100644 index 0000000..fb60c23 --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1,39 @@ +# Copilot Instructions + +This repository follows the DPC (Dans Plugins Community) conventions defined at +https://github.com/Dans-Plugins/dpc-conventions. Read those conventions before +making any changes. + +## Technology Stack + +- Language: Java +- Build tool: Maven +- Target platform: Spigot / Paper (Minecraft plugin) +- Minimum API version: 1.13 + +## Project Structure + +- `src/main/java/` – Plugin source code +- `src/main/resources/` – `plugin.yml` and resource files +- `src/test/java/` – Unit tests + +### Key Packages + +- `dansplugins.netheraccesscontroller` – Main plugin class +- `dansplugins.netheraccesscontroller.commands` – Command implementations +- `dansplugins.netheraccesscontroller.data` – Data models +- `dansplugins.netheraccesscontroller.listeners` – Event listeners +- `dansplugins.netheraccesscontroller.services` – Business logic services +- `dansplugins.netheraccesscontroller.utils` – Utility classes + +## Coding Conventions + +- Messages are currently hardcoded in Java; denial messages are configurable via `config.yml`. +- Follow the existing package structure when adding new classes. +- Annotate every command executor and event listener with `@Override` where applicable. + +## Contribution Workflow + +- Branch from `develop` for all changes. +- Open a pull request against `develop`, not `main`. +- Reference the related GitHub issue in every pull request description. diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..de023ee --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,26 @@ +name: Build + +on: + push: + branches: [ main, develop ] + pull_request: + branches: [ main, develop ] + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + + - name: Build with Maven + run: mvn clean package diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..9e28e58 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,29 @@ +name: Release + +on: + release: + types: [ created ] + +permissions: + contents: write + +jobs: + build-and-attach: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + + - name: Build with Maven + run: mvn clean package + + - name: Upload JAR to release + uses: softprops/action-gh-release@v2 + with: + files: target/*.jar diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..bd92564 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,26 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). + +## [Unreleased] + +## [1.1.0] + +### Added + +- Configuration commands (`/nac config show`, `/nac config set`) +- Customisable denial messages (`denyUsageMessage`, `denyCreationMessage`) +- Debug mode for troubleshooting event handling + +## [1.0.0] + +### Added + +- Initial release +- Nether access whitelist system +- Portal creation prevention +- Portal usage prevention +- Commands: `/nac help`, `/nac allow`, `/nac deny`, `/nac list` +- bStats integration diff --git a/COMMANDS.md b/COMMANDS.md new file mode 100644 index 0000000..3016525 --- /dev/null +++ b/COMMANDS.md @@ -0,0 +1,55 @@ +# Commands Reference + +All commands use the `/nac` base command. + +## General Commands + +### /nac + +**Description:** Displays the plugin version and developer information. +**Permission:** None +**Usage:** `/nac` + +### /nac help + +**Description:** Lists all available commands. +**Permission:** `nac.help` +**Usage:** `/nac help` + +## Whitelist Commands + +### /nac allow \ + +**Description:** Adds a player to the nether access whitelist, allowing them to create and use nether portals. +**Permission:** `nac.allow` +**Usage:** `/nac allow ` +**Example:** `/nac allow Steve` + +### /nac deny \ + +**Description:** Removes a player from the nether access whitelist, preventing them from creating and using nether portals. +**Permission:** `nac.deny` +**Usage:** `/nac deny ` +**Example:** `/nac deny Steve` + +### /nac list + +**Description:** Displays all players currently on the nether access whitelist. +**Permission:** `nac.list` +**Usage:** `/nac list` + +## Configuration Commands + +### /nac config show + +**Description:** Displays all current configuration settings and their values. +**Permission:** `nac.config` +**Usage:** `/nac config show` + +### /nac config set \ \ + +**Description:** Sets a configuration option to the specified value. Use single quotes around values that contain spaces. +**Permission:** `nac.config` +**Usage:** `/nac config set