diff --git a/README.md b/README.md
index 770f684..ce4f2f9 100644
--- a/README.md
+++ b/README.md
@@ -36,26 +36,10 @@ Make sure to use the latest version.
de.cubbossa
- TinyTranslations
+
+ TinyTranslations-bukkit
[version]
-
-
-
- net.kyori
- adventure-api
- 4.14.0
-
-
- net.kyori
- adventure-platform-bukkit
- 4.3.2
-
-
- net.kyori
- adventure-text-minimessage
- 4.14.0
-
```
@@ -82,8 +66,8 @@ plugin can load the latest classes. Occurring errors would potentially disable y
- de.cubbossa.tinytranslationsde.cubbossa.tinytranslations
- [yourpluginpath].libs.translations
+ de.cubbossa.tinytranslations
+ [yourpluginpath].libs.tinytranslations
@@ -98,24 +82,15 @@ or with gradle:
```groovy
tasks.shadowJar {
minimize()
- relocate 'de.cubbossa.tinytranslations', '[yourpluginpath].libs.translations'
+ relocate 'de.cubbossa.tinytranslations', '[yourpluginpath].libs.tinytranslations'
}
```
### Dependencies (Spigot Libraries)
Your server must find and load the Kyori Adventure classes for Translations to work.
-Either also shade them or instead register them as Spigot Libraries.
-Therefore, go to your plugin.yml and add the section:
-```yml
-libraries:
- - net.kyori:adventure-api:4.14.0
- - net.kyori:adventure-platform-bukkit:4.3.2
- - net.kyori:adventure-text-minimessage:4.14.0
- - net.kyori:adventure-text-serializer-legacy:4.14.0
- - net.kyori:adventure-text-serializer-gson:4.14.0
- - net.kyori:adventure-text-serializer-plain:4.14.0
-```
+Either use `TinyTranslations-paper` to use the Adventure classes provided by paper or use
+`TinyTranslations-bukkit` to include them as shaded dependencies.
## Overview
@@ -197,10 +172,8 @@ class ExamplePlugin extends JavaPlugin {
Translations translations;
public void onEnable() {
- // Enable Framework
- TranslationsFramework.enable(new File(getDataFolder(), "/.."));
// create a Translations instance for your plugin
- translations = TranslationsFramework.application("MyPlugin");
+ translations = TinyTranslationsBukkit.application(this);
// define the storage types for your plugins locale
translations.setMessageStorage(new PropertiesMessageStorage(getLogger(), new File(getDataFolder(), "/lang/")));
@@ -230,7 +203,6 @@ class ExamplePlugin extends JavaPlugin {
public void onDisable() {
// close open Translations instance
translations.close();
- TranslationsFramework.disable();
}
}
```
diff --git a/TinyTranslations-bukkit-common/pom.xml b/TinyTranslations-bukkit-common/pom.xml
new file mode 100644
index 0000000..bcc05ea
--- /dev/null
+++ b/TinyTranslations-bukkit-common/pom.xml
@@ -0,0 +1,42 @@
+
+
+ 4.0.0
+
+ de.cubbossa
+ TinyTranslations
+ 4.3.3
+
+
+ TinyTranslations-bukkit-common
+
+
+ 17
+ 17
+ UTF-8
+
+
+
+
+ spigot-repo
+ https://hub.spigotmc.org/nexus/content/repositories/snapshots/
+
+
+
+
+
+ de.cubbossa
+ TinyTranslations-common
+ 4.3.3
+
+
+
+
+ org.spigotmc
+ spigot-api
+ 1.20.2-R0.1-SNAPSHOT
+ provided
+
+
+
\ No newline at end of file
diff --git a/TinyTranslations-bukkit/src/main/java/de/cubbossa/tinytranslations/BukkitGlobalMessages.java b/TinyTranslations-bukkit-common/src/main/java/de/cubbossa/tinytranslations/BukkitGlobalMessages.java
similarity index 100%
rename from TinyTranslations-bukkit/src/main/java/de/cubbossa/tinytranslations/BukkitGlobalMessages.java
rename to TinyTranslations-bukkit-common/src/main/java/de/cubbossa/tinytranslations/BukkitGlobalMessages.java
diff --git a/TinyTranslations-bukkit/src/main/java/de/cubbossa/tinytranslations/TinyTranslationsBukkit.java b/TinyTranslations-bukkit-common/src/main/java/de/cubbossa/tinytranslations/TinyTranslationsBukkit.java
similarity index 100%
rename from TinyTranslations-bukkit/src/main/java/de/cubbossa/tinytranslations/TinyTranslationsBukkit.java
rename to TinyTranslations-bukkit-common/src/main/java/de/cubbossa/tinytranslations/TinyTranslationsBukkit.java
diff --git a/TinyTranslations-bukkit/pom.xml b/TinyTranslations-bukkit/pom.xml
index 4e69c7b..c99c417 100644
--- a/TinyTranslations-bukkit/pom.xml
+++ b/TinyTranslations-bukkit/pom.xml
@@ -17,12 +17,54 @@
UTF-8
-
-
- spigot-repo
- https://hub.spigotmc.org/nexus/content/repositories/snapshots/
-
-
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.8.1
+
+
+ org.apache.maven.plugins
+ maven-shade-plugin
+ 3.5.0
+
+
+ package
+
+ shade
+
+
+
+
+ de.cubbossa:TinyTranslations-common
+ de.cubbossa:TinyTranslations-bukkit-common
+ net.kyori:adventure-api
+ net.kyori:adventure-platform-bukkit
+ net.kyori:adventure-text-minimessage
+ net.kyori:adventure-text-serializer-legacy
+ net.kyori:adventure-text-serializer-gson
+ net.kyori:adventure-text-serializer-plain
+
+
+
+
+ net.kyori
+ de.cubbossa.tinytranslations.libs.kyori
+
+
+
+
+
+
+
+
+
+ src/main/resources
+ true
+
+
+
@@ -30,13 +72,11 @@
TinyTranslations-common
4.3.3
-
-
- org.spigotmc
- spigot-api
- 1.20.2-R0.1-SNAPSHOT
- provided
+ de.cubbossa
+ TinyTranslations-bukkit-common
+ 4.3.3
+
\ No newline at end of file
diff --git a/TinyTranslations-paper/pom.xml b/TinyTranslations-paper/pom.xml
new file mode 100644
index 0000000..09944f9
--- /dev/null
+++ b/TinyTranslations-paper/pom.xml
@@ -0,0 +1,70 @@
+
+
+ 4.0.0
+
+ de.cubbossa
+ TinyTranslations
+ 4.3.3
+
+
+ TinyTranslations-paper
+
+
+ 17
+ 17
+ UTF-8
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.8.1
+
+
+ org.apache.maven.plugins
+ maven-shade-plugin
+ 3.5.0
+
+
+ package
+
+ shade
+
+
+
+
+ de.cubbossa:TinyTranslations-common
+ de.cubbossa:TinyTranslations-bukkit-common
+
+
+
+
+
+
+
+
+
+ src/main/resources
+ true
+
+
+
+
+
+
+
+ de.cubbossa
+ TinyTranslations-common
+ 4.3.3
+
+
+ de.cubbossa
+ TinyTranslations-bukkit-common
+ 4.3.3
+
+
+
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index d1ed7d0..e68cd8c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -12,6 +12,8 @@
TinyTranslations
TinyTranslations-common
+ TinyTranslations-bukkit-common
+ TinyTranslations-paper
TinyTranslations-bukkit