Skip to content
Open
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
82 changes: 0 additions & 82 deletions .github/workflows/release-dev.yml

This file was deleted.

60 changes: 60 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Create Release and Publish to Modrinth

on:
push:
branches:
- main
workflow_dispatch:

jobs:
build:
name: Build Modules and Create Release
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v7
with:
submodules: recursive

- name: Set up JDK
uses: actions/setup-java@v6
with:
distribution: 'temurin'
java-version: '25'

- name: Set up Gradle
uses: gradle/actions/setup-gradle@v6

- name: Make gradlew executable
run: chmod +x ./gradlew

- name: Build ShadowJars
run: ./gradlew build shadowJar

- name: Get Gradle Version
run: echo "GRADLE_VERSION=$(./gradlew properties -q | grep "version:" | awk '{print $2}')" >> $GITHUB_ENV

- name: Publish to Modrinth
run: ./gradlew modrinth modrinthSyncBody
env:
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}

- name: Create Release
run: |
jars=()
for jar in $(find . -type f -name "*.jar" -path "*/build/libs/*.jar" -not -path "./build/libs/*"); do
if [[ $(basename "$jar") =~ -[0-9]+\.[0-9]+ ]]; then
echo "Skipping $jar due to version number"
else
echo "Uploading $jar"
jars+=("$jar")
fi
done
gh release create "v${GRADLE_VERSION}" \
--target main \
--title "v${GRADLE_VERSION}" \
--notes "This release contains release builds for all Gradle modules." \
"${jars[@]}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37 changes: 4 additions & 33 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,43 +1,14 @@
.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/
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/
.idea/

### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

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

### VS Code ###
.vscode/

### Mac OS ###
.DS_Store
.idea/
.DS_Store
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [2024] [SimpleCloud]
Copyright 2024-2026 SimpleCloud

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
23 changes: 8 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,14 @@ The Proxy Plugin enhances your server network with customizable MOTD (Server Inf

## Features

- [x] **Mutliple MOTD Layouts**: Create multiple MOTD Layouts for different states!
- [x] **Centered MOTD Lines**: Wrap a line in `<center>...</center>` to center MiniMessage text, formatting, symbols, and object components.
- [x] **Custom Tablist**: Send your Players custom Tablist Header and Footer!
- [x] **Joinstates**: Create different joinstates so your players can only join with certain permissions (you can call it advanced maintenance feature)

### Centering MOTD lines

The `<center>` tag is available in the two MOTD line fields:

```yaml
line1: '<center><color:#0ea5e9>A simplecloud.app network</color></center>'
line2: '<center><bold>Welcome!</bold></center>'
```

Centering uses vanilla bitmap and Unihex font metrics, with invisible one-pixel padding for precise placement. Custom resource-pack fonts and client-localized components can differ because their final glyph widths are only known by the client.
- [x] **Join States**: Decide who can join with permissions, for example during maintenance.
- [x] **Whitelist**: Players on the list can always join.
- [x] **Server List Layouts**: Set the MOTD, server icon, hover text, version text and player slots.
- [x] **Rotating MOTDs**: Show your MOTDs in random order or one after another.
- [x] **Centered MOTD Lines**: Wrap a line in `<center>...</center>` to center it.
- [x] **Domain Layouts**: Show a different server list layout for each domain.
- [x] **Network Player Count**: Show the players of your whole network instead of one proxy.
- [x] **Tab List**: Set a header and footer for each server group.

## Contributing
Contributions to SimpleCloud are welcome and highly appreciated. However, before you jump right into it, we would like you to read our [Contribution Guide][docs-contribute].
Expand Down
73 changes: 36 additions & 37 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,74 +1,73 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion

plugins {
alias(libs.plugins.kotlin)
alias(libs.plugins.shadow)
}

val baseVersion = "0.0.14"
val commitHash = System.getenv("COMMIT_HASH")
val snapshotversion = "${baseVersion}-dev.$commitHash"

allprojects {
group = "app.simplecloud.plugin.proxy"
version = if (commitHash != null) snapshotversion else baseVersion
group = "app.simplecloud.plugin"
version = "1.0.0"

repositories {
mavenCentral()
}
}

subprojects {
apply(plugin = "org.jetbrains.kotlin.jvm")
apply(plugin = "com.gradleup.shadow")
apply {
plugin("kotlin")
plugin("com.gradleup.shadow")
}

repositories {
mavenCentral()
maven("https://buf.build/gen/maven")

maven {
name = "papermc"
url = uri("https://repo.papermc.io/repository/maven-public/")
}
maven {
url = uri("https://oss.sonatype.org/content/repositories/snapshots")
}
maven {
name = "simplecloudRepositorySnapshots"
url = uri("https://repo.simplecloud.app/snapshots")
}
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://oss.sonatype.org/content/repositories/snapshots")
maven("https://repo.simplecloud.app/snapshots")
}

dependencies {
implementation(rootProject.libs.kotlin.jvm)
implementation(rootProject.libs.kotlin.reflect)
implementation(rootProject.libs.kotlin.coroutines)
implementation(rootProject.libs.kotlinx.coroutines.core)
testImplementation(rootProject.libs.kotlin.test)

compileOnly(rootProject.libs.slf4j.api)
compileOnly(rootProject.libs.simplecloud.api)

implementation(rootProject.libs.simplecloud.plugin)
}

java {
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
}

kotlin {
jvmToolchain(21)
jvmToolchain(25)
compilerOptions {
apiVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_0)
jvmTarget = JvmTarget.JVM_25
languageVersion = KotlinVersion.KOTLIN_2_4
apiVersion = KotlinVersion.KOTLIN_2_4
}
}

tasks.named("shadowJar", ShadowJar::class) {
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(25))
}

tasks.test {
useJUnitPlatform()
}

tasks.shadowJar {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
mergeServiceFiles()
archiveFileName.set("${project.name}.jar")
}

relocate("com.google.protobuf", "app.simplecloud.relocate.google.protobuf")
relocate("com.google.common", "app.simplecloud.relocate.google.common")
relocate("io.grpc", "app.simplecloud.relocate.io.grpc")
relocate("org.incendo", "app.simplecloud.plugin.proxy.relocate.incendo")
relocate("org.spongepowered", "app.simplecloud.plugin.proxy.relocate.spongepowered")
relocate("app.simplecloud.plugin.api", "app.simplecloud.plugin.proxy.relocate.plugin.api")
tasks.processResources {
filesMatching("plugin.yml") {
expand(
"version" to project.version
)
}
}

}
Loading