From 2d2b4704dcf70c9847b5011bbc1b3d3479cc6a7d Mon Sep 17 00:00:00 2001 From: DoctorMacc Date: Mon, 6 Apr 2020 20:57:26 -0400 Subject: [PATCH] Potential error spam fix --- .../translators/java/world/JavaMapDataTranslator.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/connector/src/main/java/org/geysermc/connector/network/translators/java/world/JavaMapDataTranslator.java b/connector/src/main/java/org/geysermc/connector/network/translators/java/world/JavaMapDataTranslator.java index ccf3e209..d38b881d 100644 --- a/connector/src/main/java/org/geysermc/connector/network/translators/java/world/JavaMapDataTranslator.java +++ b/connector/src/main/java/org/geysermc/connector/network/translators/java/world/JavaMapDataTranslator.java @@ -40,7 +40,10 @@ public class JavaMapDataTranslator extends PacketTranslator ClientboundMapItemDataPacket mapItemDataPacket = new ClientboundMapItemDataPacket(); mapItemDataPacket.setUniqueMapId(packet.getMapId()); - mapItemDataPacket.setDimensionId(session.getLastDimPacket().getDimension()); + if (session.getLastDimPacket() == null) { + System.out.println("Dimension is null"); + mapItemDataPacket.setDimensionId(0); + } else mapItemDataPacket.setDimensionId(session.getLastDimPacket().getDimension()); mapItemDataPacket.setLocked(packet.isLocked()); mapItemDataPacket.setScale(packet.getScale());