generated from UndefinedCreations/Template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4b9612c
commit 4ad7ab7
Showing
207 changed files
with
1,606 additions
and
466 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
plugins { | ||
`java-library` | ||
kotlin("jvm") version "1.9.22" | ||
id("com.gradleup.shadow") version "8.3.5" | ||
} | ||
|
||
repositories { | ||
maven("https://repo.papermc.io/repository/maven-public/") | ||
} | ||
|
||
val versionVar = version | ||
val groupIdVar = "com.undefined" | ||
val artifactIdVar = "stellar" | ||
|
||
group = groupIdVar | ||
version = versionVar | ||
|
||
publishing { | ||
repositories { | ||
maven { | ||
name = "UndefinedCreations" | ||
url = uri("https://repo.undefinedcreations.com/releases") | ||
credentials(PasswordCredentials::class) { | ||
username = System.getenv("MAVEN_NAME") | ||
password = System.getenv("MAVEN_SECRET") | ||
} | ||
} | ||
} | ||
publications { | ||
register<MavenPublication>("maven") { | ||
groupId = groupIdVar | ||
artifactId = artifactIdVar | ||
version = versionVar.toString() | ||
|
||
from(components["java"]) | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
compileOnly("io.papermc.paper:paper-api:1.21.3-R0.1-SNAPSHOT") | ||
implementation(project(":paper:common")) | ||
implementation(project(":paper:v1_17_1")) | ||
implementation(kotlin("reflect")) | ||
} | ||
|
||
tasks { | ||
shadowJar { | ||
archiveClassifier = "paper" | ||
} | ||
compileKotlin { | ||
kotlinOptions.jvmTarget = "1.8" | ||
} | ||
compileJava { | ||
options.release = 8 | ||
} | ||
} | ||
|
||
kotlin { | ||
jvmToolchain(21) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,4 +39,4 @@ abstract class BaseStellarCommand(val name: String, val description: String = "" | |
hasBeenRegistered = true | ||
} | ||
|
||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
22 changes: 22 additions & 0 deletions
22
paper/api/src/main/kotlin/com/undefined/stellar/manager/CommandManager.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.undefined.stellar.manager | ||
|
||
import com.undefined.stellar.listener.StellarListener | ||
import com.undefined.stellar.registrar.AbstractCommandRegistrar | ||
import org.bukkit.Bukkit | ||
import org.bukkit.plugin.java.JavaPlugin | ||
import org.jetbrains.annotations.ApiStatus | ||
import kotlin.reflect.KClass | ||
|
||
@ApiStatus.Internal | ||
object CommandManager { | ||
val registrars: Map<String, KClass<out AbstractCommandRegistrar>> = mapOf( | ||
"1.17.1" to com.undefined.stellar.v1_17_1.CommandRegistrar::class, | ||
) | ||
|
||
private val initializedPlugins: MutableList<JavaPlugin> = mutableListOf() | ||
fun initialize(plugin: JavaPlugin) { | ||
if (initializedPlugins.contains(plugin)) return | ||
initializedPlugins.add(plugin) | ||
Bukkit.getPluginManager().registerEvents(StellarListener, plugin) | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
plugins { | ||
java | ||
kotlin("jvm") version "1.9.22" | ||
id("com.gradleup.shadow") version "8.3.5" | ||
id("io.papermc.paperweight.userdev") version "2.0.0-beta.13" apply false | ||
} | ||
|
||
allprojects { | ||
repositories { | ||
maven("https://repo.papermc.io/repository/maven-public/") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
plugins { | ||
kotlin("jvm") version "1.9.22" | ||
} | ||
|
||
repositories { | ||
maven("https://repo.papermc.io/repository/maven-public/") | ||
} | ||
|
||
dependencies { | ||
compileOnly("io.papermc.paper:paper-api:1.21.3-R0.1-SNAPSHOT") | ||
api("com.mojang:authlib:1.5.21") | ||
api(project(":common")) | ||
} | ||
|
||
tasks { | ||
compileKotlin { | ||
kotlinOptions.jvmTarget = "1.8" | ||
} | ||
compileJava { | ||
options.release = 8 | ||
} | ||
} | ||
|
||
java { | ||
disableAutoTargetJvm() | ||
} | ||
|
||
kotlin { | ||
jvmToolchain(21) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.