Skip to content

Commit

Permalink
Migrate to Kotlin
Browse files Browse the repository at this point in the history
  • Loading branch information
esotericenderman committed Oct 30, 2024
1 parent c1045da commit 7b3425c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 14 deletions.
2 changes: 2 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ plugins {
id("xyz.jpenilla.resource-factory-bukkit-convention") version "1.2.0"
id("xyz.jpenilla.run-paper") version "2.3.1"
id("io.github.goooler.shadow") version "8.1.8"
kotlin("jvm")
}

description = "A template repository for easily developing Minecraft Paper plugins."
Expand Down Expand Up @@ -45,6 +46,7 @@ dependencies {
implementation("net.lingala.zip4j", "zip4j", "2.11.5")
implementation("com.github.EsotericFoundation:utility.kt:0.4.0")
implementation("com.github.EsotericFoundation:plugin-library:0.4.0")
implementation(kotlin("stdlib-jdk8"))
}

tasks {
Expand Down
6 changes: 6 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
pluginManagement {
plugins {
kotlin("jvm") version "2.0.21"
}
}

plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
package foundation.esoteric.minecraft.plugins.template;
package foundation.esoteric.minecraft.plugins.template

import dev.jorel.commandapi.CommandAPI;
import dev.jorel.commandapi.CommandAPIBukkitConfig;
import org.bukkit.plugin.java.JavaPlugin;
import dev.jorel.commandapi.CommandAPI
import dev.jorel.commandapi.CommandAPIBukkitConfig
import org.bukkit.plugin.java.JavaPlugin

public final class PaperTemplatePlugin extends JavaPlugin {
class PaperTemplatePlugin : JavaPlugin() {
override fun onEnable() {
dataFolder.mkdir()
saveDefaultConfig()

@Override
public void onEnable() {
getDataFolder().mkdir();
saveDefaultConfig();
val commandAPIConfig = CommandAPIBukkitConfig(this)

CommandAPIBukkitConfig commandAPIConfig = new CommandAPIBukkitConfig(this);

CommandAPI.onLoad(commandAPIConfig);
CommandAPI.onEnable();
}
CommandAPI.onLoad(commandAPIConfig)
CommandAPI.onEnable()
}
}

0 comments on commit 7b3425c

Please sign in to comment.