SteamWar/FightSystem
Archiviert
13
1

Hotfix click recording
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2023-03-11 19:56:44 +01:00
Ursprung 5f7faabbff
Commit b9e87de241

Datei anzeigen

@ -19,7 +19,9 @@
package de.steamwar.fightsystem.listener; package de.steamwar.fightsystem.listener;
import com.comphenix.tinyprotocol.Reflection;
import com.comphenix.tinyprotocol.TinyProtocol; import com.comphenix.tinyprotocol.TinyProtocol;
import de.steamwar.core.Core;
import de.steamwar.fightsystem.Config; import de.steamwar.fightsystem.Config;
import de.steamwar.fightsystem.utils.CraftbukkitWrapper; import de.steamwar.fightsystem.utils.CraftbukkitWrapper;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
@ -40,6 +42,8 @@ public class ClickAnalyzer {
public ClickAnalyzer() { public ClickAnalyzer() {
TinyProtocol.instance.addFilter(Recording.blockPlacePacket, this::onBlockPlace); 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) { public Object onBlockPlace(Player player, Object packet) {