Fixed build issue

This commit is contained in:
Stijn Bannink 2023-07-05 19:29:23 +02:00
parent 230d7fc5b2
commit fa136c4955
2 changed files with 2 additions and 2 deletions

View file

@ -49,8 +49,7 @@ public class PacketListener_v1_19_R3 extends PacketListener {
//On send packet
public void write(ChannelHandlerContext ctx, Object packet, ChannelPromise promise) throws Exception {
if (packet instanceof PacketPlayOutMap packetPlayOutMap) {
int id = (int) getDeclaredField(packetPlayOutMap, "a");
int id = packetPlayOutMap.a(); //mapId
if (id < 0) {
//It's one of our maps, invert ID and let through!
int newId = -id;

View file

@ -127,6 +127,7 @@
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.20.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>