-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Bump InventoryGUI version to 4.6.0
Update log: - Upgrade PaperAPI version to 1.21.1 - Upgrade kotlin version to 2.0.0 - Now InventoryGUI must require to Java 21 - Add toMini() method to deserialize Adventure API MiniMessage - Add toOriginal() method to serialize Adventure API MiniMessage - Add Component.compareTo(comp: Component) method to compare two components - Upgrade shadow plugin version to 8.3.0 - Upgrade dokka plugin version to 1.9.20 - Compare component error fixed
- Loading branch information
Showing
8 changed files
with
87 additions
and
80 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget | ||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile | ||
|
||
plugins { | ||
|
@@ -7,7 +8,7 @@ plugins { | |
|
||
tasks { | ||
withType<KotlinCompile> { | ||
kotlinOptions.jvmTarget = "17" | ||
compilerOptions.jvmTarget.set(JvmTarget.JVM_21) | ||
} | ||
|
||
withType<Javadoc> { | ||
|
@@ -52,7 +53,7 @@ publishing { | |
pom { | ||
name.set(rootProject.name) | ||
description.set("This is minecraft gui library") | ||
url.set("https://github.com/devproje/InventoryGUI") | ||
url.set("https://github.com/project-official/InventoryGUI") | ||
licenses { | ||
license { | ||
name.set("GNU General Public License Version 3") | ||
|
@@ -62,14 +63,14 @@ publishing { | |
developers { | ||
developer { | ||
id.set("devproje") | ||
name.set("Project_TL") | ||
name.set("Project_IO") | ||
email.set("[email protected]") | ||
} | ||
} | ||
scm { | ||
connection.set("scm:git:https://github.com/devproje/InventoryGUI.git") | ||
developerConnection.set("scm:git:https://github.com/devproje/InventoryGUI.git") | ||
url.set("https://github.com/devproje/InventoryGUI.git") | ||
connection.set("scm:git:https://github.com/project-official/InventoryGUI.git") | ||
developerConnection.set("scm:git:https://github.com/project-official/InventoryGUI.git") | ||
url.set("https://github.com/project-official/InventoryGUI.git") | ||
} | ||
} | ||
} | ||
|
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
15 changes: 15 additions & 0 deletions
15
InventoryGUI-api/src/main/kotlin/net/projecttl/inventory/util/Component.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,15 @@ | ||
package net.projecttl.inventory.util | ||
|
||
import net.kyori.adventure.text.Component | ||
import net.kyori.adventure.text.minimessage.MiniMessage | ||
import net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer | ||
|
||
fun String.toMini(): Component = MiniMessage.miniMessage().deserialize(this) | ||
fun Component.toOriginal(): String = MiniMessage.miniMessage().serialize(this) | ||
|
||
fun Component.compareTo(comp: Component): Boolean { | ||
val original = PlainTextComponentSerializer.plainText().serialize(this) | ||
val target = PlainTextComponentSerializer.plainText().serialize(comp) | ||
|
||
return original.contains(target) | ||
} |
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