Skip to content

Commit

Permalink
Merge pull request #69 from OneLiteFeatherNET/develop
Browse files Browse the repository at this point in the history
Release v1.1.0
  • Loading branch information
TheMeinerLP authored Jun 14, 2024
2 parents 1335c72 + c5497b5 commit fc9e427
Show file tree
Hide file tree
Showing 27 changed files with 321 additions and 237 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/announce-release-on-discord.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Announce release on discord
on:
release:
types: [ published ]
jobs:
send_announcement:
runs-on: ubuntu-latest
steps:
- name: Send custom message with args
env:
DISCORD_WEBHOOK: ${{ secrets.ONELITEFATHERNET_GITHUB_WEBHOOK }}
DISCORD_USERNAME: AntiRedstoneClock-Remastered Release
DISCORD_AVATAR: https://raw.githubusercontent.com/OneLiteFeatherNET/assets/blob/main/onelitefeathernet.png
DISCORD_THREAD_ID: '1239259280662597725'
uses: OneLiteFeatherNET/action-discord@master
with:
args: |
"<@&1250397109207830589>"
""
"<a:fancyonelitefeather:1202007167818018867> **AntiRedstoneClock-Remastered ${{ github.event.release.tag_name }} has been released!**"
""
"Click here to view changelog: https://github.com/OneLiteFeatherNET/AntiRedstoneClock-Remastered/releases/tag/${{ github.event.release.tag_name }}"
""
"The download is available at:"
"- Hangar: <https://hangar.papermc.io/OneLiteFeather/AntiRedstoneClock-Remastered/versions/${{ github.event.release.tag_name }}/>"
"- Modrinth: <https://modrinth.com/plugin/AntiRedstoneClock-Remastered/version/${{ github.event.release.tag_name }}/>"
4 changes: 2 additions & 2 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v2
uses: gradle/wrapper-validation-action@v3
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
java-version: 21
- name: Build on ${{ matrix.os }}
run: ./gradlew clean build
39 changes: 0 additions & 39 deletions .github/workflows/build.yml

This file was deleted.

30 changes: 30 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Publish AntiRedstoneClock-Remasterd to platforms
on:
push:
branches:
- master
- develop
jobs:
publish:
name: 'Publish to EldoNexus, Modrinth and Hangar'
# Run on all label events (won't be duplicated) or all push events or on PR syncs not from the same repo
if: github.repository_owner == 'OneLiteFeatherNET'
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v3
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: temurin
cache: gradle
java-version: 21
- name: Publish
env:
HANGAR_SECRET: ${{secrets.HANGAR_KEY}}
MODRINTH_TOKEN: ${{ secrets.MODRINTH_KEY }}
ELDO_USERNAME: "${{ secrets.ELDO_USERNAME }}"
ELDO_PASSWORD: "${{ secrets.ELDO_PASSWORD }}"
run: ./gradlew build modrinth publishAllPublicationsToHangar publish
2 changes: 1 addition & 1 deletion .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ jobs:
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
- uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,7 @@ bin/
.vscode/

### Mac OS ###
.DS_Store
.DS_Store

### Project
run-*/
22 changes: 0 additions & 22 deletions CHANGELOG.md

This file was deleted.

18 changes: 2 additions & 16 deletions PlotSquaredv4Support/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
plugins {
id("java")
}

repositories {
mavenCentral()
maven("https://repo.codemc.io/repository/maven-public")
maven("https://jitpack.io")// Plotsquared V4 Support
maven("https://maven.enginehub.org/repo/")
maven("https://papermc.io/repo/repository/maven-public/")
}

dependencies {
compileOnly("com.github.IntellectualSites.PlotSquared:Core:4.453")
compileOnly("com.github.IntellectualSites.PlotSquared:Bukkit:4.453")
compileOnly(project(":internal-api"))
compileOnly("io.papermc.paper:paper-api:1.20.1-R0.1-SNAPSHOT")
compileOnly(libs.psv4.core)
compileOnly(libs.psv4.bukkit)
}
18 changes: 3 additions & 15 deletions PlotSquaredv6Support/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
plugins {
id("java")
}

repositories {
mavenCentral()
maven("https://maven.enginehub.org/repo/")
maven("https://papermc.io/repo/repository/maven-public/")
}

dependencies {
implementation(platform("com.intellectualsites.bom:bom-1.16.x:1.40"))
compileOnly("com.plotsquared:PlotSquared-Core")
compileOnly("com.plotsquared:PlotSquared-Bukkit") { isTransitive = false }
compileOnly(project(":internal-api"))
compileOnly("io.papermc.paper:paper-api:1.20.1-R0.1-SNAPSHOT")
implementation(platform(libs.psv6.platform))
compileOnly(libs.psv6.core)
compileOnly(libs.psv6.bukkit) { isTransitive = false }
}
18 changes: 3 additions & 15 deletions PlotSquaredv7Support/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
plugins {
id("java")
}

repositories {
mavenCentral()
maven("https://maven.enginehub.org/repo/")
maven("https://papermc.io/repo/repository/maven-public/")
}

