Hello, I've been trying to cancel the swing animation with packets.
Code:
It output <none> instead, I'm new to packets, so I have no idea if I'm doing this correctly. However I came across a thread on bukkit website.
I tried to implement a way with skript-mirror and ProtocolLib, here's my method
However still output <none> and I also have the .jar in my skript-mirror folder. I'm aware that it's a void method, but I don't know how I can work it with skript-mirror.
If you have any idea on how I can cancel the swing animation, please let me know! I been stuck for long time.
[doublepost=1568604814,1568525903][/doublepost]Close thread: Mission fucking impossible.
Code:
Code:
packet event play_client_arm_animation:
broadcast "%byte packet field 0 event-packet%"
It output <none> instead, I'm new to packets, so I have no idea if I'm doing this correctly. However I came across a thread on bukkit website.
Code:
public class ExampleMod extends JavaPlugin implements Listener {
@Override
public void onEnable() {
ProtocolLibrary.getProtocolManager().addPacketListener(
new PacketAdapter(this, ConnectionSide.SERVER_SIDE, Packets.Server.ARM_ANIMATION) {
@Override
public void onPacketSending(PacketEvent event) {
// This is the entity whose arm has just moved
Entity entity = event.getPacket().getEntityModifier(event.getPlayer().getWorld()).read(0);
int animation = event.getPacket().getIntegers().read(1);
// See if this is a "move arm" action
if (animation == 1) {
event.setCancelled(true);
}
}
});
}
}
I tried to implement a way with skript-mirror and ProtocolLib, here's my method
Code:
import:
com.comphenix.protocol.events.PacketAdapter
com.comphenix.protocol.events.PacketEvent as pEvent;
packet event play_client_arm_animation:
set {_packet} to new pEvent.PacketEvent(event-packet)
set {_t} to new PacketAdapter.onPacketSending({_packet})
broadcast "%{_t}%"
However still output <none> and I also have the .jar in my skript-mirror folder. I'm aware that it's a void method, but I don't know how I can work it with skript-mirror.
If you have any idea on how I can cancel the swing animation, please let me know! I been stuck for long time.
[doublepost=1568604814,1568525903][/doublepost]Close thread: Mission fucking impossible.