diff --git a/build.gradle.kts b/build.gradle.kts index 63022531..0f27eb17 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -53,7 +53,6 @@ allprojects { plugins.apply("maven-publish") plugins.apply("kotlin") plugins.apply("io.github.goooler.shadow") - plugins.apply("com.modrinth.minotaur") repositories { mavenCentral() @@ -209,6 +208,7 @@ for (module in modrinthModules) { projectId.set("${property("modrinthProjectID")}") versionNumber.set((if (isRelease) versionString else publishVersion) + "-${module.name.lowercase()}") versionType.set(System.getenv("MODRINTH_BUILD_CHANNEL") ?: "beta") + uploadFile.set(project(":sayanvanish-bukkit").tasks.shadowJar.flatMap { it.archiveFile }) when (module) { Module.BUKKIT -> { uploadFile.set(project(":sayanvanish-bukkit").tasks.shadowJar.flatMap { it.archiveFile }) @@ -237,4 +237,4 @@ for (module in modrinthModules) { syncBodyFrom.set(rootProject.file("README.md").readText()) } -} \ No newline at end of file +} diff --git a/buildSrc/src/main/kotlin/org/sayandev/Repositories.kt b/buildSrc/src/main/kotlin/org/sayandev/Repositories.kt index 31db91dd..c93a8977 100644 --- a/buildSrc/src/main/kotlin/org/sayandev/Repositories.kt +++ b/buildSrc/src/main/kotlin/org/sayandev/Repositories.kt @@ -102,7 +102,7 @@ val placeholderAPI = Dependency( modules = listOf(Module.BUKKIT) ) -val stickynoteVersion = "1.0.32" +const val stickynoteVersion = "1.0.32" val stickynoteCore = Dependency( group = "org.sayandev", diff --git a/sayanvanish-bukkit/src/main/kotlin/org/sayandev/sayanvanish/bukkit/feature/features/FeatureState.kt b/sayanvanish-bukkit/src/main/kotlin/org/sayandev/sayanvanish/bukkit/feature/features/FeatureState.kt index 96895e19..48626d7a 100644 --- a/sayanvanish-bukkit/src/main/kotlin/org/sayandev/sayanvanish/bukkit/feature/features/FeatureState.kt +++ b/sayanvanish-bukkit/src/main/kotlin/org/sayandev/sayanvanish/bukkit/feature/features/FeatureState.kt @@ -6,6 +6,7 @@ import org.bukkit.event.player.PlayerJoinEvent import org.bukkit.event.player.PlayerQuitEvent import org.sayandev.sayanvanish.api.Permission import org.sayandev.sayanvanish.api.VanishOptions +import org.sayandev.sayanvanish.api.feature.Configurable import org.sayandev.sayanvanish.api.feature.RegisteredFeature import org.sayandev.sayanvanish.bukkit.api.SayanVanishBukkitAPI import org.sayandev.sayanvanish.bukkit.api.SayanVanishBukkitAPI.Companion.getOrCreateUser @@ -19,11 +20,11 @@ import org.sayandev.stickynote.lib.spongepowered.configurate.objectmapping.Confi @RegisteredFeature @ConfigSerializable class FeatureState( - val remember: Boolean = true, - val vanishOnJoin: Boolean = false, - val reappearOnQuit: Boolean = false, - val checkPermissionOnQuit: Boolean = false, - val checkPermissionOnJoin: Boolean = false, + @Configurable val remember: Boolean = true, + @Configurable val vanishOnJoin: Boolean = false, + @Configurable val reappearOnQuit: Boolean = false, + @Configurable val checkPermissionOnQuit: Boolean = false, + @Configurable val checkPermissionOnJoin: Boolean = false, ) : ListenedFeature("state") { @EventHandler(priority = EventPriority.LOWEST) diff --git a/sayanvanish-bukkit/src/main/kotlin/org/sayandev/sayanvanish/bukkit/feature/features/prevent/FeaturePreventInteract.kt b/sayanvanish-bukkit/src/main/kotlin/org/sayandev/sayanvanish/bukkit/feature/features/prevent/FeaturePreventInteract.kt index 88ace531..b832b72b 100644 --- a/sayanvanish-bukkit/src/main/kotlin/org/sayandev/sayanvanish/bukkit/feature/features/prevent/FeaturePreventInteract.kt +++ b/sayanvanish-bukkit/src/main/kotlin/org/sayandev/sayanvanish/bukkit/feature/features/prevent/FeaturePreventInteract.kt @@ -1,24 +1,22 @@ package org.sayandev.sayanvanish.bukkit.feature.features.prevent -import org.bukkit.block.Chest import org.bukkit.block.Container import org.bukkit.event.EventHandler import org.bukkit.event.block.Action import org.bukkit.event.player.PlayerInteractEvent +import org.sayandev.sayanvanish.api.feature.Configurable import org.sayandev.sayanvanish.api.feature.RegisteredFeature import org.sayandev.sayanvanish.api.feature.category.FeatureCategories import org.sayandev.sayanvanish.bukkit.api.SayanVanishBukkitAPI.Companion.user import org.sayandev.sayanvanish.bukkit.feature.ListenedFeature -import org.sayandev.stickynote.bukkit.warn import org.sayandev.stickynote.lib.spongepowered.configurate.objectmapping.ConfigSerializable -import kotlin.text.contains @RegisteredFeature @ConfigSerializable class FeaturePreventInteract( - val pressurePlateTrigger: Boolean = true, - val dripLeaf: Boolean = true, - val interact: Boolean = true, + @Configurable val pressurePlateTrigger: Boolean = true, + @Configurable val dripLeaf: Boolean = true, + @Configurable val interact: Boolean = true, ) : ListenedFeature("prevent_interact_event", category = FeatureCategories.PREVENTION) { @EventHandler