Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.

Commit

Permalink
Update to paper-plugin, bump idofront, geary
Browse files Browse the repository at this point in the history
  • Loading branch information
0ffz committed Nov 2, 2023
1 parent b1a0661 commit 9a6f547
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 27 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.22
idofrontVersion=0.19.14
idofrontVersion=0.20.6
2 changes: 1 addition & 1 deletion gradle/myLibs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[versions]
gearyPaper = "0.26.0"
gearyPaper = "0.27.0"

[libraries]
geary-papermc = { module = "com.mineinabyss:geary-papermc", version.ref = "gearyPaper" }
17 changes: 8 additions & 9 deletions src/main/kotlin/com/mineinabyss/mobzy/MobzyPlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import com.mineinabyss.geary.autoscan.autoscan
import com.mineinabyss.geary.modules.geary
import com.mineinabyss.idofront.config.config
import com.mineinabyss.idofront.di.DI
import com.mineinabyss.idofront.platforms.Platforms
import com.mineinabyss.idofront.plugin.ActionScope
import com.mineinabyss.idofront.plugin.Plugins
import com.mineinabyss.idofront.plugin.listeners
Expand All @@ -26,21 +25,13 @@ import org.bukkit.plugin.java.JavaPlugin

class MobzyPlugin : JavaPlugin() {
override fun onLoad() {
Platforms.load(this, "mineinabyss")
if (Bukkit.getPluginManager().getPlugin("WorldGuard") != null) {
val flags = WorldGuardSpawnFlags()
DI.add<WorldGuardSpawnFlags>(flags)
flags.registerFlags()
}
}

inline fun actions(run: ActionScope.() -> Unit) {
ActionScope().apply(run)
}

override fun onEnable() = actions {
createMobzyContext()
MobzyCommands()

geary {
if (mobzy.config.doMobSpawns) {
Expand All @@ -58,6 +49,14 @@ class MobzyPlugin : JavaPlugin() {
install(ModelEngineSupport)
}
}
}

inline fun actions(run: ActionScope.() -> Unit) {
ActionScope().apply(run)
}

override fun onEnable() = actions {
MobzyCommands()

listeners(
PreventBreedingSystem(),
Expand Down
23 changes: 23 additions & 0 deletions src/main/resources/paper-plugin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Mobzy
version: "${plugin_version}"
author: Offz
main: com.mineinabyss.mobzy.MobzyPlugin
api-version: "1.20"

prefix: Mobzy
description: A custom entities API

dependencies:
server:
Geary:
required: true
load: BEFORE
join-classpath: true
ModelEngine:
required: false
load: BEFORE
join-classpath: true
WorldGuard:
required: false
load: BEFORE
join-classpath: true
16 changes: 0 additions & 16 deletions src/main/resources/plugin.yml

This file was deleted.

0 comments on commit 9a6f547

Please sign in to comment.