From 6fef9c4eae31f270efe8d114512a121dad9c4298 Mon Sep 17 00:00:00 2001 From: William Date: Wed, 16 Nov 2022 22:40:23 +0000 Subject: [PATCH] Remove map itemstack debug logging mess --- .../java/net/william278/husksync/data/BukkitMapHandler.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bukkit/src/main/java/net/william278/husksync/data/BukkitMapHandler.java b/bukkit/src/main/java/net/william278/husksync/data/BukkitMapHandler.java index decae713..1b3bb234 100644 --- a/bukkit/src/main/java/net/william278/husksync/data/BukkitMapHandler.java +++ b/bukkit/src/main/java/net/william278/husksync/data/BukkitMapHandler.java @@ -81,17 +81,15 @@ public class BukkitMapHandler { return; } - plugin.getLoggingAdapter().debug("Setting map renderer for item stack " + itemStack); if (!itemStack.getItemMeta().getPersistentDataContainer().has(MAP_DATA_KEY, PersistentDataType.BYTE_ARRAY)) { return; } - plugin.getLoggingAdapter().debug("Map data found for item stack " + itemStack); try { final byte[] serializedData = itemStack.getItemMeta().getPersistentDataContainer() .get(MAP_DATA_KEY, PersistentDataType.BYTE_ARRAY); final MapData mapData = MapData.fromByteArray(Objects.requireNonNull(serializedData)); - plugin.getLoggingAdapter().debug("Deserialized map data for " + itemStack + " (" + mapData + ")"); + plugin.getLoggingAdapter().debug("Setting deserialized map data for an item stack"); // Create a new map view renderer with the map data color at each pixel final MapView view = Bukkit.createMap(Bukkit.getWorlds().get(0)); @@ -103,7 +101,7 @@ public class BukkitMapHandler { view.setUnlimitedTracking(false); mapMeta.setMapView(view); itemStack.setItemMeta(mapMeta); - plugin.getLoggingAdapter().debug("Set map renderer for item stack " + itemStack); + plugin.getLoggingAdapter().debug("Successfully applied renderer to map item stack"); } catch (IOException | NullPointerException e) { plugin.getLogger().log(Level.WARNING, "Failed to deserialize map data for a player", e); }