diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index 5e75380..4460f2e 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -6,13 +6,13 @@
-
-
+
+
diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml
index 6d0ee1c..254a1fc 100644
--- a/.idea/kotlinc.xml
+++ b/.idea/kotlinc.xml
@@ -1,6 +1,6 @@
-
+
\ No newline at end of file
diff --git a/build.gradle.kts b/build.gradle.kts
index 32c242c..5524b75 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -1,10 +1,12 @@
plugins {
- kotlin("jvm") version "2.0.0"
- id("com.github.johnrengelman.shadow") version "7.1.2"
- id("io.papermc.paperweight.userdev") version "1.7.1"
+ kotlin("jvm") version "2.2.10"
+ id("com.gradleup.shadow") version "9.1.0"
+ id("io.papermc.paperweight.userdev") version "2.0.0-beta.18"
id("xyz.jpenilla.run-paper") version "2.3.0"
}
+val kotlin_version = "2.2.10"
+
group = "xyz.ineanto.dragon"
version = "1.1"
@@ -17,22 +19,19 @@ repositories {
dependencies {
// Spigot
- paperweight.paperDevBundle("1.21-R0.1-SNAPSHOT")
+ paperweight.paperDevBundle("1.21.8-R0.1-SNAPSHOT")
// Game Libraries
- compileOnly("xyz.xenondevs.invui:invui:1.33")
- compileOnly("xyz.xenondevs.invui:invui-kotlin:1.33")
+ compileOnly("xyz.xenondevs.invui:invui:1.46")
+ compileOnly("xyz.xenondevs.invui:invui-kotlin:1.46")
implementation("ru.brikster:glyphs-api:1.1.0")
implementation("ru.brikster:glyphs-resources:1.1.0")
- implementation("team.unnamed:creative-api:1.7.2")
- // Serializer for Minecraft format (ZIP / Folder)
- implementation("team.unnamed:creative-serializer-minecraft:1.7.2")
// Stdlib
- implementation("org.jetbrains.kotlin:kotlin-stdlib:2.0.0")
+ implementation("org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version")
// Commons IO
- implementation("commons-io:commons-io:2.11.0")
+ implementation("commons-io:commons-io:2.14.0")
}
kotlin {
@@ -41,6 +40,6 @@ kotlin {
tasks {
runServer {
- minecraftVersion("1.21")
+ minecraftVersion("1.21.8")
}
}
\ No newline at end of file
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 60c76b3..5c3b813 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
\ No newline at end of file
diff --git a/src/main/kotlin/xyz/ineanto/dragon/assets/Asset.kt b/src/main/kotlin/xyz/ineanto/dragon/assets/Asset.kt
new file mode 100644
index 0000000..6508a5f
--- /dev/null
+++ b/src/main/kotlin/xyz/ineanto/dragon/assets/Asset.kt
@@ -0,0 +1,13 @@
+package xyz.ineanto.dragon.assets
+
+data class Asset(
+ private val qualifier: String,
+ val name: String,
+ var path: String = "assets/${qualifier}/${name}.png"
+) {
+ class Icons {
+ companion object {
+ val DENY: Asset = Asset("icon", "deny")
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/main/kotlin/xyz/ineanto/dragon/inventory/TeamSelectionScreen.kt b/src/main/kotlin/xyz/ineanto/dragon/inventory/TeamSelectionScreen.kt
new file mode 100644
index 0000000..dd30739
--- /dev/null
+++ b/src/main/kotlin/xyz/ineanto/dragon/inventory/TeamSelectionScreen.kt
@@ -0,0 +1,70 @@
+package xyz.ineanto.dragon.inventory
+
+import net.kyori.adventure.key.Key
+import net.kyori.adventure.text.Component
+import net.kyori.adventure.text.format.NamedTextColor
+import net.kyori.adventure.text.format.TextDecoration
+import ru.brikster.glyphs.compile.GlyphCompiler
+import ru.brikster.glyphs.glyph.Glyph
+import ru.brikster.glyphs.glyph.GlyphComponentBuilder
+import ru.brikster.glyphs.glyph.GlyphComponentBuilder.PositionType
+import ru.brikster.glyphs.glyph.image.ImageGlyph
+import ru.brikster.glyphs.glyph.image.TextureProperties
+import ru.brikster.glyphs.glyph.space.mojang.MojangSpacesGlyph
+import ru.brikster.glyphs.resources.GlyphResources
+import team.unnamed.creative.texture.Texture
+
+class TeamSelectionScreen {
+ fun show() {
+ // Glyphs objects
+ var spaces = MojangSpacesGlyph.create()
+
+ var guiBackground = ImageGlyph.of(
+ Key.key(Glyph.DEFAULT_NAMESPACE, "gui/gui_background"),
+ Texture.of(
+ Key.key(Glyph.DEFAULT_NAMESPACE, "gui/gui_background"),
+ GlyphResources.resourceFromJar("gui_background.png")
+ ),
+ TextureProperties(/* height */ 256, /* ascent */ 19)
+ )
+
+ var exampleButton = ImageGlyph.of(
+ Key.key(Glyph.DEFAULT_NAMESPACE, "gui/example_button"),
+ Texture.of(
+ Key.key(Glyph.DEFAULT_NAMESPACE, "gui/example_button"),
+ GlyphResources.resourceFromJar("example_button.png")
+ ),
+ TextureProperties(/* height */ 22, /* ascent */ -56
+ )
+ )
+
+ var font = GlyphResources.minecraftFontGlyphCollection(
+ listOf(
+ TextureProperties(/* height */ 12, /* ascent */ -6),
+ TextureProperties(/* height */ 8, /* ascent */ -24
+ ),
+ TextureProperties(/* height */ 8, /* ascent */-36)
+ )
+ );
+
+ val resources = GlyphCompiler.instance()
+ .compile(spaces, guiBackground, exampleButton, font);
+ resources.addAll(GlyphResources.blankSlotResources());
+
+ //createResourcepack(resources)
+
+ val title = GlyphComponentBuilder.gui(spaces)
+ .append(guiBackground)
+ .append(/* position */ 131, exampleButton)
+ .append(/* position */ 16, font.translate(/* height */ 12, /* ascent */ -6, "Example text"))
+ .append(/* position */ 16, font.translate(/* height */ 8, /* ascent */ -24, "Hello "))
+ .append(PositionType.RELATIVE, font.translate(/* height */ 8, /* ascent */ -24, "world..."))
+ .append(
+ PositionType.ABSOLUTE, /* position */
+ 16,
+ font.translate(/* height */ 8, /* ascent */ -36, "Hello world...", NamedTextColor.LIGHT_PURPLE)
+ )
+ .build()
+ .append(Component.text("Test menu with glyphs", NamedTextColor.DARK_GRAY, TextDecoration.UNDERLINED))
+ }
+}
\ No newline at end of file