diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 9ea92bd..ade85af 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -50,6 +50,15 @@ jobs: echo "EXISTS=false" >> "$GITHUB_OUTPUT" fi + - id: mrck + run: | + echo "TOKEN=$([ -n "${{ secrets.MODRINTH_TOKEN }}" ] && echo true || echo false)" >> "$GITHUB_OUTPUT" + + - id: dist + run: | + echo "TAG_NAME=${{ format('v{0}{1}', steps.vars.outputs.VERS, steps.ghck.outputs.EXISTS == 'true' && format('+{0}', steps.vars.outputs.COMMIT_HASH) || '') }}" >> "$GITHUB_OUTPUT" + echo "REL_NAME=${{ format('{0}{1}', steps.ghck.outputs.EXISTS == 'true' && 'Snapshot ' || 'v', steps.ghck.outputs.EXISTS == 'true' && steps.vars.outputs.COMMIT_HASH || steps.vars.outputs.VERS) }}" >> "$GITHUB_OUTPUT" + - run: | mkdir -p dist cp "./build/libs/${{ steps.vars.outputs.AFCT }}" ./dist @@ -62,9 +71,27 @@ jobs: - if: github.event_name == 'push' && github.ref == 'refs/heads/main' uses: softprops/action-gh-release@v2 with: - tag_name: ${{ format('v{0}{1}', steps.vars.outputs.VERS, steps.ghck.outputs.EXISTS == 'true' && format('+{0}', steps.vars.outputs.COMMIT_HASH) || '') }} - name: ${{ format('{0}{1}', steps.ghck.outputs.EXISTS == 'true' && 'Snapshot ' || 'v', steps.ghck.outputs.EXISTS == 'true' && steps.vars.outputs.COMMIT_HASH || steps.vars.outputs.VERS) }} + tag_name: ${{ steps.dist.outputs.TAG_NAME }} + name: ${{ steps.dist.outputs.REL_NAME }} files: dist/${{ steps.vars.outputs.AFCT }} prerelease: ${{ steps.ghck.outputs.EXISTS == 'true' }} env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - if: github.event_name == 'push' && github.ref == 'refs/heads/main' && steps.mrck.outputs.TOKEN == 'true' + uses: cloudnode-pro/modrinth-publish@v2 + with: + token: ${{ secrets.MODRINTH_TOKEN }} + project: WfBtRGYI + version: ${{ steps.dist.output.TAG_NAME }} + loaders: '["bukkit", "bungeecord", "paper", "purpur", "spigot", "velocity", "waterfall"]' + game-versions: '["1.8.x", "1.9.x", "1.10.x", "1.11.x", "1.12.x", "1.13.x", "1.14.x", "1.15.x", "1.16.x", "1.17.x", "1.18.x", "1.19.x", "1.20.x", "1.21.x"]' + files: dist/${{ steps.vars.outputs.AFCT }} + primary-file: ${{ steps.vars.outputs.AFCT }} + name: ${{ steps.dist.outputs.REL_NAME }} + channel: ${{ steps.ghck.outputs.EXISTS == 'true' && 'beta ' || 'release' }} + dependencies: |- + [{ + "project_id": "Gtsn3SWv", + "dependency_type": "required" + }] \ No newline at end of file diff --git a/README.md b/README.md index 4a9bde9..b3dbfc5 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ - [x] Client brand based blacklisting - [x] Username based blacklisting - [x] IP based blacklisting +- [x] Modular multi-platform support - [x] JSON5 based configuration - [x] Kick message customization - [x] Blacklist MOTD customization diff --git a/build.gradle.kts b/build.gradle.kts index 0725d3f..6f835f9 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,7 +11,7 @@ val PLUGIN_NAME = "OriginBlacklist" val PLUGIN_IDEN = "originblacklist" val PLUGIN_DOMN = "xyz.webmc" val PLUGIN_DESC = "An eaglercraft client blacklist plugin." -val PLUGIN_VERS = "2.0.1" +val PLUGIN_VERS = "2.0.2" val PLUGIN_SITE = "https://github.com/WebMCDevelopment/$PLUGIN_IDEN" val PLUGIN_DEPA = listOf("EaglercraftXServer") val PLUGIN_DEPB = listOf("EaglercraftXServer") diff --git a/icon.png b/img/icon.png similarity index 100% rename from icon.png rename to img/icon.png diff --git a/img/icon2.png b/img/icon2.png new file mode 100644 index 0000000..7f750c3 Binary files /dev/null and b/img/icon2.png differ diff --git a/src/main/java/xyz/webmc/originblacklist/base/OriginBlacklist.java b/src/main/java/xyz/webmc/originblacklist/base/OriginBlacklist.java index 70464f0..f9afd3c 100644 --- a/src/main/java/xyz/webmc/originblacklist/base/OriginBlacklist.java +++ b/src/main/java/xyz/webmc/originblacklist/base/OriginBlacklist.java @@ -217,7 +217,7 @@ public final class OriginBlacklist { "fields": [], "footer": { "text": "OriginBlacklist v%s", - "icon_url": "https://raw.githubusercontent.com/%s/refs/heads/main/icon.png" + "icon_url": "https://raw.githubusercontent.com/%s/refs/heads/main/img/icon.png" } } ],