From 5330271ac8dcf50f86158cf56f506af5f0ef3068 Mon Sep 17 00:00:00 2001 From: Boy Date: Sun, 21 May 2023 14:06:54 +0200 Subject: [PATCH 1/5] update ido --- build.gradle.kts | 5 +++-- gradle.properties | 6 ++---- gradle/wrapper/gradle-wrapper.properties | 2 +- settings.gradle.kts | 13 +++++-------- .../deeperworld/DeeperCommandExecutor.kt | 3 +-- 5 files changed, 12 insertions(+), 17 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index c68234e..130bd50 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,13 +1,14 @@ val idofrontVersion: String by project +@Suppress("DSL_SCOPE_VIOLATION") plugins { - id("com.mineinabyss.conventions.kotlin") + alias(libs.plugins.kotlinx.serialization) + id("com.mineinabyss.conventions.kotlin.jvm") id("com.mineinabyss.conventions.papermc") id("com.mineinabyss.conventions.copyjar") id("com.mineinabyss.conventions.publication") id("com.mineinabyss.conventions.testing") id("com.mineinabyss.conventions.autoversion") - kotlin("plugin.serialization") } repositories { diff --git a/gradle.properties b/gradle.properties index e1084d8..85f1a3e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,3 @@ group=com.mineinabyss -version=0.7 -kotlinVersion=1.7.20 -serverVersion=1.19.2-R0.1-SNAPSHOT -idofrontVersion=0.15.3 +version=0.8 +idofrontVersion=0.18.3 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ae04661..fae0804 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/settings.gradle.kts b/settings.gradle.kts index f60df36..afae8a9 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -5,15 +5,12 @@ pluginManagement { maven("https://repo.papermc.io/repository/maven-public/") //Paper } - plugins { - val kotlinVersion: String by settings - id("org.jetbrains.kotlin.jvm") version kotlinVersion - id("org.jetbrains.kotlin.plugin.serialization") version kotlinVersion - } - val idofrontVersion: String by settings - resolutionStrategy.eachPlugin { - if (requested.id.id.startsWith("com.mineinabyss.conventions")) useVersion(idofrontVersion) + resolutionStrategy { + eachPlugin { + if (requested.id.id.startsWith("com.mineinabyss.conventions")) + useVersion(idofrontVersion) + } } } diff --git a/src/main/kotlin/com/mineinabyss/deeperworld/DeeperCommandExecutor.kt b/src/main/kotlin/com/mineinabyss/deeperworld/DeeperCommandExecutor.kt index fed1fdc..e82c35f 100644 --- a/src/main/kotlin/com/mineinabyss/deeperworld/DeeperCommandExecutor.kt +++ b/src/main/kotlin/com/mineinabyss/deeperworld/DeeperCommandExecutor.kt @@ -9,7 +9,6 @@ import com.mineinabyss.deeperworld.world.section.correspondingLocation import com.mineinabyss.deeperworld.world.section.correspondingSection import com.mineinabyss.deeperworld.world.section.getCorrespondingLocation import com.mineinabyss.deeperworld.world.section.section -import com.mineinabyss.idofront.commands.CommandHolder import com.mineinabyss.idofront.commands.arguments.booleanArg import com.mineinabyss.idofront.commands.arguments.intArg import com.mineinabyss.idofront.commands.execution.IdofrontCommandExecutor @@ -35,7 +34,7 @@ import org.bukkit.command.CommandSender import org.bukkit.command.TabCompleter class DeeperCommandExecutor : IdofrontCommandExecutor(), TabCompleter { - override val commands: CommandHolder = commands(deeperWorld) { + override val commands = commands(deeperWorld) { ("deeperworld" / "dw") { "reload" { action { From f8d08b30856f722a7fbbcc1c5fe74f5d60cbcc22 Mon Sep 17 00:00:00 2001 From: Danielle Voznyy Date: Sun, 21 May 2023 13:40:58 -0400 Subject: [PATCH 2/5] Bump idofront --- build.gradle.kts | 2 -- src/main/resources/plugin.yml | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 130bd50..66a9617 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,3 @@ -val idofrontVersion: String by project - @Suppress("DSL_SCOPE_VIOLATION") plugins { alias(libs.plugins.kotlinx.serialization) diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 792a2f5..ce7838d 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -2,10 +2,10 @@ name: DeeperWorld version: ${plugin_version} main: com.mineinabyss.deeperworld.DeeperWorldPlugin authors: [Derongan, Offz, Boy000, Norazan, Scyu] -api-version: '1.17' +api-version: '1.19' description: A plugin for letting you create a deeper world. Or at least fake it. -softdepend: [Multiverse-Core, BlockLocker, KotlinSpice, ProtocolLib, FastAsyncWorldEdit] +softdepend: [Multiverse-Core, BlockLocker, ProtocolLib, FastAsyncWorldEdit] commands: deeperworld: From 435f70a2a2b0767bb5ceef3b92bd16083c9aa58d Mon Sep 17 00:00:00 2001 From: Danielle Voznyy Date: Mon, 22 May 2023 20:42:08 -0400 Subject: [PATCH 3/5] Release on develop --- .github/workflows/main.yml | 20 ++++---------- .github/workflows/publish-packages.yml | 37 +++++--------------------- gradle.properties | 2 +- 3 files changed, 13 insertions(+), 46 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c0dae04..dc465a1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,13 +1,12 @@ name: Java CI on: - push: - branches: - - master - paths-ignore: - - '**.md' pull_request: +concurrency: + cancel-in-progress: true + group: ci-${{ github.ref }} + jobs: build: runs-on: ubuntu-latest @@ -21,14 +20,5 @@ jobs: java-version: 17 cache: gradle - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - - name: Build + - name: Run build run: gradle build - - - name: Upload build - uses: actions/upload-artifact@v1 - with: - name: build - path: build/libs diff --git a/.github/workflows/publish-packages.yml b/.github/workflows/publish-packages.yml index 837779e..b009cd3 100644 --- a/.github/workflows/publish-packages.yml +++ b/.github/workflows/publish-packages.yml @@ -4,6 +4,7 @@ on: push: branches: - master + - develop paths-ignore: - '**.md' @@ -14,34 +15,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Set up JDK - uses: actions/setup-java@v3 + - uses: MineInAbyss/publish-action@master with: - distribution: temurin - java-version: 17 - - - name: Set env variable from latest maven version - run: > - echo "RELEASE_VERSION=$( \ - curl https://repo.mineinabyss.com/releases/com/mineinabyss/deeperworld/maven-metadata.xml | \ - grep -oP '(?!)[\d\.]*(?=)' \ - )" >> $GITHUB_ENV - - - name: Run gradle build and publish - run: gradle build publish -PmineinabyssMavenUsername=${{ secrets.MAVEN_PUBLISH_USERNAME }} -PmineinabyssMavenPassword=${{ secrets.MAVEN_PUBLISH_PASSWORD }} - - - name: Get version from gradle - shell: bash - id: extract_version - run: | - version=`gradle properties --no-daemon --console=plain -q | grep "^version:" | awk '{printf $2}'` - echo "::set-output name=version::$version" - - - name: Create GitHub Release - uses: marvinpinto/action-automatic-releases@latest - with: - repo_token: "${{ secrets.GITHUB_TOKEN }}" - prerelease: false - automatic_release_tag: v${{ steps.extract_version.outputs.version }} - files: | - build/libs/*-all.jar + maven-metadata-url: https://repo.mineinabyss.com/releases/com/mineinabyss/deeperworld/maven-metadata.xml + maven-username: ${{ secrets.MAVEN_PUBLISH_USERNAME }} + maven-password: ${{ secrets.MAVEN_PUBLISH_PASSWORD }} + release-files: | + ${{ github.workspace }}/publish/*.jar diff --git a/gradle.properties b/gradle.properties index 85f1a3e..02397b2 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ group=com.mineinabyss version=0.8 -idofrontVersion=0.18.3 +idofrontVersion=0.18.4 From 2eb86858821a369cb5b98c98b1b7966671652ce2 Mon Sep 17 00:00:00 2001 From: Boy Date: Sun, 11 Jun 2023 23:24:35 +0200 Subject: [PATCH 4/5] update ido --- gradle.properties | 2 +- .../deeperworld/synchronization/SectionSyncListener.kt | 4 +++- .../mineinabyss/deeperworld/synchronization/Updaters.kt | 9 +++++---- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/gradle.properties b/gradle.properties index 85f1a3e..a075198 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ group=com.mineinabyss version=0.8 -idofrontVersion=0.18.3 +idofrontVersion=0.18.10 diff --git a/src/main/kotlin/com/mineinabyss/deeperworld/synchronization/SectionSyncListener.kt b/src/main/kotlin/com/mineinabyss/deeperworld/synchronization/SectionSyncListener.kt index bc7a462..c568c99 100644 --- a/src/main/kotlin/com/mineinabyss/deeperworld/synchronization/SectionSyncListener.kt +++ b/src/main/kotlin/com/mineinabyss/deeperworld/synchronization/SectionSyncListener.kt @@ -24,6 +24,7 @@ import org.bukkit.block.data.type.Bed import org.bukkit.block.data.type.Sapling import org.bukkit.block.data.type.Stairs import org.bukkit.block.data.type.TrapDoor +import org.bukkit.block.sign.Side import org.bukkit.entity.EntityType import org.bukkit.event.EventHandler import org.bukkit.event.EventPriority @@ -70,7 +71,8 @@ object SectionSyncListener : Listener { //sync any changes to BlockLocker's signs` if (DeeperContext.isBlockLockerLoaded && state is Sign && - state.lines().first() == Component.text("[Private]")) { + (state.getSide(Side.FRONT).lines().first() == Component.text("[Private]") + || state.getSide(Side.BACK).lines().first() == Component.text("[Private]"))) { syncBlockLocker(corr) } diff --git a/src/main/kotlin/com/mineinabyss/deeperworld/synchronization/Updaters.kt b/src/main/kotlin/com/mineinabyss/deeperworld/synchronization/Updaters.kt index 0226475..5d81975 100644 --- a/src/main/kotlin/com/mineinabyss/deeperworld/synchronization/Updaters.kt +++ b/src/main/kotlin/com/mineinabyss/deeperworld/synchronization/Updaters.kt @@ -9,6 +9,7 @@ import org.bukkit.Material import org.bukkit.block.Block import org.bukkit.block.Sign import org.bukkit.block.data.BlockData +import org.bukkit.block.sign.Side import org.bukkit.inventory.ItemStack import org.bukkit.util.Vector @@ -41,11 +42,11 @@ internal inline fun Location.sync(updater: (original: Block, corresponding: Bloc internal fun signUpdater(lines: MutableList? = null) = { original: Block, corresponding: Block -> copyBlockData(original, corresponding) val sign = original.state - if (sign is Sign) { - val readLines = lines ?: sign.lines() + if (sign is Sign) for (side in Side.values()) { + val readLines = lines ?: sign.getSide(side).lines() val corrSign = corresponding.state - if (corrSign is Sign && !corrSign.lines().containsAll(readLines)) { - readLines.forEachIndexed { i, line -> corrSign.line(i, line) } + if (corrSign is Sign && !corrSign.getSide(side).lines().containsAll(readLines)) { + readLines.forEachIndexed { i, line -> corrSign.getSide(side).line(i, line) } corrSign.update() } } From 9970c3fb83bb1a6fb8250a73690e5d806ef40f02 Mon Sep 17 00:00:00 2001 From: Danielle Voznyy Date: Tue, 20 Jun 2023 12:59:42 -0400 Subject: [PATCH 5/5] 1.20 idofront bump --- gradle.properties | 2 +- src/main/resources/plugin.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index a075198..d9fe2de 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ group=com.mineinabyss version=0.8 -idofrontVersion=0.18.10 +idofrontVersion=0.18.14 diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index ce7838d..68c7ea3 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -2,7 +2,7 @@ name: DeeperWorld version: ${plugin_version} main: com.mineinabyss.deeperworld.DeeperWorldPlugin authors: [Derongan, Offz, Boy000, Norazan, Scyu] -api-version: '1.19' +api-version: '1.20' description: A plugin for letting you create a deeper world. Or at least fake it. softdepend: [Multiverse-Core, BlockLocker, ProtocolLib, FastAsyncWorldEdit]