Hotfix for the show in hand feature, closes #20

This commit is contained in:
Stijn Bannink 2023-07-05 19:36:41 +02:00
parent 040a5014a4
commit 15640e5886
3 changed files with 6 additions and 4 deletions

View file

@ -16,7 +16,7 @@ First, include the API using Maven:
<dependency>
<groupId>tech.sbdevelopment</groupId>
<artifactId>MapReflectionAPI</artifactId>
<version>1.4.3</version>
<version>1.5.1</version>
<scope>provided</scope>
</dependency>
```

View file

@ -24,7 +24,7 @@
<groupId>tech.sbdevelopment</groupId>
<artifactId>MapReflectionAPI</artifactId>
<version>1.4.4</version>
<version>1.5.1</version>
<packaging>jar</packaging>
<name>MapReflectionAPI</name>
@ -161,7 +161,7 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.19.4-R0.1-SNAPSHOT</version>
<version>1.20.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>

View file

@ -302,7 +302,9 @@ public class MapWrapper extends AbstractMapWrapper {
if (ReflectionUtil.supports(13)) {
String nbtObjectName;
if (ReflectionUtil.supports(19)) { //1.19
if (ReflectionUtil.supports(20)) { //1.20
nbtObjectName = "w";
} else if (ReflectionUtil.supports(19)) { //1.19
nbtObjectName = "v";
} else if (ReflectionUtil.supports(18)) { //1.18
nbtObjectName = ReflectionUtil.VER_MINOR == 1 ? "t" : "u"; //1.18.1 = t, 1.18(.2) = u