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
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ body:
id: server
attributes:
label: Server distribution and version
placeholder: "Paper 1.21.x"
placeholder: "Paper 26.1.x"
validations:
required: true
- type: input
id: ezseasons_version
attributes:
label: EzSeasons version
placeholder: "e.g. 1.0.0"
placeholder: "e.g. 2.0.0"
validations:
required: true
- type: textarea
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,17 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v5

- name: Set up Java 21
- name: Set up Java 25
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: '21'
java-version: '25'
cache: maven

- name: Build and install MockBukkit dev/26.1.1
run: |
git clone --depth=1 --branch dev/26.1.1 https://github.com/MockBukkit/MockBukkit.git /tmp/MockBukkit
cd /tmp/MockBukkit && ./gradlew publishToMavenLocal -xtest -xjavadoc

- name: Verify plugin build
run: mvn -B -ntp clean verify
44 changes: 44 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Documentation

on:
release:
types: [published]
workflow_dispatch:

# Required for GitHub Pages deployment via Actions
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment; skip in-progress runs
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build-and-deploy:
name: Build and Deploy
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Configure GitHub Pages
uses: actions/configure-pages@v5

- name: Build Jekyll site
uses: actions/jekyll-build-pages@v1
with:
source: ./docs
destination: ./_site

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
21 changes: 21 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Lint

on:
pull_request:
paths:
- "docs/**/*.md"
- ".markdownlint.yml"

jobs:
markdown:
name: Validate Markdown
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Lint documentation Markdown
uses: DavidAnson/markdownlint-cli2-action@v16
with:
globs: "docs/**/*.md"
config: ".markdownlint.yml"
34 changes: 0 additions & 34 deletions .github/workflows/publish-packages.yml
Original file line number Diff line number Diff line change
@@ -1,34 +0,0 @@
name: Publish Package

on:
release:
types:
- published

jobs:
publish-github-packages:
name: Publish to GitHub Packages
if: github.event_name == 'release'
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Java 21
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: '21'
cache: maven
server-id: github
server-username: GITHUB_ACTOR
server-password: GITHUB_TOKEN

- name: Publish Maven artifacts
run: mvn -B -ntp -DskipTests deploy -DaltDeploymentRepository=github::https://maven.pkg.github.com/${{ github.repository }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24 changes: 20 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@ jobs:
- uses: actions/setup-java@v5
with:
distribution: temurin
java-version: '21'
java-version: '25'
cache: maven
- name: Build and install MockBukkit dev/26.1.1
run: |
git clone --depth=1 --branch dev/26.1.1 https://github.com/MockBukkit/MockBukkit.git /tmp/MockBukkit
cd /tmp/MockBukkit && ./gradlew publishToMavenLocal -xtest -xjavadoc
- name: Run unit tests
# Workflow selectors assume tests follow the *UnitTest naming convention.
run: mvn -B -Dtest='*UnitTest' test
Expand All @@ -28,8 +32,12 @@ jobs:
- uses: actions/setup-java@v5
with:
distribution: temurin
java-version: '21'
java-version: '25'
cache: maven
- name: Build and install MockBukkit dev/26.1.1
run: |
git clone --depth=1 --branch dev/26.1.1 https://github.com/MockBukkit/MockBukkit.git /tmp/MockBukkit
cd /tmp/MockBukkit && ./gradlew publishToMavenLocal -xtest -xjavadoc
- name: Generate unit test coverage report
run: mvn -B -pl plugin -am -Dtest='*UnitTest' test org.jacoco:jacoco-maven-plugin:report
- name: Add coverage summary to workflow report
Expand Down Expand Up @@ -85,8 +93,12 @@ jobs:
- uses: actions/setup-java@v5
with:
distribution: temurin
java-version: '21'
java-version: '25'
cache: maven
- name: Build and install MockBukkit dev/26.1.1
run: |
git clone --depth=1 --branch dev/26.1.1 https://github.com/MockBukkit/MockBukkit.git /tmp/MockBukkit
cd /tmp/MockBukkit && ./gradlew publishToMavenLocal -xtest -xjavadoc
- name: Check translation coverage
run: mvn -B -Dtest='TranslationCoverageUnitTest' test
feature-tests:
Expand All @@ -97,8 +109,12 @@ jobs:
- uses: actions/setup-java@v5
with:
distribution: temurin
java-version: '21'
java-version: '25'
cache: maven
- name: Build and install MockBukkit dev/26.1.1
run: |
git clone --depth=1 --branch dev/26.1.1 https://github.com/MockBukkit/MockBukkit.git /tmp/MockBukkit
cd /tmp/MockBukkit && ./gradlew publishToMavenLocal -xtest -xjavadoc
- name: Run feature tests
# Workflow selectors assume feature tests are named *FeatureUnitTest.
run: mvn -B -Dtest='*FeatureUnitTest' test
7 changes: 6 additions & 1 deletion .github/workflows/validate-resources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,14 @@ jobs:
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: '21'
java-version: '25'
cache: maven

- name: Build and install MockBukkit dev/26.1.1
run: |
git clone --depth=1 --branch dev/26.1.1 https://github.com/MockBukkit/MockBukkit.git /tmp/MockBukkit
cd /tmp/MockBukkit && ./gradlew publishToMavenLocal -xtest -xjavadoc

- name: Validate YAML resources
# Workflow selectors assume tests follow the *UnitTest naming convention.
run: mvn -B -Dtest=ResourceYamlValidationUnitTest test
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,11 @@ Thumbs.db

# Logs
*.log

# Jekyll build output
docs/_site/
docs/.bundle/
docs/vendor/

# Node.js (used for tooling like markdownlint-cli)
node_modules/
34 changes: 34 additions & 0 deletions .markdownlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# markdownlint configuration
# https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md

