Skip to content

Commit

Permalink
Update jitpack
Browse files Browse the repository at this point in the history
  • Loading branch information
divios committed Jan 13, 2022
1 parent c4bd7c0 commit 6173b09
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
apply plugin: 'maven-publish'

group = 'io.github.divios'
version = '2.2'
version = '2.4'

sourceCompatibility = 1.8 // java 8
targetCompatibility = 1.8
Expand Down Expand Up @@ -60,6 +60,7 @@ publishing {
mavenJava(MavenPublication) {
groupId = 'com.github.divios'
artifactId = 'jText'
version = version

from components.java
}
Expand Down
10 changes: 7 additions & 3 deletions src/main/java/io/github/divios/jtext/parsers/miniTextParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,26 @@ public miniTextParser() {
}

public String parse(final String s) {
if (!adventureIsInstalled()) return s;
System.out.println("Trying to parse with miniText");
if (builder == null) return s;
System.out.println("Parsed with miniText");
return LegacyComponentSerializer.legacyAmpersand().serialize(
builder.parse(s));
}

public String unParse(final String s) {
if (!adventureIsInstalled()) return null;
if (builder == null) return null;
return null;
}

private boolean adventureIsInstalled() {
try {
Class.forName(" net.kyori.adventure");
Class.forName("net.kyori.adventure");
} catch (ClassNotFoundException e) {
System.out.println("Adventure not found");
return false;
}
System.out.println("Adventure found");
return true;
}

Expand Down

0 comments on commit 6173b09

Please sign in to comment.