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.
feat(version-support): add 1.16.5 support & fix 1.21.4 paperweight is…
…sues
- Loading branch information
1 parent
24b41dd
commit 7c24950
Showing
70 changed files
with
1,037 additions
and
189 deletions.
There are no files selected for viewing
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
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
20 changes: 20 additions & 0 deletions
20
common/src/main/kotlin/com/undefined/stellar/util/ReflectionUtil.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,20 @@ | ||
@file:Suppress("UNCHECKED_CAST") | ||
@file:ApiStatus.Internal | ||
|
||
package com.undefined.stellar.util | ||
|
||
import org.jetbrains.annotations.ApiStatus | ||
|
||
object ReflectionUtil { | ||
fun <T : Any> getPrivateField(any: Class<*>, name: String): T = | ||
any::class.java.getDeclaredField(name).apply { isAccessible = true }[this] as T | ||
|
||
inline fun <reified T : Any, R> getPrivateMethod(name: String, vararg args: Any?): R = | ||
T::class.java.getDeclaredMethod(name).apply { isAccessible = true }(null, args) as R | ||
} | ||
|
||
fun <T : Any> Any.getPrivateField(name: String): T = | ||
javaClass.getDeclaredField(name).apply { isAccessible = true }[this] as T | ||
|
||
fun <T : Any> Any.executePrivateMethod(name: String, vararg args: Any?): T = | ||
javaClass.getDeclaredMethod(name).apply { isAccessible = true }(this, args) as T |
Binary file not shown.
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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Stellar | ||
version: '${version}' | ||
main: com.undefined.stellar.Main | ||
api-version: '1.17' | ||
api-version: '1.16' |
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
rootProject.name = "stellar" | ||
include("server", "api", "common", "v1_17", "v1_17_1", "v1_18_1", "v1_18_2", "v1_19_2", "v1_19_3", "v1_19_4", "v1_20", "v1_20_1", "v1_20_2", "v1_20_4", "v1_20_6", "v1_21", "v1_21_1", "v1_21_3", "v1_21_4") | ||
include("server", "api", "common", "v1_16_5", "v1_17", "v1_17_1", "v1_18_1", "v1_18_2", "v1_19_2", "v1_19_3", "v1_19_4", "v1_20", "v1_20_1", "v1_20_2", "v1_20_4", "v1_20_6", "v1_21", "v1_21_1", "v1_21_3", "v1_21_4") |
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,29 @@ | ||
plugins { | ||
kotlin("jvm") version "1.9.22" | ||
} | ||
|
||
repositories { | ||
mavenLocal() | ||
} | ||
|
||
dependencies { | ||
compileOnly("org.spigotmc:spigot:1.16.5-R0.1-SNAPSHOT") | ||
compileOnly(project(":common")) | ||
} | ||
|
||
tasks { | ||
compileKotlin { | ||
kotlinOptions.jvmTarget = "1.8" | ||
} | ||
compileJava { | ||
options.release.set(8) | ||
} | ||
} | ||
|
||
java { | ||
disableAutoTargetJvm() | ||
} | ||
|
||
kotlin { | ||
jvmToolchain(21) | ||
} |
Oops, something went wrong.