dependencies {
implementation(platform("com.intellectualsites.bom:bom-newest:1.40"))
compileOnly("com.intellectualsites.plotsquared:plotsquared-core")
compileOnly("com.intellectualsites.plotsquared:plotsquared-bukkit") { isTransitive = false }
compileOnly(project(":internal-api"))
compileOnly("io.papermc.paper:paper-api:1.20.1-R0.1-SNAPSHOT")
implementation(platform(libs.psv7.platform))
compileOnly(libs.psv7.core)
compileOnly(libs.psv7.bukkit) { isTransitive = false }
}
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
# AntiRedstoneClock-Remastered
This plugin is inspired by https://gitlab.com/Trafalcraft/antiRedstoneClock
This plugin is inspired by https://gitlab.com/Trafalcraft/antiRedstoneClock

We re-created the whole code and improved everything. On top, we support Plotsquared v7 and Worldguard v7.

### Goal
The goal of this plugin is to detect redstone clocks, inform staff or console about active ones and optionally destroy / disable the redstone clocks so your server can save performance for something else. Also it can prevent players doing harm with heavy clocks, but this is more of a side effect.

### Not a goal
It's not planned to support Paper forks or spigot directly - this plugin is developed to work on Paper, if you are using a fork of paper or spigot and it doesn't work because of your fork, you are likely on your own then.
Also this plugin is not a "performance tool", it won't make your server run better directly.
Third, support from 1.13 backwards likely won't happen.

## Features
- 1.13+ Support
- Java 17 only support
Expand All @@ -17,6 +25,9 @@ We re-created the whole code and improved everything. On top, we support Plotsqu
> [!CAUTION]
> The "world" world is ignored by default
## Contribution
You want to help us? Sure go for it, we would love to see your contribution! You can look for open issues or if you have a nice idea, please open an issue or ask us on discord if you can add your feature with a PR. Communication is key.

## Dependencies (soft-depend, can be used together)
- Plotsquared v7 https://github.com/IntellectualSites/PlotSquared
- Worldguard v7 https://github.com/EngineHub/WorldGuard
Expand Down
18 changes: 1 addition & 17 deletions WorldGuardv6Support/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
plugins {
id("java")
}


repositories {
mavenCentral()
maven("https://repo.codemc.org/repository/maven-public")
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
maven("https://maven.enginehub.org/repo/")
maven("https://papermc.io/repo/repository/maven-public/")

}

dependencies {
compileOnly("com.sk89q.worldguard:worldguard-legacy:6.2")
compileOnly(libs.wg6)
compileOnly("com.sk89q.worldedit:worldedit-bukkit:6.0") {
exclude("org.bukkit", "bukkit")
}
compileOnly(project(":internal-api"))
compileOnly("io.papermc.paper:paper-api:1.20.1-R0.1-SNAPSHOT")
}
14 changes: 1 addition & 13 deletions WorldGuardv7Support/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
plugins {
id("java")
}

repositories {
mavenCentral()
maven("https://maven.enginehub.org/repo/")
maven("https://papermc.io/repo/repository/maven-public/")
}

dependencies {
compileOnly("com.sk89q.worldguard:worldguard-bukkit:7.0.9")
compileOnly(project(":internal-api"))
compileOnly("io.papermc.paper:paper-api:1.20.1-R0.1-SNAPSHOT")
compileOnly(libs.wg7)
}
7 changes: 7 additions & 0 deletions build-logic/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
plugins {
`kotlin-dsl`
}

repositories {
gradlePluginPortal()
}
43 changes: 43 additions & 0 deletions build-logic/src/main/kotlin/extensions.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import org.gradle.api.Project
import org.gradle.api.publish.PublishingExtension
import org.gradle.api.publish.maven.MavenPublication
import org.gradle.kotlin.dsl.configure
import org.gradle.kotlin.dsl.get
import org.gradle.kotlin.dsl.named
import java.io.ByteArrayOutputStream

fun Project.publishShadowJar() {
configurePublication {
artifact(tasks["shadowJar"])
artifact(tasks["sourcesJar"])
}
}

private fun Project.configurePublication(configurer: MavenPublication.() -> Unit) {
extensions.configure<PublishingExtension> {
publications.named<MavenPublication>("mavenJava") {
apply(configurer)
}
}
}

fun Project.latestCommitHash(): String {
return runGitCommand(listOf("rev-parse", "--short", "HEAD"))
}

fun Project.latestCommitMessage(): String {
return runGitCommand(listOf("log", "-1", "--pretty=%B"))
}

fun Project.branchName(): String {
return runGitCommand(listOf("rev-parse", "--abbrev-ref", "HEAD"))
}

fun Project.runGitCommand(args: List<String>): String {
val byteOut = ByteArrayOutputStream()
exec {
commandLine = listOf("git") + args
standardOutput = byteOut
}
return byteOut.toString(Charsets.UTF_8.name()).trim()
}
Empty file.
Loading

0 comments on commit fc9e427

Please sign in to comment.