Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
3d6b30e
Refactor: Rename project to "surf-maintenance" and replace template c…
TheBjoRedCraft Nov 6, 2025
e719c88
Refactor: Update .gitignore to streamline ignored files and directories
TheBjoRedCraft Nov 6, 2025
22e1aaa
Refactor: Update maintenance packet handling to use serverbound packe…
TheBjoRedCraft Nov 7, 2025
b320cf5
Refactor: Add VCS configuration for commit message inspection and dir…
TheBjoRedCraft Nov 7, 2025
e28252c
feat: Update maintenance MOTD to include server information and Disco…
TheBjoRedCraft Nov 7, 2025
82d8949
refactor: Replace MaintenanceBridge with direct plugin configuration …
TheBjoRedCraft Nov 7, 2025
1b79a84
refactor: Simplify maintenance mode checks in ProxyConnectionsListener
TheBjoRedCraft Nov 7, 2025
a3ff17e
feat: Implement maintenance mode kick command and update player handling
TheBjoRedCraft Nov 7, 2025
f9173dd
feat: Enhance maintenance mode functionality with server and group ma…
TheBjoRedCraft Nov 7, 2025
e309e76
feat: Add reload command for maintenance configuration and implement …
TheBjoRedCraft Nov 8, 2025
d08af61
feat: Add Gradle and Kotlin configuration files for project setup
TheBjoRedCraft Nov 8, 2025
3dfc276
feat: Introduce MaintenanceApplication class and update imports in bo…
TheBjoRedCraft Nov 9, 2025
b400e25
feat: Update maintenance MOTD to include bold formatting for maintena…
TheBjoRedCraft Nov 13, 2025
2a1a3a2
feat: Update Gradle configuration with specific gradleHome and gradle…
TheBjoRedCraft Nov 13, 2025
6fc359a
feat: Remove unnecessary modules from Gradle settings
TheBjoRedCraft Nov 13, 2025
ce4098d
Update README.md
TheBjoRedCraft Nov 13, 2025
214d399
feat: Refactor maintenance check to use currentServer directly
TheBjoRedCraft Nov 13, 2025
c1175e5
Merge remote-tracking branch 'origin/version/1.21.10' into version/1.…
TheBjoRedCraft Nov 13, 2025
285fbd4
fix: Remove duplicate inspection tool entry in vcs.xml
TheBjoRedCraft Nov 18, 2025
f3039b9
feat: remove cloud, only velocity
TheBjoRedCraft Dec 20, 2025
9da143d
feat: Add maintenance toggle checks to event listeners and update MOT…
TheBjoRedCraft Dec 20, 2025
0a1d908
fix: Simplify maintenance activation success message text
TheBjoRedCraft Dec 20, 2025
94f6706
refactor: Remove unused imports and redundant constructor parameters …
TheBjoRedCraft Dec 20, 2025
5b2c656
feat: Integrate Redis for maintenance status synchronization across i…
TheBjoRedCraft Dec 23, 2025
6578439
feat: Add GitHub Actions workflow for publishing to Maven & creating …
TheBjoRedCraft Dec 26, 2025
cc4e561
refactor: Update Gradle configuration and dependencies for maintenanc…
TheBjoRedCraft Jan 3, 2026
5ab238f
refactor: Update Kotlin plugin settings and simplify Redis API initia…
TheBjoRedCraft Jan 4, 2026
f51d81a
chore: Bump version to 1.21.10-1.0.1-SNAPSHOT
TheBjoRedCraft Jan 4, 2026
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
12 changes: 0 additions & 12 deletions .gitattributes

This file was deleted.

102 changes: 102 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: Publish to Maven & Create GitHub Release

on:
push:
branches:
- 'version/*'
workflow_dispatch:

env:
SLNE_SNAPSHOTS_REPO_USERNAME: ${{ secrets.SLNE_SNAPSHOTS_REPO_USERNAME }}
SLNE_SNAPSHOTS_REPO_PASSWORD: ${{ secrets.SLNE_SNAPSHOTS_REPO_PASSWORD }}
SLNE_RELEASES_REPO_USERNAME: ${{ secrets.SLNE_RELEASES_REPO_USERNAME }}
SLNE_RELEASES_REPO_PASSWORD: ${{ secrets.SLNE_RELEASES_REPO_PASSWORD }}
MODULE_REGEX: "surf-maintenance-velocity.*-all\\.jar$"
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}

jobs:
build:
runs-on: ubuntu-latest
environment: production
steps:
- name: Collect Workflow Telemetry
uses: catchpoint/workflow-telemetry-action@v2

- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Cache Gradle packages
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: gradle-${{ runner.os }}-

- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: 'graalvm'
java-version: '24'

- name: Build all modules with Gradle
run: ./gradlew build shadowJar --parallel --no-scan

- name: Publish all modules to Maven
run: ./gradlew publish --parallel --no-scan

- name: Extract Project Version and Snapshot Flag from Gradle
id: get_version
run: |
VERSION=$(./gradlew properties --no-daemon \
| grep '^version:' \
| awk '{print $2}')
SNAPSHOT_FLAG=$(./gradlew properties --no-daemon \
| grep '^snapshot:' \
| awk '{print $2}')
if [ "$SNAPSHOT_FLAG" = "true" ]; then
VERSION="${VERSION}-SNAPSHOT"
Comment on lines +57 to +61
Copy link

