Skip to content

Commit

Permalink
Update to new idofront conventions, rename main plugin file
Browse files Browse the repository at this point in the history
  • Loading branch information
0ffz committed Oct 9, 2021
1 parent 823ddcc commit 2a10c18
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 17 deletions.
12 changes: 8 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import Com_mineinabyss_conventions_platform_gradle.Deps

val idofrontVersion: String by project

plugins {
id("com.mineinabyss.conventions.kotlin")
kotlin("plugin.serialization")
id("com.mineinabyss.conventions.papermc")
id("com.mineinabyss.conventions.slimjar")
id("com.mineinabyss.conventions.copyjar")
id("com.mineinabyss.conventions.publication")
id("com.mineinabyss.conventions.testing")
kotlin("plugin.serialization")
}

repositories {
Expand All @@ -29,9 +33,9 @@ dependencies {

// Download at runtime
slim(kotlin("stdlib-jdk8"))
slim("org.jetbrains.kotlinx:kotlinx-serialization-json")
slim("com.github.okkero:skedule")
slim("com.charleskorn.kaml:kaml")
slim(Deps.kotlinx.serialization.json)
slim(Deps.kotlinx.serialization.kaml)
slim(Deps.minecraft.skedule)

// Shaded
implementation("com.mineinabyss:idofront:$idofrontVersion")
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
group=com.derongan.minecraft
version=0.3
kotlinVersion=1.5.21
kotlinVersion=1.5.31
serverVersion=1.17.1-R0.1-SNAPSHOT
idofrontVersion=1.17.1-0.6.23
miaConventionsVersion=1.5.21-14
idofrontVersion=0.7.35
idofrontConventions=1.5.31-35
4 changes: 2 additions & 2 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ pluginManagement {
id("io.github.0ffz.github-packages") version "1.2.0"
}

val miaConventionsVersion: String by settings
val idofrontConventions: String by settings

resolutionStrategy {
eachPlugin {
if (requested.id.id.startsWith("com.mineinabyss.conventions"))
useVersion(miaConventionsVersion)
useVersion(idofrontConventions)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.derongan.minecraft.deeperworld

/**
* Easy access to information related to the [DeeperWorld] plugin.
* Easy access to information related to the [DeeperWorldPlugin] plugin.
*/
object DeeperContext {
val isBlockLockerLoaded: Boolean = deeperWorld.server.pluginManager.isPluginEnabled("BlockLocker")
val isFAWELoaded: Boolean = deeperWorld.server.pluginManager.isPluginEnabled("FastAsyncWorldEdit")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,18 @@ import com.derongan.minecraft.deeperworld.world.WorldManagerImpl
import com.mineinabyss.idofront.commands.execution.ExperimentalCommandDSL
import com.mineinabyss.idofront.plugin.registerEvents
import com.mineinabyss.idofront.plugin.registerService
import com.mineinabyss.idofront.slimjar.IdofrontSlimjar
import com.mineinabyss.idofront.slimjar.LibraryLoaderInjector
import com.okkero.skedule.schedule
import org.bukkit.Material
import org.bukkit.plugin.java.JavaPlugin

val protocolManager: ProtocolManager = ProtocolLibrary.getProtocolManager()

class DeeperWorld : JavaPlugin() {
class DeeperWorldPlugin : JavaPlugin() {
@ExperimentalCommandDSL
override fun onEnable() {
LibraryLoaderInjector.inject(this)
IdofrontSlimjar.loadToLibraryLoader(this)

saveDefaultConfig()

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/derongan/minecraft/deeperworld/Helpers.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ package com.derongan.minecraft.deeperworld
import org.bukkit.plugin.java.JavaPlugin

/**
* Gets [DeeperWorld] via Bukkit once, then sends that reference back afterwards
* Gets [DeeperWorldPlugin] via Bukkit once, then sends that reference back afterwards
*/
val deeperWorld: DeeperWorld by lazy { JavaPlugin.getPlugin(DeeperWorld::class.java) }
val deeperWorld: DeeperWorldPlugin by lazy { JavaPlugin.getPlugin(DeeperWorldPlugin::class.java) }
4 changes: 2 additions & 2 deletions src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: DeeperWorld
version: ${plugin_version}
main: com.derongan.minecraft.deeperworld.DeeperWorld
main: com.derongan.minecraft.deeperworld.DeeperWorldPlugin
authors: [Derongan]
api-version: '1.16'
description: A plugin for letting you create a deeper world. Or at least fake it.
Expand All @@ -19,4 +19,4 @@ permissions:
deeperworld.admin: true
deeperworld.admin:
description: Have power to use admin comands
default: op
default: op

0 comments on commit 2a10c18

Please sign in to comment.