diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..941d18c --- /dev/null +++ b/.editorconfig @@ -0,0 +1,14 @@ +root = true + +[*] +charset = utf-8 +indent_size = 4 +insert_final_newline = true +trim_trailing_whitespace = true + +[*.{kt,kts}] +ktlint_code_style = intellij_idea + +[*{.yml,yaml}] +indent_style = space +indent_size = 2 diff --git a/.github/workflows/build-workflow.yml b/.github/workflows/build-workflow.yml new file mode 100644 index 0000000..fe22014 --- /dev/null +++ b/.github/workflows/build-workflow.yml @@ -0,0 +1,37 @@ +name: Build +on: + workflow_call: + outputs: + version: + description: Built version + value: ${{ jobs.build.outputs.version }} + +jobs: + build: + name: Gradle Build + runs-on: ubuntu-24.04 + outputs: + version: ${{ steps.version.outputs.version }} + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Setup Java + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: 21 + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 + - name: Gradle Build + run: ./gradlew build shadowJar + - name: Get Version + id: version + run: echo "version=$(./gradlew --console plain --quiet currentVersion -Prelease.quiet)" >> $GITHUB_OUTPUT + - name: Upload build + uses: actions/upload-artifact@v4 + with: + name: build + path: build/libs/*.jar + retention-days: 7 + if-no-files-found: error diff --git a/.github/workflows/create-version.yml b/.github/workflows/create-version.yml new file mode 100644 index 0000000..5697840 --- /dev/null +++ b/.github/workflows/create-version.yml @@ -0,0 +1,42 @@ +name: Create Version + +on: + workflow_dispatch: + inputs: + versionIncrementer: + type: choice + description: Override the default version incrementer according to https://axion-release-plugin.readthedocs.io/en/latest/configuration/version/#incrementing + default: default + options: + - default + - incrementPatch + - incrementMinor + - incrementMajor + - incrementPrerelease + +jobs: + release: + name: Gradle Release + runs-on: ubuntu-24.04 + outputs: + version: ${{ steps.version.outputs.version }} + steps: + - uses: actions/checkout@v4 + with: + ssh-key: "${{ secrets.COMMIT_KEY }}" + fetch-depth: 0 + - uses: webfactory/ssh-agent@v0.9.0 + with: + ssh-private-key: ${{ secrets.COMMIT_KEY }} + - name: Setup Java + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: 21 + - uses: gradle/actions/setup-gradle@v4 + - name: Gradle Release + if: ${{ inputs.versionIncrementer == 'default' }} + run: ./gradlew release + - name: Gradle Release w/ Increment Override + if: ${{ inputs.versionIncrementer != 'default' }} + run: ./gradlew release -Prelease.versionIncrementer=${{ inputs.versionIncrementer }} diff --git a/.github/workflows/pr-workflow.yml b/.github/workflows/pr-workflow.yml index 1b60a68..28d2147 100644 --- a/.github/workflows/pr-workflow.yml +++ b/.github/workflows/pr-workflow.yml @@ -3,14 +3,4 @@ on: pull_request jobs: build: - name: Gradle Build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v2 - with: - java-version: 17 - distribution: temurin - - uses: gradle/gradle-build-action@v2 - with: - arguments: build + uses: ./.github/workflows/build-workflow.yml diff --git a/.github/workflows/publish-workflow.yml b/.github/workflows/publish-workflow.yml new file mode 100644 index 0000000..2af66dc --- /dev/null +++ b/.github/workflows/publish-workflow.yml @@ -0,0 +1,32 @@ +name: Publish +on: + push: + branches: ['master', 'main'] + tags: + - "v[0-9]+.[0-9]+.[0-9]+" + +jobs: + build: + uses: ./.github/workflows/build-workflow.yml + release: + needs: build + name: Create Release + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + - name: Download build + uses: actions/download-artifact@v4 + with: + name: build + path: build + - name: Release + uses: docker://antonyurchenko/git-release:v6 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + RELEASE_NAME: ${{ needs.build.outputs.version }} + PRE_RELEASE: ${{ github.ref_type == 'branch' }} + UNRELEASED: ${{ github.ref_type == 'branch' && 'update' || '' }} + UNRELEASED_TAG: latest-snapshot + ALLOW_EMPTY_CHANGELOG: ${{ github.ref_type == 'branch' && 'true' || 'false' }} + with: + args: build/*.jar diff --git a/.github/workflows/release-workflow.yml b/.github/workflows/release-workflow.yml deleted file mode 100644 index 3c17e07..0000000 --- a/.github/workflows/release-workflow.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Release -on: - push: - tags: - - 'release-*' - -jobs: - release: - name: Create Release - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v2 - with: - java-version: 17 - distribution: temurin - - name: Gradle Build - uses: gradle/gradle-build-action@v2 - with: - arguments: build - - name: Extract version - uses: frabert/replace-string-action@v2.0 - id: format-version - with: - pattern: 'refs/tags/release-([0-9]+.[0-9]+.[0-9]+)' - string: ${{ github.ref }} - replace-with: '$1' - - name: Release - uses: docker://antonyurchenko/git-release:v4.1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - DRAFT_RELEASE: "true" - TAG_PREFIX_REGEX: "release-" - with: - args: | - build/libs/simplenpcs-${{ steps.format-version.outputs.replaced }}.jar - build/libs/simplenpcs-${{ steps.format-version.outputs.replaced }}-nokt.jar diff --git a/CHANGELOG.md b/CHANGELOG.md index a9d0233..f8a1717 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,14 @@ # Changelog ## [Unreleased] + ### Changed -- Update gradle to 7.4 -- Update to Spigot/MC 1.18 -- Update to Java 17 +- Merged template SimpleMC/mc-kotlin-plugin-template +- MC 1.21, Kotlin 2.1, Gradle 8 +- Release tag prefix changed from `release-` to `v` ## [0.1.0] - 2020-02-16 + ### Added - Initial Release diff --git a/build.gradle.kts b/build.gradle.kts index e146e7e..c670f01 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,127 +1,112 @@ -import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar +import org.yaml.snakeyaml.DumperOptions +import org.yaml.snakeyaml.Yaml import pl.allegro.tech.build.axion.release.domain.hooks.HookContext -import pl.allegro.tech.build.axion.release.domain.hooks.HooksConfig import java.time.OffsetDateTime import java.time.ZoneOffset import java.time.format.DateTimeFormatter plugins { - kotlin("jvm") version "1.6.10" - id("com.github.johnrengelman.shadow") version "7.1.2" - id("pl.allegro.tech.build.axion-release") version "1.13.6" - id("org.jlleitschuh.gradle.ktlint") version "10.2.1" + alias(libs.plugins.axionRelease) + alias(libs.plugins.kotlin) + alias(libs.plugins.ktlint) + alias(libs.plugins.shadow) } -val repoRef = "SimpleMC\\/SimpleNPCs" -val mcApiVersion = "1.18" - -group = "org.simplemc" -version = scmVersion.version - scmVersion { versionIncrementer("incrementMinorIfNotOnRelease", mapOf("releaseBranchPattern" to "release/.+")) + unshallowRepoOnCI.set(true) + + hooks { + // Automate moving `[Unreleased]` changelog entries into `[]` on release + // FIXME - workaround for Kotlin DSL issue https://github.com/allegro/axion-release-plugin/issues/500 + val changelogPattern = + "\\[Unreleased\\]([\\s\\S]+?)\\n" + + "(?:^\\[Unreleased\\]: https:\\/\\/github\\.com\\/(\\S+\\/\\S+)\\/compare\\/[^\\n]*\$([\\s\\S]*))?\\z" + pre( + "fileUpdate", + mapOf( + "file" to "CHANGELOG.md", + "pattern" to KotlinClosure2({ _, _ -> changelogPattern }), + "replacement" to KotlinClosure2({ version, context -> + // github "diff" for previous version + val previousVersionDiffLink = + when (context.previousVersion == version) { + true -> "releases/tag/v$version" // no previous, just link to the version + false -> "compare/v${context.previousVersion}...v$version" + } + """ + \[Unreleased\] + + ## \[$version\] - $currentDateString$1 + \[Unreleased\]: https:\/\/github\.com\/$2\/compare\/v$version...HEAD + \[$version\]: https:\/\/github\.com\/$2\/$previousVersionDiffLink$3 + """.trimIndent() + }), + ), + ) - hooks( - closureOf { - // "normal" changelog update--changelog already contains a history - pre( - "fileUpdate", - mapOf( - "file" to "CHANGELOG.md", - "pattern" to KotlinClosure2({ v, _ -> - "\\[Unreleased\\]([\\s\\S]+?)\\n(?:^\\[Unreleased\\]: https:\\/\\/github\\.com\\/$repoRef\\/compare\\/release-$v\\.\\.\\.HEAD\$([\\s\\S]*))?\\z" - }), - "replacement" to KotlinClosure2({ v, c -> - """ - \[Unreleased\] - - ## \[$v\] - ${currentDateString()}$1 - \[Unreleased\]: https:\/\/github\.com\/$repoRef\/compare\/release-$v...HEAD - \[$v\]: https:\/\/github\.com\/$repoRef\/compare\/release-${c.previousVersion}...release-$v$2 - """.trimIndent() - }) - ) - ) - // first-time changelog update--changelog has only unreleased info - pre( - "fileUpdate", - mapOf( - "file" to "CHANGELOG.md", - "pattern" to KotlinClosure2({ _, _ -> - "Unreleased([\\s\\S]+?\\nand this project adheres to \\[Semantic Versioning\\]\\(https:\\/\\/semver\\.org\\/spec\\/v2\\.0\\.0\\.html\\).)\\s\\z" - }), - "replacement" to KotlinClosure2({ v, _ -> - """ - \[Unreleased\] - - ## \[$v\] - ${currentDateString()}$1 - - \[Unreleased\]: https:\/\/github\.com\/$repoRef\/compare\/release-$v...HEAD - \[$v\]: https:\/\/github\.com\/$repoRef\/releases\/tag\/release-$v - """.trimIndent() - }) - ) - ) - pre("commit") - } - ) + pre("commit") + } } -fun currentDateString() = OffsetDateTime.now(ZoneOffset.UTC).toLocalDate().format(DateTimeFormatter.ISO_DATE) +group = "org.simplemc" +version = scmVersion.version -java { - toolchain { - languageVersion.set(JavaLanguageVersion.of(17)) - } -} +val currentDateString: String + get() = OffsetDateTime.now(ZoneOffset.UTC).toLocalDate().format(DateTimeFormatter.ISO_DATE) -repositories { - mavenCentral() - maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/") - maven("https://oss.sonatype.org/content/repositories/snapshots") +kotlin { + jvmToolchain(21) } dependencies { - implementation(kotlin("stdlib-jdk8")) - compileOnly(group = "org.spigotmc", name = "spigot-api", version = "$mcApiVersion+") + compileOnly(libs.spigot) } tasks { wrapper { - gradleVersion = "7.4.1" distributionType = Wrapper.DistributionType.ALL } processResources { val placeholders = mapOf( "version" to version, - "apiVersion" to mcApiVersion + "apiVersion" to libs.versions.mcApi.get(), + "kotlinVersion" to libs.versions.kotlin.get(), ) filesMatching("plugin.yml") { expand(placeholders) } + + // create an "offline" copy/variant of the plugin.yml with `libraries` omitted + doLast { + val resourcesDir = sourceSets.main.get().output.resourcesDir + val yamlDumpOptions = + // make it pretty for the people + DumperOptions().also { + it.defaultFlowStyle = DumperOptions.FlowStyle.BLOCK + it.isPrettyFlow = true + } + val yaml = Yaml(yamlDumpOptions) + val pluginYml: Map = yaml.load(file("$resourcesDir/plugin.yml").inputStream()) + yaml.dump(pluginYml.filterKeys { it != "libraries" }, file("$resourcesDir/offline-plugin.yml").writer()) + } } - // standard jar should be ready to go with all dependencies - shadowJar { - minimize() - archiveClassifier.set("") + jar { + exclude("offline-plugin.yml") } - // nokt jar without the kotlin runtime - register("nokt") { + // offline jar should be ready to go with all dependencies + shadowJar { minimize() - archiveClassifier.set("nokt") - from(sourceSets.main.get().output) - configurations = listOf(project.configurations.runtimeClasspath.get()) - - dependencies { - exclude(dependency("org.jetbrains.*:")) - } - } + archiveClassifier.set("offline") + exclude("plugin.yml") + rename("offline-plugin.yml", "plugin.yml") - build { - dependsOn(":shadowJar", ":nokt") + // avoid classpath conflicts/pollution via relocation + isEnableRelocation = true + relocationPrefix = "${project.group}.${project.name.lowercase()}.libraries" } } diff --git a/gradle/gradle-daemon-jvm.properties b/gradle/gradle-daemon-jvm.properties new file mode 100644 index 0000000..63e5bbd --- /dev/null +++ b/gradle/gradle-daemon-jvm.properties @@ -0,0 +1,2 @@ +#This file is generated by updateDaemonJvm +toolchainVersion=21 diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 0000000..7b2ff95 --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,16 @@ +[versions] +axionRelease = "1.18.18" +kotlin = "2.1.20" +ktlintGradle = "12.2.0" +mcApi = "1.21" +shadow = "8.3.6" +spigot = "1.21.+" + +[plugins] +axionRelease = { id = "pl.allegro.tech.build.axion-release", version.ref = "axionRelease"} +kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin"} +ktlint = { id = "org.jlleitschuh.gradle.ktlint", version.ref = "ktlintGradle"} +shadow = { id = "com.gradleup.shadow", version.ref = "shadow"} + +[libraries] +spigot = { group = "org.spigotmc", name = "spigot-api", version.ref = "spigot" } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 41d9927..1b33c55 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index d7e66b5..6514f91 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-all.zip +networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 1b6c787..23d15a9 100755 --- a/gradlew +++ b/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -80,13 +82,11 @@ do esac done -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -APP_NAME="Gradle" +# This is normally unused +# shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -114,7 +114,7 @@ case "$( uname )" in #( NONSTOP* ) nonstop=true ;; esac -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar +CLASSPATH="\\\"\\\"" # Determine the Java command to use to start the JVM. @@ -133,22 +133,29 @@ location of your Java installation." fi else JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac case $MAX_FD in #( '' | soft) :;; #( *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -193,18 +200,28 @@ if "$cygwin" || "$msys" ; then done fi -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ "$@" +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + # Use "xargs" to parse quoted args. # # With -n1 it outputs one arg per line, with the quotes and backslashes removed. diff --git a/gradlew.bat b/gradlew.bat index ac1b06f..5eed7ee 100755 --- a/gradlew.bat +++ b/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,32 +59,34 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail :execute @rem Setup the command line -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar +set CLASSPATH= @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/settings.gradle.kts b/settings.gradle.kts index 6bcee0f..63de670 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1 +1,26 @@ +pluginManagement { + repositories { + gradlePluginPortal() + mavenCentral() + } +} + +buildscript { + dependencies { + classpath("org.yaml:snakeyaml:2.3") + } +} + +dependencyResolutionManagement { + repositories { + mavenCentral() + maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/") + maven("https://oss.sonatype.org/content/repositories/snapshots") + } +} + +plugins { + id("org.gradle.toolchains.foojay-resolver-convention") version "0.9.0" +} + rootProject.name = "simplenpcs" diff --git a/src/main/kotlin/org/simplemc/simplenpcs/SimpleNPCs.kt b/src/main/kotlin/org/simplemc/simplenpcs/SimpleNPCs.kt index e43218b..b80878d 100644 --- a/src/main/kotlin/org/simplemc/simplenpcs/SimpleNPCs.kt +++ b/src/main/kotlin/org/simplemc/simplenpcs/SimpleNPCs.kt @@ -109,7 +109,7 @@ class SimpleNPCs : JavaPlugin(), Listener { awaitingBinds.remove(sender)?.let { (_, command) -> sender.sendMessage( command?.let { "NPC binding of command `$it` timed out" } - ?: "NPC unbinding timed out" + ?: "NPC unbinding timed out", ) } } diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 7c38a82..7f87edf 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -4,6 +4,8 @@ version: "${version}" api-version: "${apiVersion}" website: https://github.com/SimpleMC/SimpleNPCs author: tajobe +libraries: + - org.jetbrains.kotlin:kotlin-stdlib-jdk8:${kotlinVersion} permissions: simplenpc.*: description: Wildcard permission