From 2c4e7ae893f56e61301a46383632546fc6979984 Mon Sep 17 00:00:00 2001 From: Ghost_chu <2908803755@qq.com> Date: Sun, 20 Jun 2021 10:25:59 +0800 Subject: [PATCH] debug vdisplay --- pom.xml | 6 ++++++ .../org/maxgamer/quickshop/shop/VirtualDisplayItem.java | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/pom.xml b/pom.xml index a3cb6f108..0e2c08b11 100644 --- a/pom.xml +++ b/pom.xml @@ -915,5 +915,11 @@ + + org.projectlombok + lombok + 1.18.20 + provided + diff --git a/src/main/java/org/maxgamer/quickshop/shop/VirtualDisplayItem.java b/src/main/java/org/maxgamer/quickshop/shop/VirtualDisplayItem.java index e92c6373c..dd31e05a1 100644 --- a/src/main/java/org/maxgamer/quickshop/shop/VirtualDisplayItem.java +++ b/src/main/java/org/maxgamer/quickshop/shop/VirtualDisplayItem.java @@ -240,16 +240,20 @@ public class VirtualDisplayItem extends DisplayItem { public void onPacketSending(@NotNull PacketEvent event) { //is really full chunk data //In 1.17, this value was removed, so read safely + Util.debugLog("SENDING: " + event); Boolean boxedIsFull = event.getPacket().getBooleans().readSafely(0); boolean isFull = boxedIsFull == null || boxedIsFull; if (!shop.isLoaded() || !isDisplay || !isFull || shop.isLeftShop()) { + Util.debugLog("MapChunk processing skipped: shop loaded: " + shop.isLoaded() + " isdisplay: " + isDisplay + " isfull: " + isFull + " isleftshop: " + shop.isLeftShop()); return; } Player player = event.getPlayer(); if (player instanceof TemporaryPlayer) { + Util.debugLog("MapChunk processing skipped: TemporaryPlayer"); return; } if (player == null || !player.isOnline()) { + Util.debugLog("MapChunk processing skipped: Invalid player"); return; } StructureModifier integerStructureModifier = event.getPacket().getIntegers();