🐛 Fixed viewing issue
This commit is contained in:
parent
bfaa99e5dd
commit
a4f60fd01e
19 changed files with 71 additions and 74 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -92,3 +92,4 @@ buildNumber.properties
|
|||
.project
|
||||
# JDT-specific (Eclipse Java Development Tools)
|
||||
.classpath
|
||||
/.idea/copyright/
|
||||
|
|
36
API/pom.xml
36
API/pom.xml
|
@ -34,13 +34,6 @@
|
|||
|
||||
<artifactId>MapReflectionAPI-API</artifactId>
|
||||
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>nexus-snapshots</id>
|
||||
<url>https://repo.sbdevelopment.tech/repository/maven-snapshots/</url>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
|
||||
<properties>
|
||||
<jdk.version>11</jdk.version>
|
||||
</properties>
|
||||
|
@ -55,35 +48,6 @@
|
|||
<release>${jdk.version}</release>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<version>3.0.0-M2</version>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.sonatype.plugins</groupId>
|
||||
<artifactId>nexus-staging-maven-plugin</artifactId>
|
||||
<version>1.6.13</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>default-deploy</id>
|
||||
<phase>deploy</phase>
|
||||
<goals>
|
||||
<goal>deploy</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<serverId>nexus-snapshots</serverId>
|
||||
<nexusUrl>https://repo.sbdevelopment.tech/</nexusUrl>
|
||||
<skipStaging>true</skipStaging>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<resources>
|
||||
<resource>
|
||||
|
|
|
@ -27,6 +27,8 @@ import com.bergerkiller.bukkit.common.map.MapColorPalette;
|
|||
|
||||
import java.awt.*;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.util.Arrays;
|
||||
import java.util.Objects;
|
||||
|
||||
public class ArrayImage {
|
||||
public byte[] array;
|
||||
|
@ -53,7 +55,7 @@ public class ArrayImage {
|
|||
this.width = image.getWidth();
|
||||
this.height = image.getHeight();
|
||||
|
||||
BufferedImage temp = new BufferedImage(image.getWidth(null), image.getHeight(null), BufferedImage.TYPE_INT_ARGB);
|
||||
BufferedImage temp = new BufferedImage(image.getWidth(), image.getHeight(), BufferedImage.TYPE_INT_ARGB);
|
||||
Graphics2D graphics = temp.createGraphics();
|
||||
graphics.drawImage(image, 0, 0, null);
|
||||
graphics.dispose();
|
||||
|
@ -68,4 +70,33 @@ public class ArrayImage {
|
|||
|
||||
this.array = result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (!(o instanceof ArrayImage)) return false;
|
||||
ArrayImage that = (ArrayImage) o;
|
||||
return width == that.width && height == that.height && imageType == that.imageType && Arrays.equals(array, that.array);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = Objects.hash(width, height, imageType);
|
||||
result = 31 * result + Arrays.hashCode(array);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ArrayImage{" +
|
||||
"array=" + Arrays.toString(array) +
|
||||
", minX=" + minX +
|
||||
", minY=" + minY +
|
||||
", maxX=" + maxX +
|
||||
", maxY=" + maxY +
|
||||
", width=" + width +
|
||||
", height=" + height +
|
||||
", imageType=" + imageType +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -80,6 +80,7 @@ public class MapManager {
|
|||
return wrapper;
|
||||
} catch (NoSuchMethodException | InstantiationException | IllegalAccessException |
|
||||
InvocationTargetException e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ public class PacketListener_v1_12_R1 extends PacketListener {
|
|||
if (id < 0) {
|
||||
//It's one of our maps, invert ID and let through!
|
||||
int newId = -id;
|
||||
setField(packet, "a", newId); //mapId
|
||||
setField(packetPlayOutMap, "a", newId); //mapId
|
||||
} else {
|
||||
boolean async = !plugin.getServer().isPrimaryThread();
|
||||
MapCancelEvent event = new MapCancelEvent(p, id, async);
|
||||
|
|
|
@ -135,7 +135,7 @@ public class MapWrapper_v1_13_R2 extends MapWrapper {
|
|||
CraftPlayer craftPlayer = (CraftPlayer) player;
|
||||
int windowId = craftPlayer.getHandle().defaultContainer.windowId;
|
||||
|
||||
ItemStack stack = new ItemStack(Material.MAP, 1);
|
||||
ItemStack stack = new ItemStack(Material.FILLED_MAP, 1);
|
||||
net.minecraft.server.v1_13_R2.ItemStack nmsStack = CraftItemStack.asNMSCopy(stack);
|
||||
|
||||
PacketPlayOutSetSlot packet = new PacketPlayOutSetSlot(windowId, slot, nmsStack);
|
||||
|
@ -149,7 +149,7 @@ public class MapWrapper_v1_13_R2 extends MapWrapper {
|
|||
|
||||
@Override
|
||||
public void showInHand(Player player, boolean force) {
|
||||
if (player.getInventory().getItemInMainHand().getType() != Material.MAP && !force) return;
|
||||
if (player.getInventory().getItemInMainHand().getType() != Material.FILLED_MAP && !force) return;
|
||||
showInInventory(player, player.getInventory().getHeldItemSlot(), force);
|
||||
}
|
||||
|
||||
|
@ -165,7 +165,7 @@ public class MapWrapper_v1_13_R2 extends MapWrapper {
|
|||
|
||||
@Override
|
||||
public void showInFrame(Player player, ItemFrame frame, boolean force) {
|
||||
if (frame.getItem().getType() != Material.MAP && !force) return;
|
||||
if (frame.getItem().getType() != Material.FILLED_MAP && !force) return;
|
||||
showInFrame(player, frame.getEntityId());
|
||||
}
|
||||
|
||||
|
@ -178,7 +178,7 @@ public class MapWrapper_v1_13_R2 extends MapWrapper {
|
|||
public void showInFrame(Player player, int entityId, String debugInfo) {
|
||||
if (!isViewing(player)) return;
|
||||
|
||||
ItemStack stack = new ItemStack(Material.MAP, 1);
|
||||
ItemStack stack = new ItemStack(Material.FILLED_MAP, 1);
|
||||
if (debugInfo != null) {
|
||||
ItemMeta itemMeta = stack.getItemMeta();
|
||||
itemMeta.setDisplayName(debugInfo);
|
||||
|
|
|
@ -55,7 +55,7 @@ public class PacketListener_v1_13_R2 extends PacketListener {
|
|||
if (id < 0) {
|
||||
//It's one of our maps, invert ID and let through!
|
||||
int newId = -id;
|
||||
setField(packet, "a", newId); //mapId
|
||||
setField(packetPlayOutMap, "a", newId); //mapId
|
||||
} else {
|
||||
boolean async = !plugin.getServer().isPrimaryThread();
|
||||
MapCancelEvent event = new MapCancelEvent(p, id, async);
|
||||
|
|
|
@ -135,7 +135,7 @@ public class MapWrapper_v1_14_R1 extends MapWrapper {
|
|||
CraftPlayer craftPlayer = (CraftPlayer) player;
|
||||
int windowId = craftPlayer.getHandle().defaultContainer.windowId;
|
||||
|
||||
ItemStack stack = new ItemStack(Material.MAP, 1);
|
||||
ItemStack stack = new ItemStack(Material.FILLED_MAP, 1);
|
||||
net.minecraft.server.v1_14_R1.ItemStack nmsStack = CraftItemStack.asNMSCopy(stack);
|
||||
|
||||
PacketPlayOutSetSlot packet = new PacketPlayOutSetSlot(windowId, slot, nmsStack);
|
||||
|
@ -149,7 +149,7 @@ public class MapWrapper_v1_14_R1 extends MapWrapper {
|
|||
|
||||
@Override
|
||||
public void showInHand(Player player, boolean force) {
|
||||
if (player.getInventory().getItemInMainHand().getType() != Material.MAP && !force) return;
|
||||
if (player.getInventory().getItemInMainHand().getType() != Material.FILLED_MAP && !force) return;
|
||||
showInInventory(player, player.getInventory().getHeldItemSlot(), force);
|
||||
}
|
||||
|
||||
|
@ -165,7 +165,7 @@ public class MapWrapper_v1_14_R1 extends MapWrapper {
|
|||
|
||||
@Override
|
||||
public void showInFrame(Player player, ItemFrame frame, boolean force) {
|
||||
if (frame.getItem().getType() != Material.MAP && !force) return;
|
||||
if (frame.getItem().getType() != Material.FILLED_MAP && !force) return;
|
||||
showInFrame(player, frame.getEntityId());
|
||||
}
|
||||
|
||||
|
@ -178,7 +178,7 @@ public class MapWrapper_v1_14_R1 extends MapWrapper {
|
|||
public void showInFrame(Player player, int entityId, String debugInfo) {
|
||||
if (!isViewing(player)) return;
|
||||
|
||||
ItemStack stack = new ItemStack(Material.MAP, 1);
|
||||
ItemStack stack = new ItemStack(Material.FILLED_MAP, 1);
|
||||
if (debugInfo != null) {
|
||||
ItemMeta itemMeta = stack.getItemMeta();
|
||||
itemMeta.setDisplayName(debugInfo);
|
||||
|
|
|
@ -55,7 +55,7 @@ public class PacketListener_v1_14_R1 extends PacketListener {
|
|||
if (id < 0) {
|
||||
//It's one of our maps, invert ID and let through!
|
||||
int newId = -id;
|
||||
setField(packet, "a", newId); //mapId
|
||||
setField(packetPlayOutMap, "a", newId); //mapId
|
||||
} else {
|
||||
boolean async = !plugin.getServer().isPrimaryThread();
|
||||
MapCancelEvent event = new MapCancelEvent(p, id, async);
|
||||
|
|
|
@ -136,7 +136,7 @@ public class MapWrapper_v1_15_R1 extends MapWrapper {
|
|||
CraftPlayer craftPlayer = (CraftPlayer) player;
|
||||
int windowId = craftPlayer.getHandle().defaultContainer.windowId;
|
||||
|
||||
ItemStack stack = new ItemStack(Material.MAP, 1);
|
||||
ItemStack stack = new ItemStack(Material.FILLED_MAP, 1);
|
||||
net.minecraft.server.v1_15_R1.ItemStack nmsStack = CraftItemStack.asNMSCopy(stack);
|
||||
|
||||
PacketPlayOutSetSlot packet = new PacketPlayOutSetSlot(windowId, slot, nmsStack);
|
||||
|
@ -150,7 +150,7 @@ public class MapWrapper_v1_15_R1 extends MapWrapper {
|
|||
|
||||
@Override
|
||||
public void showInHand(Player player, boolean force) {
|
||||
if (player.getInventory().getItemInMainHand().getType() != Material.MAP && !force) return;
|
||||
if (player.getInventory().getItemInMainHand().getType() != Material.FILLED_MAP && !force) return;
|
||||
showInInventory(player, player.getInventory().getHeldItemSlot(), force);
|
||||
}
|
||||
|
||||
|
@ -166,7 +166,7 @@ public class MapWrapper_v1_15_R1 extends MapWrapper {
|
|||
|
||||
@Override
|
||||
public void showInFrame(Player player, ItemFrame frame, boolean force) {
|
||||
if (frame.getItem().getType() != Material.MAP && !force) return;
|
||||
if (frame.getItem().getType() != Material.FILLED_MAP && !force) return;
|
||||
showInFrame(player, frame.getEntityId());
|
||||
}
|
||||
|
||||
|
@ -179,7 +179,7 @@ public class MapWrapper_v1_15_R1 extends MapWrapper {
|
|||
public void showInFrame(Player player, int entityId, String debugInfo) {
|
||||
if (!isViewing(player)) return;
|
||||
|
||||
ItemStack stack = new ItemStack(Material.MAP, 1);
|
||||
ItemStack stack = new ItemStack(Material.FILLED_MAP, 1);
|
||||
if (debugInfo != null) {
|
||||
ItemMeta itemMeta = stack.getItemMeta();
|
||||
itemMeta.setDisplayName(debugInfo);
|
||||
|
|
|
@ -55,7 +55,7 @@ public class PacketListener_v1_15_R1 extends PacketListener {
|
|||
if (id < 0) {
|
||||
//It's one of our maps, invert ID and let through!
|
||||
int newId = -id;
|
||||
setField(packet, "a", newId); //mapId
|
||||
setField(packetPlayOutMap, "a", newId); //mapId
|
||||
} else {
|
||||
boolean async = !plugin.getServer().isPrimaryThread();
|
||||
MapCancelEvent event = new MapCancelEvent(p, id, async);
|
||||
|
|
|
@ -135,7 +135,7 @@ public class MapWrapper_v1_16_R3 extends MapWrapper {
|
|||
CraftPlayer craftPlayer = (CraftPlayer) player;
|
||||
int windowId = craftPlayer.getHandle().defaultContainer.windowId;
|
||||
|
||||
ItemStack stack = new ItemStack(Material.MAP, 1);
|
||||
ItemStack stack = new ItemStack(Material.FILLED_MAP, 1);
|
||||
net.minecraft.server.v1_16_R3.ItemStack nmsStack = CraftItemStack.asNMSCopy(stack);
|
||||
|
||||
PacketPlayOutSetSlot packet = new PacketPlayOutSetSlot(windowId, slot, nmsStack);
|
||||
|
@ -149,7 +149,7 @@ public class MapWrapper_v1_16_R3 extends MapWrapper {
|
|||
|
||||
@Override
|
||||
public void showInHand(Player player, boolean force) {
|
||||
if (player.getInventory().getItemInMainHand().getType() != Material.MAP && !force) return;
|
||||
if (player.getInventory().getItemInMainHand().getType() != Material.FILLED_MAP && !force) return;
|
||||
showInInventory(player, player.getInventory().getHeldItemSlot(), force);
|
||||
}
|
||||
|
||||
|
@ -165,7 +165,7 @@ public class MapWrapper_v1_16_R3 extends MapWrapper {
|
|||
|
||||
@Override
|
||||
public void showInFrame(Player player, ItemFrame frame, boolean force) {
|
||||
if (frame.getItem().getType() != Material.MAP && !force) return;
|
||||
if (frame.getItem().getType() != Material.FILLED_MAP && !force) return;
|
||||
showInFrame(player, frame.getEntityId());
|
||||
}
|
||||
|
||||
|
@ -178,7 +178,7 @@ public class MapWrapper_v1_16_R3 extends MapWrapper {
|
|||
public void showInFrame(Player player, int entityId, String debugInfo) {
|
||||
if (!isViewing(player)) return;
|
||||
|
||||
ItemStack stack = new ItemStack(Material.MAP, 1);
|
||||
ItemStack stack = new ItemStack(Material.FILLED_MAP, 1);
|
||||
if (debugInfo != null) {
|
||||
ItemMeta itemMeta = stack.getItemMeta();
|
||||
itemMeta.setDisplayName(debugInfo);
|
||||
|
|
|
@ -55,7 +55,7 @@ public class PacketListener_v1_16_R3 extends PacketListener {
|
|||
if (id < 0) {
|
||||
//It's one of our maps, invert ID and let through!
|
||||
int newId = -id;
|
||||
setField(packet, "a", newId); //mapId
|
||||
setField(packetPlayOutMap, "a", newId); //mapId
|
||||
} else {
|
||||
boolean async = !plugin.getServer().isPrimaryThread();
|
||||
MapCancelEvent event = new MapCancelEvent(p, id, async);
|
||||
|
|
|
@ -139,7 +139,7 @@ public class MapWrapper_v1_17_R1 extends MapWrapper {
|
|||
int windowId = craftPlayer.getHandle().bU.j; //inventoryMenu containerId
|
||||
int stateId = craftPlayer.getHandle().bU.getStateId(); //inventoryMenu getStateId()
|
||||
|
||||
ItemStack stack = new ItemStack(Material.MAP, 1);
|
||||
ItemStack stack = new ItemStack(Material.FILLED_MAP, 1);
|
||||
net.minecraft.world.item.ItemStack nmsStack = CraftItemStack.asNMSCopy(stack);
|
||||
|
||||
PacketPlayOutSetSlot packet = new PacketPlayOutSetSlot(windowId, stateId, slot, nmsStack);
|
||||
|
@ -153,7 +153,7 @@ public class MapWrapper_v1_17_R1 extends MapWrapper {
|
|||
|
||||
@Override
|
||||
public void showInHand(Player player, boolean force) {
|
||||
if (player.getInventory().getItemInMainHand().getType() != Material.MAP && !force) return;
|
||||
if (player.getInventory().getItemInMainHand().getType() != Material.FILLED_MAP && !force) return;
|
||||
showInInventory(player, player.getInventory().getHeldItemSlot(), force);
|
||||
}
|
||||
|
||||
|
@ -169,7 +169,7 @@ public class MapWrapper_v1_17_R1 extends MapWrapper {
|
|||
|
||||
@Override
|
||||
public void showInFrame(Player player, ItemFrame frame, boolean force) {
|
||||
if (frame.getItem().getType() != Material.MAP && !force) return;
|
||||
if (frame.getItem().getType() != Material.FILLED_MAP && !force) return;
|
||||
showInFrame(player, frame.getEntityId());
|
||||
}
|
||||
|
||||
|
@ -182,7 +182,7 @@ public class MapWrapper_v1_17_R1 extends MapWrapper {
|
|||
public void showInFrame(Player player, int entityId, String debugInfo) {
|
||||
if (!isViewing(player)) return;
|
||||
|
||||
ItemStack stack = new ItemStack(Material.MAP, 1);
|
||||
ItemStack stack = new ItemStack(Material.FILLED_MAP, 1);
|
||||
if (debugInfo != null) {
|
||||
ItemMeta itemMeta = stack.getItemMeta();
|
||||
itemMeta.setDisplayName(debugInfo);
|
||||
|
|
|
@ -58,7 +58,7 @@ public class PacketListener_v1_17_R1 extends PacketListener {
|
|||
if (id < 0) {
|
||||
//It's one of our maps, invert ID and let through!
|
||||
int newId = -id;
|
||||
setField(packet, "a", newId); //mapId
|
||||
setField(packetPlayOutMap, "a", newId); //mapId
|
||||
} else {
|
||||
boolean async = !plugin.getServer().isPrimaryThread();
|
||||
MapCancelEvent event = new MapCancelEvent(p, id, async);
|
||||
|
|
|
@ -139,7 +139,7 @@ public class MapWrapper_v1_18_R2 extends MapWrapper {
|
|||
int windowId = craftPlayer.getHandle().bU.j; //inventoryMenu containerId
|
||||
int stateId = craftPlayer.getHandle().bU.j(); //inventoryMenu getStateId()
|
||||
|
||||
ItemStack stack = new ItemStack(Material.MAP, 1);
|
||||
ItemStack stack = new ItemStack(Material.FILLED_MAP, 1);
|
||||
net.minecraft.world.item.ItemStack nmsStack = CraftItemStack.asNMSCopy(stack);
|
||||
|
||||
PacketPlayOutSetSlot packet = new PacketPlayOutSetSlot(windowId, stateId, slot, nmsStack);
|
||||
|
@ -153,7 +153,7 @@ public class MapWrapper_v1_18_R2 extends MapWrapper {
|
|||
|
||||
@Override
|
||||
public void showInHand(Player player, boolean force) {
|
||||
if (player.getInventory().getItemInMainHand().getType() != Material.MAP && !force) return;
|
||||
if (player.getInventory().getItemInMainHand().getType() != Material.FILLED_MAP && !force) return;
|
||||
showInInventory(player, player.getInventory().getHeldItemSlot(), force);
|
||||
}
|
||||
|
||||
|
@ -169,7 +169,7 @@ public class MapWrapper_v1_18_R2 extends MapWrapper {
|
|||
|
||||
@Override
|
||||
public void showInFrame(Player player, ItemFrame frame, boolean force) {
|
||||
if (frame.getItem().getType() != Material.MAP && !force) return;
|
||||
if (frame.getItem().getType() != Material.FILLED_MAP && !force) return;
|
||||
showInFrame(player, frame.getEntityId());
|
||||
}
|
||||
|
||||
|
@ -182,7 +182,7 @@ public class MapWrapper_v1_18_R2 extends MapWrapper {
|
|||
public void showInFrame(Player player, int entityId, String debugInfo) {
|
||||
if (!isViewing(player)) return;
|
||||
|
||||
ItemStack stack = new ItemStack(Material.MAP, 1);
|
||||
ItemStack stack = new ItemStack(Material.FILLED_MAP, 1);
|
||||
if (debugInfo != null) {
|
||||
ItemMeta itemMeta = stack.getItemMeta();
|
||||
itemMeta.setDisplayName(debugInfo);
|
||||
|
|
|
@ -58,7 +58,7 @@ public class PacketListener_v1_18_R2 extends PacketListener {
|
|||
if (id < 0) {
|
||||
//It's one of our maps, invert ID and let through!
|
||||
int newId = -id;
|
||||
setField(packet, "a", newId); //mapId
|
||||
setField(packetPlayOutMap, "a", newId); //mapId
|
||||
} else {
|
||||
boolean async = !plugin.getServer().isPrimaryThread();
|
||||
MapCancelEvent event = new MapCancelEvent(p, id, async);
|
||||
|
|
|
@ -139,7 +139,7 @@ public class MapWrapper_v1_19_R1 extends MapWrapper {
|
|||
int windowId = craftPlayer.getHandle().bT.j; //inventoryMenu containerId
|
||||
int stateId = craftPlayer.getHandle().bT.j(); //inventoryMenu getStateId()
|
||||
|
||||
ItemStack stack = new ItemStack(Material.MAP, 1);
|
||||
ItemStack stack = new ItemStack(Material.FILLED_MAP, 1);
|
||||
net.minecraft.world.item.ItemStack nmsStack = CraftItemStack.asNMSCopy(stack);
|
||||
|
||||
PacketPlayOutSetSlot packet = new PacketPlayOutSetSlot(windowId, stateId, slot, nmsStack);
|
||||
|
@ -153,7 +153,7 @@ public class MapWrapper_v1_19_R1 extends MapWrapper {
|
|||
|
||||
@Override
|
||||
public void showInHand(Player player, boolean force) {
|
||||
if (player.getInventory().getItemInMainHand().getType() != Material.MAP && !force) return;
|
||||
if (player.getInventory().getItemInMainHand().getType() != Material.FILLED_MAP && !force) return;
|
||||
showInInventory(player, player.getInventory().getHeldItemSlot(), force);
|
||||
}
|
||||
|
||||
|
@ -169,7 +169,7 @@ public class MapWrapper_v1_19_R1 extends MapWrapper {
|
|||
|
||||
@Override
|
||||
public void showInFrame(Player player, ItemFrame frame, boolean force) {
|
||||
if (frame.getItem().getType() != Material.MAP && !force) return;
|
||||
if (frame.getItem().getType() != Material.FILLED_MAP && !force) return;
|
||||
showInFrame(player, frame.getEntityId());
|
||||
}
|
||||
|
||||
|
@ -182,7 +182,7 @@ public class MapWrapper_v1_19_R1 extends MapWrapper {
|
|||
public void showInFrame(Player player, int entityId, String debugInfo) {
|
||||
if (!isViewing(player)) return;
|
||||
|
||||
ItemStack stack = new ItemStack(Material.MAP, 1);
|
||||
ItemStack stack = new ItemStack(Material.FILLED_MAP, 1);
|
||||
if (debugInfo != null) {
|
||||
ItemMeta itemMeta = stack.getItemMeta();
|
||||
itemMeta.setDisplayName(debugInfo);
|
||||
|
|
|
@ -58,7 +58,7 @@ public class PacketListener_v1_19_R1 extends PacketListener {
|
|||
if (id < 0) {
|
||||
//It's one of our maps, invert ID and let through!
|
||||
int newId = -id;
|
||||
setField(packet, "a", newId); //mapId
|
||||
setField(packetPlayOutMap, "a", newId); //mapId
|
||||
} else {
|
||||
boolean async = !plugin.getServer().isPrimaryThread();
|
||||
MapCancelEvent event = new MapCancelEvent(p, id, async);
|
||||
|
|
Loading…
Add table
Reference in a new issue