Skip to content

Commit 87f8401

Browse files
authored
Merge pull request #10 from Sayan-Development/1.21.3
add 1.21.3 support and update dependencies
2 parents 218da3c + 219499f commit 87f8401

File tree

7 files changed

+32
-12
lines changed

7 files changed

+32
-12
lines changed

build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
kotlin("jvm") version "2.0.0"
2+
kotlin("jvm") version "2.0.21"
33
`version-catalog`
44
`maven-publish`
55
}
@@ -8,7 +8,7 @@ val slug = "stickynote"
88

99
allprojects {
1010
group = "org.sayandev"
11-
version = "1.7.97"
11+
version = "1.7.108"
1212
description = "A modular Kotlin library for Minecraft: JE"
1313

1414
plugins.apply("maven-publish")
@@ -17,7 +17,7 @@ allprojects {
1717
plugins.apply("kotlin")
1818

1919
dependencies {
20-
compileOnly("org.jetbrains.kotlin:kotlin-stdlib:2.0.0")
20+
compileOnly("org.jetbrains.kotlin:kotlin-stdlib:2.0.21")
2121
}
2222

2323
tasks {

gradle/libs.versions.toml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[versions]
44
# core
5-
kotlin = "2.0.0"
5+
kotlin = "2.0.21"
66
kotlin-poet = "1.17.0"
77
snakeyaml = "2.2"
88
configurate = "4.1.2"
@@ -16,27 +16,28 @@ reflections = "0.10.2"
1616
hikari = "5.1.0"
1717
guava = "31.1-jre"
1818
gson = "2.10.1"
19-
kotlin-reflect = "2.0.0"
19+
kotlin-reflect = "2.0.21"
2020
netty = "4.1.111.Final"
2121
exposed = "0.53.0"
2222
libby = "2.0.0-SNAPSHOT"
2323
mccoroutines = "2.20.0"
2424
kotlinx-coroutines = "1.9.0-RC.2"
2525

2626
# minecraft
27-
adventure-platform = "4.3.3"
27+
adventure-platform = "4.3.4"
2828

2929
# bukkit
3030
paper = "1.21-R0.1-SNAPSHOT"
3131
folia = "1.20.4-R0.1-SNAPSHOT"
3232
inventoryframework = "0.10.15"
33-
xseries = "11.2.0"
33+
xseries = "11.3.0"
3434
pathetic-pathfinder-bukkit = "2.4.6"
3535
authlib = "6.0.54"
3636
skinsrestorer-api = "15.3.1"
3737
placeholderapi = "2.11.6"
3838

3939
# bukkit - nms
40+
packetevents-spigot = "2.6.0"
4041
takenaka = "1.2.0"
4142

4243
# proxy - velocity
@@ -70,6 +71,7 @@ netty-all = { group = "io.netty", name = "netty-all", version.ref = "netty" }
7071
exposed-core = { group = "org.jetbrains.exposed", name = "exposed-core", version.ref = "exposed" }
7172
exposed-jdbc = { group = "org.jetbrains.exposed", name = "exposed-jdbc",version.ref = "exposed" }
7273
exposed-dao = { group = "org.jetbrains.exposed", name = "exposed-dao",version.ref = "exposed" }
74+
exposed-kotlin-datetime = { group = "org.jetbrains.exposed", name = "exposed-kotlin-datetime",version.ref = "exposed" }
7375
libby = { group = "com.alessiodp.libby", name = "libby-core", version.ref = "libby" }
7476
kotlinx-coroutines = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" }
7577

@@ -94,6 +96,7 @@ mccoroutines-folia-api = { group = "com.github.shynixn.mccoroutine", name = "mcc
9496
mccoroutines-folia-core = { group = "com.github.shynixn.mccoroutine", name = "mccoroutine-folia-core", version.ref = "mccoroutines" }
9597

9698
# bukkit - nms
99+
packetevents-spigot = { group = "com.github.retrooper", name = "packetevents-spigot", version.ref = "packetevents-spigot" }
97100
takenaka = { group = "me.kcra.takenaka", name = "generator-accessor-runtime", version.ref = "takenaka" }
98101

99102
# proxy - velocity
@@ -139,6 +142,7 @@ implementation-core = [
139142
"exposed-core",
140143
"exposed-jdbc",
141144
"exposed-dao",
145+
"exposed-kotlin-datetime",
142146
"kotlinx-coroutines",
143147
"mysql-connector",
144148
"sqlite-jdbc"
@@ -156,7 +160,8 @@ implementation-bukkit = [
156160
"mccoroutines-folia-core",
157161
]
158162
implementation-bukkit-nms = [
159-
"takenaka"
163+
"takenaka",
164+
"packetevents-spigot"
160165
]
161166
implementation-proxy = [
162167
]

stickynote-bukkit/stickynote-bukkit-nms/build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ repositories {
2121
}
2222

2323
dependencies {
24+
api(libs.packetevents.spigot)
25+
2426
compileOnly(libs.paper)
2527

2628
compileOnly(project(":stickynote-core"))

stickynote-bukkit/stickynote-bukkit-nms/src/main/kotlin/org/sayandev/stickynote/bukkit/nms/skin/SkinUtils.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ object SkinUtils {
9595
signature = signatureMethod.invoke(property) as String
9696
}
9797

98-
return Skin(PlayerProfiles.getSkinValue(gameProfile)!!, signature)
98+
return Skin(PlayerProfiles.getTextureValue(gameProfile)!!, signature)
9999
}
100100

101101
/**

stickynote-loader/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
kotlin("jvm") version "2.0.0"
2+
kotlin("jvm") version "2.0.21"
33
`kotlin-dsl`
44
publishing
55
id("com.gradle.plugin-publish") version "1.2.1"
@@ -13,7 +13,7 @@ dependencies {
1313
api(libs.kotlin.poet.java)
1414

1515
implementation("com.gradleup.shadow:shadow-gradle-plugin:8.3.4")
16-
compileOnly("org.jetbrains.kotlin:kotlin-stdlib:2.0.0")
16+
compileOnly("org.jetbrains.kotlin:kotlin-stdlib:2.0.21")
1717
}
1818

1919
tasks {

stickynote-loader/src/main/kotlin/org/sayandev/plugin/StickyNoteProjectPlugin.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ class StickyNoteProjectPlugin : Plugin<Project> {
4747
target.dependencies.extensions.create("stickynote", StickyLoadDependencyExtension::class.java, target)
4848

4949
target.plugins.apply("com.gradleup.shadow")
50+
target.plugins.apply("java-library")
5051

5152
target.repositories {
5253
mavenLocal()
@@ -113,10 +114,14 @@ class StickyNoteProjectPlugin : Plugin<Project> {
113114
// relocate("com.alessiodp.libby", "${target.rootProject.group}.${target.rootProject.name.lowercase()}.lib.libby")
114115
// relocate("org.sqlite", "${target.rootProject.group}.${target.rootProject.name.lowercase()}.lib.sqlite")
115116
relocate("com.mysql", "${target.rootProject.group}.${target.rootProject.name.lowercase()}.lib.mysql")
116-
for (bundleAlias in libs.bundleAliases.filter { config.modules.get().map { "implementation.".plus(it.type.artifact.removePrefix("stickynote-")) }.contains(it) }) {
117+
for (bundleAlias in libs.bundleAliases.filter { config.modules.get().map { "implementation.".plus(it.type.artifact.removePrefix("stickynote-").replace("-", ".")) }.contains(it) }) {
117118
val bundle = libs.findBundle(bundleAlias).get().get()
118119
for (alias in bundle) {
119120
if (relocateExclusion.any { alias.module.name == it }) continue
121+
if (alias.module.name.contains("packetevents")) {
122+
relocate("io.github.retrooper", "${target.rootProject.group}.${target.rootProject.name.lowercase()}.lib.packetevents")
123+
continue
124+
}
120125
// We DON'T relocate adventure to keep compatibility with local paper/velocity adventure api calls
121126
if (alias.module.name.contains("adventure")) {
122127
// relocate("net.kyori.adventure.text.serializer", "${target.rootProject.group}.${target.rootProject.name.lowercase()}.lib.adventure.text.serializer")

stickynote-loader/stickynote-loader-common/src/main/java/org/sayandev/loader/common/StickyNoteLoader.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ public void load(String id, File dataFolder, Logger logger, LibraryManager libra
6868
}
6969
String name = cachedDependency.getName();
7070
String group = cachedDependency.getGroup();
71+
if (name.contains("packetevents")) {
72+
relocations.put("io{}github{}retrooper", relocationTo + "{}lib{}packetevents");
73+
continue;
74+
}
7175
if (cachedDependency.isStickyLoad()) {
7276
if (cachedDependency.getRelocation() != null) {
7377
String[] splitted = cachedDependency.getGroup().split("\\{}");
@@ -93,6 +97,10 @@ public void load(String id, File dataFolder, Logger logger, LibraryManager libra
9397
for (Dependency missingDependency : dependencies) {
9498
String name = missingDependency.getName();
9599
String group = missingDependency.getGroup();
100+
if (name.contains("packetevents")) {
101+
relocations.put("io{}github{}retrooper", relocationTo + "{}lib{}packetevents");
102+
continue;
103+
}
96104
if (missingDependency.isStickyLoad()) {
97105
if (missingDependency.getRelocation() != null) {
98106
String[] splitted = missingDependency.getGroup().split("\\{}");

0 commit comments

Comments
 (0)