Skip to content

Commit

Permalink
4.3.2 tiny fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
CubBossa committed Jan 15, 2024
1 parent fde879b commit ff58d34
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Make sure to use the latest version.
<dependency>
<groupId>net.kyori</groupId>
<artifactId>adventure-platform-bukkit</artifactId>
<version>4.3.1</version>
<version>4.3.2</version>
</dependency>
<dependency>
<groupId>net.kyori</groupId>
Expand Down Expand Up @@ -110,7 +110,7 @@ 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.1
- 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
Expand Down
4 changes: 2 additions & 2 deletions TinyTranslations-bukkit/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>de.cubbossa</groupId>
<artifactId>TinyTranslations</artifactId>
<version>4.3.1</version>
<version>4.3.2</version>
</parent>

<artifactId>TinyTranslations-bukkit</artifactId>
Expand All @@ -28,7 +28,7 @@
<dependency>
<groupId>de.cubbossa</groupId>
<artifactId>TinyTranslations-common</artifactId>
<version>4.3.1</version>
<version>4.3.2</version>
</dependency>

<!--This adds the Spigot API artifact to the build -->
Expand Down
2 changes: 1 addition & 1 deletion TinyTranslations-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>de.cubbossa</groupId>
<artifactId>TinyTranslations</artifactId>
<version>4.3.1</version>
<version>4.3.2</version>
</parent>

<artifactId>TinyTranslations-common</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

import java.io.*;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
Expand Down Expand Up @@ -57,7 +58,7 @@ public void writeStyles(Map<String, MessageStyle> styles) {
}
}
Map<String, MessageStyle> present = loadStyles();
Map<String, String> toWrite = new HashMap<>();
Map<String, String> toWrite = new LinkedHashMap<>();
styles.forEach((s, messageStyle) -> {
if (!present.containsKey(s)) {
toWrite.put(s, messageStyle.getStringBackup());
Expand All @@ -80,7 +81,7 @@ public Map<String, MessageStyle> loadStyles() {
throw new RuntimeException(e);
}
}
Map<String, Object> map = new HashMap<>();
Map<String, Object> map = new LinkedHashMap<>();
try (FileInputStream fis = new FileInputStream(file)) {
Map<String, Object> content = yaml.load(fis);
if (content != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,20 @@ void parse() {

System.out.println(root.getText());
}

@Test
void parse2() {

NanoMessageTokenizer tokenizer = new NanoMessageTokenizer();
var tokens = tokenizer.tokenize("<red>content{abc ? a : b }</red>bbb");
NanoMessageParser parser = new NanoMessageParser(tokens);

var root = parser.parse();
StringBuilder b = new StringBuilder();
root.tree(b, 0);
System.out.println(b);
root.getChildren().get(0).getChildren().get(0).getChildren().get(1).replace("replaced");

System.out.println(root.getText());
}
}
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>de.cubbossa</groupId>
<artifactId>TinyTranslations</artifactId>
<version>4.3.1</version>
<version>4.3.2</version>
<packaging>pom</packaging>

<name>TinyTranslations</name>
Expand Down

0 comments on commit ff58d34

Please sign in to comment.