default: true

# MD013 — Line length: documentation lines are allowed to exceed 80 chars
MD013: false

# MD022 — Blanks around headings: Kramdown attribute syntax ({: .no_toc }) must
# immediately follow a heading with no blank line — disable this rule
MD022: false

# MD025 — Single H1: pages have both front-matter title: and an # H1 heading;
# disable front-matter title detection to avoid false positives
MD025:
front_matter_title: ""

# MD033 — Inline HTML: needed for Jekyll/Liquid includes and badge images
MD033: false

# MD036 — Emphasis as heading: just-the-docs sub-sections inside API tables use
# bold labels that markdownlint mistakes for headings
MD036: false

# MD041 — First line must be H1: front-matter pages don't start with a heading
MD041: false

# MD024 — No duplicate headings: allow sibling duplicates across sections
MD024:
siblings_only: true

# MD007 — Unordered list indentation: use 2-space indent under list items
MD007:
indent: 2
3 changes: 3 additions & 0 deletions .markdownlintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
api/target/
plugin/target/
target/
6 changes: 3 additions & 3 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,13 @@ the community.

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.
<https://www.contributor-covenant.org/version/2/1/code_of_conduct.html>.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
<https://www.contributor-covenant.org/faq>. Translations are available at
<https://www.contributor-covenant.org/translations>.

[homepage]: https://www.contributor-covenant.org
3 changes: 1 addition & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Thanks for your interest in contributing to EzSeasons.

- Java toolchain version defined by the parent build (`java.version` in the parent POM).
- Maven 3.9+.
- A Paper-compatible test server (API target `1.21`) for runtime checks.
- A Paper-compatible test server (Paper 26.1+, Java 25) for runtime checks.

### Build locally

Expand Down Expand Up @@ -36,7 +36,6 @@ If this module is built inside the multi-module parent project, run Maven from t
- Preserve backwards-compatible behavior for public API interfaces in `com.skyblockexp.lifesteal.seasons.api` when possible.
- Add or update documentation (README, templates, config notes) whenever behavior or integration patterns change.


## Maintainer operations

- Code of Conduct reports are received through the maintainer-controlled alias `ezplugins@outlook.com`.
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ It runs timed season resets, sends reminder broadcasts, and provides `/season` s
- Download **EzSeasons** from Modrinth: [https://modrinth.com/plugin/ezseasons](https://modrinth.com/plugin/ezseasons)
- Optional companion plugin: [EzLifesteal](https://modrinth.com/plugin/ezlifesteal)
- Supported server software: Paper / Bukkit-compatible server
- API target: `1.21`
- Requires: Java 25, Minecraft 26.1+
- Plugin version: 2.0.0

## Quick setup (server owners)

Expand Down
9 changes: 5 additions & 4 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,20 @@ EzSeasons follows a **latest-stable support policy**:

| Version | Supported |
| --- | --- |
| 1.x (latest patch release) | ✅ Yes |
| 1.x (older patch releases) | ⚠️ Best effort |
| 2.x (latest patch release) | ✅ Yes |
| 2.x (older patch releases) | ⚠️ Best effort |
| 1.x | ❌ No |
| < 1.0.0 | ❌ No |

Please upgrade to the newest `1.x` release before reporting a vulnerability when possible.
Please upgrade to the newest `2.x` release before reporting a vulnerability when possible.

## Reporting a Vulnerability

Please **do not** report security vulnerabilities in public GitHub issues or discussions.

Report vulnerabilities privately by email:

- **ezplugins@outlook.com**
- **[ezplugins@outlook.com](mailto:ezplugins@outlook.com)**

Include the following information to help us triage quickly:

Expand Down
2 changes: 1 addition & 1 deletion api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.skyblockexp.lifesteal</groupId>
<artifactId>ezseasons-parent</artifactId>
<version>1.0.0</version>
<version>2.0.0</version>
</parent>

<artifactId>ezseasons-api</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
public interface SeasonsApi {

/**
* Registers a plugin integration with EzSeasons. The integration can listen for season events or interact with the API.
* Registers a plugin integration with EzSeasons. The integration can listen for season events
* or interact with the API.
*
* Ordering guarantee: internal registration state is updated <strong>before</strong>
* {@link SeasonsIntegration#onRegister(SeasonsApi)} is invoked and before
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
package com.skyblockexp.lifesteal.seasons.api.events;

import java.util.Objects;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;

import java.util.Objects;

/**
* Fired whenever EzSeasons performs a season reset.
* <p>
* Ordering guarantee: this event is dispatched only after internal reset timestamps have been updated and persisted.
* <p>
* Threading: fired on the thread that initiated the reset. In typical Bukkit usage this should be the main server thread.
* Threading: fired on the thread that initiated the reset. In typical Bukkit usage this should be the main
* server thread.
*/
public final class SeasonResetEvent extends Event {

private static final HandlerList HANDLERS = new HandlerList();

private final long previousResetMillis;

private final long resetMillis;

private final long nextResetMillis;

private final String reason;

/**
Expand All @@ -27,7 +30,8 @@ public final class SeasonResetEvent extends Event {
* @param previousResetMillis reset timestamp immediately before this reset in unix epoch milliseconds
* @param resetMillis reset timestamp for this reset in unix epoch milliseconds
* @param nextResetMillis next scheduled reset timestamp in unix epoch milliseconds, or {@code 0} if unscheduled
* @param reason caller-provided reason; may be {@code null}, in which case {@code "unspecified"} is stored
* @param reason caller-provided reason; may be {@code null}, in which case
* {@code "unspecified"} is stored
*/
public SeasonResetEvent(long previousResetMillis,
long resetMillis,
Expand Down
Loading
Loading