Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# 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)
- API version: 1.13+

## Project Structure

- `src/main/java/dansplugins/mailboxes/` – Plugin source code
- `src/main/java/dansplugins/mailboxes/commands/` – Command handlers
- `src/main/resources/` – `plugin.yml`

## Contribution Workflow

- Branch from `main` for all changes.
- Open a pull request against `main`.
- Reference the related GitHub issue in every pull request description.
26 changes: 26 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Build

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

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
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
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
!target/original-*.jar
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# 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.3.0]

### Added
- Player-to-player messaging with persistent storage
- Item attachment support (`-attach` flag)
- Message listing with type filter and pagination
- Archive and delete operations
- In-game config management via `/m config`
14 changes: 14 additions & 0 deletions COMMANDS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Mailboxes Commands

All commands use `/m` or `/mailboxes` as the base.

| Command | Description | Permission |
|---------|-------------|------------|
| `/m help` | View a list of commands. | `mailboxes.help` |
| `/m list [type] [page]` | List your messages with optional type filter and pagination. | `mailboxes.list` |
| `/m open` | Open a message. | `mailboxes.open` |
| `/m send <player> "<message>"` | Send a text message to a player. | `mailboxes.send` |
| `/m send <player> "<message>" -attach` | Send a message with the item in your hand attached. | `mailboxes.send.attach` |
| `/m delete` | Delete a message. | `mailboxes.delete` |
| `/m archive` | Archive a message. | `mailboxes.archive` |
| `/m config` | View or set config options (operators). | `mailboxes.config` |
17 changes: 17 additions & 0 deletions CONFIG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Mailboxes Configuration

Configuration can be viewed and changed in-game with `/m config show` and `/m config set <option> <value>`. A `config.yml` is generated in `plugins/Mailboxes/` on first run.

| Option | Type | Default | Description |
|--------|------|---------|-------------|
| `version` | String | *(plugin version)* | Plugin version. Do not edit manually. |
| `debugMode` | Boolean | `false` | Enables verbose debug logging to the console. |
| `maxMessageIDNumber` | Integer | `10000` | Maximum ID number assigned to messages. |
| `maxMailboxIDNumber` | Integer | `10000` | Maximum ID number assigned to mailboxes. |
| `maxAttachmentStackSize` | Integer | `64` | Maximum stack size allowed for item attachments. |
| `preventSendingMessagesToSelf` | Boolean | `true` | Whether players can send messages to themselves. |
| `assignmentAlertEnabled` | Boolean | `false` | Whether players are notified when a message is sent to them. |
| `unreadMessagesAlertEnabled` | Boolean | `true` | Whether players are reminded of unread messages on join. |
| `welcomeMessageEnabled` | Boolean | `true` | Whether a welcome message is shown to players on join. |
| `quotesEnabled` | Boolean | `false` | Whether random quotes are displayed to players. |
| `attachmentsEnabled` | Boolean | `true` | Whether item attachments are enabled for messages. |
58 changes: 58 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Contributing

## Thank You

Thank you for your interest in contributing to Mailboxes! This guide will help you get started.

## Links

- [Website](https://dansplugins.com)
- [Discord](https://discord.gg/xXtuAQ2)

## Requirements

- A GitHub account
- Git installed on your local machine
- A Java IDE or text editor
- A basic understanding of Java

## Getting Started

1. [Sign up for GitHub](https://github.com/signup) if you don't have an account.
2. Fork the repository by clicking **Fork** at the top right of the repo page.
3. Clone your fork: `git clone https://github.com/<your-username>/Mailboxes.git`
4. Open the project in your IDE.
5. Build the plugin: `mvn clean package`
If you encounter errors, please open an issue.

## Identifying What to Work On

### Issues

Work items are tracked as [GitHub issues](https://github.com/Dans-Plugins/Mailboxes/issues).

### Milestones

Issues are grouped into [milestones](https://github.com/Dans-Plugins/Mailboxes/milestones) representing upcoming releases.

## Making Changes

1. Make sure an issue exists for the work. If not, create one.
2. Switch to `main`: `git checkout main`
3. Create a branch: `git checkout -b <branch-name>`
4. Make your changes.
5. Test your changes.
6. Commit: `git commit -m "Description of changes"`
7. Push: `git push origin <branch-name>`
8. Open a pull request against `main`, link the related issue with `#<number>`.
9. Address review feedback.

## Testing

mvn clean package

Place the built JAR from `target/` in your local Spigot server's `plugins/` folder.

## Questions

Ask in the [Discord server](https://discord.gg/xXtuAQ2).
36 changes: 36 additions & 0 deletions USER_GUIDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Mailboxes User Guide

## What is Mailboxes?

Mailboxes is a Spigot plugin that gives players an in-game messaging system. Players can send text messages and attach items to other players, even when they are offline. Messages are stored persistently and can be listed, opened, archived, or deleted.

## Installation

1. Download the latest `Mailboxes-<version>.jar` from the [Releases](https://github.com/Dans-Plugins/Mailboxes/releases) page.
2. Place the JAR in your server's `plugins/` folder.
3. Restart the server.

## Getting Started

1. Send a message: `/m send <player> "Hello!"`
2. Attach an item to a message: hold the item and add `-attach`: `/m send <player> "Here is a gift" -attach`
3. List your messages: `/m list`
4. Open a message: `/m open`
5. Archive or delete messages you no longer need.

## Permissions

| Permission | Default | Description |
|------------|---------|-------------|
| `mailboxes.help` | `true` | View the help menu. |
| `mailboxes.list` | `true` | List messages. |
| `mailboxes.open` | `true` | Open a message. |
| `mailboxes.send` | `true` | Send a text message. |
| `mailboxes.send.attach` | `true` | Send a message with an item attached. |
| `mailboxes.delete` | `true` | Delete a message. |
| `mailboxes.archive` | `true` | Archive a message. |
| `mailboxes.config` | `op` | View or change config options. |

## Support

Ask questions in the [Discord server](https://discord.gg/xXtuAQ2) or open a [GitHub issue](https://github.com/Dans-Plugins/Mailboxes/issues).
Loading