Skip to content

Commit

Permalink
Paper plugin, geary 0.27.0
Browse files Browse the repository at this point in the history
  • Loading branch information
0ffz committed Nov 6, 2023
1 parent 49925b4 commit 2f683c5
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 30 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
group=com.mineinabyss
version=0.21
idofrontVersion=0.19.14
idofrontVersion=0.20.6
2 changes: 1 addition & 1 deletion gradle/staminaLibs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[versions]
geary = "0.26.0"
geary = "0.27.0"
bonehurtingjuice = "1.10.0"

[libraries]
Expand Down
20 changes: 7 additions & 13 deletions src/main/kotlin/com/mineinabyss/staminaclimb/StaminaClimbPlugin.kt
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -20,26 +18,22 @@ import org.bukkit.plugin.java.JavaPlugin

class StaminaClimbPlugin : JavaPlugin() {
override fun onLoad() {
Platforms.load(this, "mineinabyss")
DI.add<StaminaClimbModule>(StaminaPaperModule(this))
geary {
autoscan(classLoader, "com.mineinabyss.staminaclimb") {
all()
}
}
}

override fun onEnable() {
DI.add<StaminaClimbModule>(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() {
Expand Down
18 changes: 18 additions & 0 deletions src/main/resources/paper-plugin.yml
Original file line number Diff line number Diff line change
@@ -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
15 changes: 0 additions & 15 deletions src/main/resources/plugin.yml

This file was deleted.

0 comments on commit 2f683c5

Please sign in to comment.