Copilot AI Jan 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow references a 'snapshot' property on line 57-58, but this property is not defined in gradle.properties. The version format uses '-SNAPSHOT' suffix directly in the version string. This will cause the snapshot detection logic to fail. Either add a 'snapshot' property to gradle.properties or modify the workflow to detect the snapshot flag from the version string itself.

Suggested change
SNAPSHOT_FLAG=$(./gradlew properties --no-daemon \
| grep '^snapshot:' \
| awk '{print $2}')
if [ "$SNAPSHOT_FLAG" = "true" ]; then
VERSION="${VERSION}-SNAPSHOT"
SNAPSHOT_FLAG=false
if echo "$VERSION" | grep -q -- '-SNAPSHOT$'; then
SNAPSHOT_FLAG=true

Copilot uses AI. Check for mistakes.
fi
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "SNAPSHOT_FLAG=$SNAPSHOT_FLAG" >> $GITHUB_ENV
- name: Determine release flags
run: |
CURRENT_BRANCH=${GITHUB_REF#refs/heads/}
# prerelease only for snapshots
if [ "${SNAPSHOT_FLAG}" = "true" ]; then
echo "PRERELEASE=true" >> $GITHUB_ENV
else
echo "PRERELEASE=false" >> $GITHUB_ENV
fi
# make_latest false for snapshots or non-default branches
if [ "${SNAPSHOT_FLAG}" = "true" ] || [ "${CURRENT_BRANCH}" != "${DEFAULT_BRANCH}" ]; then
echo "MAKE_LATEST=false" >> $GITHUB_ENV
else
echo "MAKE_LATEST=true" >> $GITHUB_ENV
fi
- name: Find and filter JAR files
id: find_jars
run: |
echo "JAR_FILES<<EOF" >> $GITHUB_ENV
find . -path "**/build/libs/*.jar" \
| grep -E "${{ env.MODULE_REGEX }}" \
>> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ env.VERSION }}
name: Release ${{ env.VERSION }}
draft: false
prerelease: ${{ env.PRERELEASE }}
make_latest: ${{ env.MAKE_LATEST }}
files: ${{ env.JAR_FILES }}
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
173 changes: 46 additions & 127 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,131 +1,50 @@
### Intellij template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# AWS User-specific
.idea/**/aws.xml

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
.idea/artifacts
.idea/compiler.xml
.idea/jarRepositories.xml
.idea/modules.xml
.idea/*.iml
.idea/modules
*.iml
*.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/

### IntelliJ IDEA ###
.idea/modules.xml
.idea/jarRepositories.xml
.idea/compiler.xml
.idea/libraries/
.idea/workspace.xml
.idea/misc.xml
.idea/discord.xml
.idea/material_theme_project_new.xml
*.iws

# IntelliJ
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# SonarLint plugin
.idea/sonarlint/

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

### Gradle template
.gradle
**/build/
!src/**/build/

# Ignore Gradle GUI config
gradle-app.setting

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar

# Avoid ignore Gradle wrappper properties
!gradle-wrapper.properties

# Cache of project
.gradletasknamecache

# Eclipse Gradle plugin generated files
# Eclipse Core
.project
# JDT-specific (Eclipse Java Development Tools)
### Eclipse ###
.apt_generated
.classpath

### Kotlin template
# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*


# Ignore Gradle build output directory
build
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

### VS Code ###
.vscode/

### Mac OS ###
.DS_Store

### Other ###
run/
.kotlin/
19 changes: 19 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# surf-cloud-plugin-template
Template for surf-cloud applications
# surf-maintenance
Maintenance plugin for surf-cloud applications
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ buildscript {
maven("https://repo.slne.dev/repository/maven-public/") { name = "maven-public" }
}
dependencies {
classpath("dev.slne.surf:surf-api-gradle-plugin:1.21.7+")
classpath("dev.slne.surf:surf-api-gradle-plugin:1.21.11+")
}
}

allprojects {
group = "dev.slne.surf.template"
group = "dev.slne.surf.maintenance"
version = findProperty("version") as String
}
4 changes: 1 addition & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
org.gradle.configuration-cache=true
org.gradle.parallel=true
org.gradle.caching=true
kotlin.code.style=official
kotlin.stdlib.default.dependency=false
version=1.21.7-1.0.0
version=1.21.10-1.0.1-SNAPSHOT
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Empty file modified gradlew
100644 → 100755
Empty file.
14 changes: 2 additions & 12 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
rootProject.name = "surf-cloud-plugin-template"
rootProject.name = "surf-maintenance"

include("surf-cloud-plugin-template-api:surf-cloud-plugin-template-common-api")
include("surf-cloud-plugin-template-api:surf-cloud-plugin-template-client-api:surf-cloud-plugin-template-client-common-api")
include("surf-cloud-plugin-template-api:surf-cloud-plugin-template-client-api:surf-cloud-plugin-template-client-paper-api")
include("surf-cloud-plugin-template-api:surf-cloud-plugin-template-client-api:surf-cloud-plugin-template-client-velocity-api")
include("surf-cloud-plugin-template-api:surf-cloud-plugin-template-server-api")

include("surf-cloud-plugin-template-core:surf-cloud-plugin-template-core-common")
include("surf-cloud-plugin-template-core:surf-cloud-plugin-template-core-client")
include("surf-cloud-plugin-template-paper")
include("surf-cloud-plugin-template-velocity")
include("surf-cloud-plugin-template-server")
include("surf-maintenance-velocity")
Loading
Loading