Skip to content

Commit

Permalink
v3.10.2 b760
Browse files Browse the repository at this point in the history
* fix exception that sometimes occurs on 1.20 servers
  • Loading branch information
stumper66 committed Jun 10, 2023
1 parent edaa6ba commit c538312
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
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>me.lokka30</groupId>
<artifactId>LevelledMobs</artifactId>
<version>3.10.1 b759</version>
<version>3.10.2 b760</version>

<name>LevelledMobs</name>
<description>The Ultimate RPG Mob Levelling Solution</description>
Expand Down
10 changes: 8 additions & 2 deletions src/main/java/me/lokka30/levelledmobs/nametag/Definitions.java
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,14 @@ private void getMethodTextComponents() throws NoSuchMethodException {
// net.minecraft.network.chat.MutableComponent empty()

if (ver.getMinecraftVersion() >= 1.19) {
// 1.19.0 = g, 1.19.1+ = h
final String methodName = ver.getRevision() == 0 ? "g" : "h";
String methodName;
if (ver.getMinecraftVersion() >= 1.20){
methodName = "h";
}
else {
// 1.19.0 = g, 1.19.1+ = h
methodName = ver.getRevision() == 0 ? "g" : "h";
}

// net.minecraft.network.chat.Component ->
// net.minecraft.network.chat.MutableComponent empty()
Expand Down

0 comments on commit c538312

Please sign in to comment.