9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-29 20:09:13 +00:00

Reduce plugin size

This commit is contained in:
XiaoMoMi
2025-02-12 00:56:19 +08:00
parent 119180d619
commit 88e809395d
6 changed files with 34 additions and 7 deletions

View File

@@ -19,8 +19,8 @@ dependencies {
implementation("com.github.Xiao-MoMi:sparrow-nbt:${rootProject.properties["sparrow_nbt_version"]}")
// Adventure
implementation("net.kyori:adventure-api:${rootProject.properties["adventure_bundle_version"]}")
implementation("net.kyori:adventure-text-minimessage:${rootProject.properties["adventure_bundle_version"]}")
implementation("net.kyori:adventure-text-serializer-gson:${rootProject.properties["adventure_bundle_version"]}") {
compileOnly("net.kyori:adventure-text-minimessage:${rootProject.properties["adventure_bundle_version"]}")
compileOnly("net.kyori:adventure-text-serializer-gson:${rootProject.properties["adventure_bundle_version"]}") {
exclude("com.google.code.gson", "gson")
}
// Command

View File

@@ -135,7 +135,10 @@ public abstract class CraftEngine implements Plugin {
Dependencies.ZSTD,
Dependencies.BYTE_BUDDY,
Dependencies.SNAKE_YAML,
Dependencies.BOOSTED_YAML
Dependencies.BOOSTED_YAML,
Dependencies.MINIMESSAGE,
Dependencies.TEXT_SERIALIZER_GSON,
Dependencies.TEXT_SERIALIZER_JSON
);
}

View File

@@ -179,4 +179,25 @@ public class Dependencies {
"snakeyaml",
List.of(Relocation.of("snakeyaml", "org{}yaml{}snakeyaml"))
);
public static final Dependency MINIMESSAGE = new Dependency(
"adventure-text-minimessage",
"net{}kyori",
"adventure-text-minimessage",
"adventure-text-minimessage",
List.of(Relocation.of("adventure", "net{}kyori{}adventure"))
);
public static final Dependency TEXT_SERIALIZER_GSON = new Dependency(
"adventure-text-serializer-gson",
"net{}kyori",
"adventure-text-serializer-gson",
"adventure-text-serializer-gson",
List.of(Relocation.of("adventure", "net{}kyori{}adventure"))
);
public static final Dependency TEXT_SERIALIZER_JSON = new Dependency(
"adventure-text-serializer-json",
"net{}kyori",
"adventure-text-serializer-json",
"adventure-text-serializer-json",
List.of(Relocation.of("adventure", "net{}kyori{}adventure"))
);
}