From b9e87de241c7735909726fcf69641c51471ae148 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Sat, 11 Mar 2023 19:56:44 +0100 Subject: [PATCH] Hotfix click recording Signed-off-by: Lixfel --- .../src/de/steamwar/fightsystem/listener/ClickAnalyzer.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/FightSystem_Core/src/de/steamwar/fightsystem/listener/ClickAnalyzer.java b/FightSystem_Core/src/de/steamwar/fightsystem/listener/ClickAnalyzer.java index 9aea4b2..73e2afa 100644 --- a/FightSystem_Core/src/de/steamwar/fightsystem/listener/ClickAnalyzer.java +++ b/FightSystem_Core/src/de/steamwar/fightsystem/listener/ClickAnalyzer.java @@ -19,7 +19,9 @@ package de.steamwar.fightsystem.listener; +import com.comphenix.tinyprotocol.Reflection; import com.comphenix.tinyprotocol.TinyProtocol; +import de.steamwar.core.Core; import de.steamwar.fightsystem.Config; import de.steamwar.fightsystem.utils.CraftbukkitWrapper; import org.bukkit.entity.Player; @@ -40,6 +42,8 @@ public class ClickAnalyzer { public ClickAnalyzer() { TinyProtocol.instance.addFilter(Recording.blockPlacePacket, this::onBlockPlace); + if(Core.getVersion() > 8) + TinyProtocol.instance.addFilter(Reflection.getClass("{nms.network.protocol.game}.PacketPlayInUseItem"), this::onBlockPlace); } public Object onBlockPlace(Player player, Object packet) {