Skip to content

Commit

Permalink
fix double bars
Browse files Browse the repository at this point in the history
  • Loading branch information
SchnTgaiSpock committed Oct 29, 2024
1 parent 898b6cf commit 6ae257f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 14 deletions.
32 changes: 19 additions & 13 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.github.schntgaispock.slimehud</groupId>
<artifactId>SlimeHUD</artifactId>
<version>1.3.0</version>
<version>1.3.1</version>

<properties>
<maven.compiler.source>17</maven.compiler.source>
Expand Down Expand Up @@ -49,10 +49,22 @@
</resources>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.12.1</version>

<configuration>
<excludes>
<exclude>**/package-info.java</exclude>
</excludes>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.3.0</version>
<version>3.5.1</version>
<configuration>
<minimizeJar>true</minimizeJar>
<relocations>
Expand Down Expand Up @@ -97,7 +109,7 @@
<dependency>
<groupId>com.github.Slimefun</groupId>
<artifactId>Slimefun4</artifactId>
<version>RC-36</version>
<version>RC-37</version>
<scope>provided</scope>
<exclusions>
<exclusion>
Expand All @@ -124,14 +136,8 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.26</version>
</dependency>

<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>1.3.2</version>
<scope>compile</scope>
<version>1.18.30</version>
<scope>provided</scope>
</dependency>

<dependency>
Expand All @@ -143,7 +149,7 @@
<dependency>
<groupId>org.bstats</groupId>
<artifactId>bstats-bukkit</artifactId>
<version>3.0.0</version>
<version>3.0.2</version>
<scope>compile</scope>
</dependency>

Expand All @@ -154,4 +160,4 @@
<scope>provided</scope>
</dependency>
</dependencies>
</project>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,13 @@ public String processRequest(@Nonnull HudRequest request) {
return "";
} else {
String ret = handler.apply(request);
return ret == null ? "" : ret;
if (ret == null) return "";
if (ret.startsWith("&7| ")) {
ret = ret.replaceFirst("&7\\| ", "&7");
} else if (ret.startsWith("§7| ")) {
ret = ret.replaceFirst("§7\\| ", "&7");
}
return ret;
}
}

Expand Down

0 comments on commit 6ae257f

Please sign in to comment.