From 2f683c505476e6f470bd31fe1994539bda1eebe8 Mon Sep 17 00:00:00 2001 From: Danielle Voznyy Date: Mon, 6 Nov 2023 18:48:11 -0500 Subject: [PATCH] Paper plugin, geary 0.27.0 --- gradle.properties | 2 +- gradle/staminaLibs.versions.toml | 2 +- .../staminaclimb/StaminaClimbPlugin.kt | 20 +++++++------------ src/main/resources/paper-plugin.yml | 18 +++++++++++++++++ src/main/resources/plugin.yml | 15 -------------- 5 files changed, 27 insertions(+), 30 deletions(-) create mode 100644 src/main/resources/paper-plugin.yml delete mode 100644 src/main/resources/plugin.yml diff --git a/gradle.properties b/gradle.properties index 8b4d434..681e3ab 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ group=com.mineinabyss version=0.21 -idofrontVersion=0.19.14 +idofrontVersion=0.20.6 diff --git a/gradle/staminaLibs.versions.toml b/gradle/staminaLibs.versions.toml index 1435e50..ed2b24b 100644 --- a/gradle/staminaLibs.versions.toml +++ b/gradle/staminaLibs.versions.toml @@ -1,5 +1,5 @@ [versions] -geary = "0.26.0" +geary = "0.27.0" bonehurtingjuice = "1.10.0" [libraries] diff --git a/src/main/kotlin/com/mineinabyss/staminaclimb/StaminaClimbPlugin.kt b/src/main/kotlin/com/mineinabyss/staminaclimb/StaminaClimbPlugin.kt index 6dbfa76..f646ab4 100644 --- a/src/main/kotlin/com/mineinabyss/staminaclimb/StaminaClimbPlugin.kt +++ b/src/main/kotlin/com/mineinabyss/staminaclimb/StaminaClimbPlugin.kt @@ -1,10 +1,8 @@ package com.mineinabyss.staminaclimb -import com.mineinabyss.geary.addons.GearyPhase import com.mineinabyss.geary.autoscan.autoscan import com.mineinabyss.geary.modules.geary import com.mineinabyss.idofront.di.DI -import com.mineinabyss.idofront.platforms.Platforms import com.mineinabyss.idofront.plugin.listeners import com.mineinabyss.staminaclimb.climbing.ClimbBehaviour import com.mineinabyss.staminaclimb.climbing.ClimbBehaviour.stopClimbing @@ -20,26 +18,22 @@ import org.bukkit.plugin.java.JavaPlugin class StaminaClimbPlugin : JavaPlugin() { override fun onLoad() { - Platforms.load(this, "mineinabyss") + DI.add(StaminaPaperModule(this)) + geary { + autoscan(classLoader, "com.mineinabyss.staminaclimb") { + all() + } + } } override fun onEnable() { - DI.add(StaminaPaperModule(this)) + StaminaTask().runTaskTimer(this@StaminaClimbPlugin, 0, 1) // toggle system on for all online players (for plugin reload) Bukkit.getOnlinePlayers().forEach { registerBar(it) } listeners(ClimbBehaviour, StaminaBar) StaminaCommands() - - geary { - autoscan(classLoader, "com.mineinabyss.staminaclimb") { - all() - } - on(GearyPhase.ENABLE) { - StaminaTask().runTaskTimer(this@StaminaClimbPlugin, 0, 1) - } - } } override fun onDisable() { diff --git a/src/main/resources/paper-plugin.yml b/src/main/resources/paper-plugin.yml new file mode 100644 index 0000000..d9b34c6 --- /dev/null +++ b/src/main/resources/paper-plugin.yml @@ -0,0 +1,18 @@ +name: StaminaClimb +version: '${plugin_version}' +author: Offz +api-version: '1.20' +main: com.mineinabyss.staminaclimb.StaminaClimbPlugin +prefix: SnC +description: A mod that lets you climb and get exhausted + +dependencies: + server: + Geary: + required: true + load: BEFORE + join-classpath: true + BoneHurtingJuice: + required: false + load: BEFORE + join-classpath: true diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml deleted file mode 100644 index 240a637..0000000 --- a/src/main/resources/plugin.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: StaminaClimb -version: ${plugin_version} -author: Offz -api-version: '1.20' -main: com.mineinabyss.staminaclimb.StaminaClimbPlugin -softdepend: [ Geary, BoneHurtingJuice ] -prefix: SnC -description: A mod that lets you climb and get exhausted - -commands: - staminaclimb: - description: Main command for configuring the Stamina Climb plugin. - climb: - description: Toggles stamina and climbing system for player. - usage: /climb