Fix a null error
This commit is contained in:
parent
7e099a985c
commit
a032155f5b
@ -75,9 +75,13 @@ public class PacketListenerClientInteract extends PacketAdapter {
|
||||
|
||||
private EnumWrappers.Hand getHand(PacketContainer packet) {
|
||||
if (!NmsVersion.v1_17.isSupported()) {
|
||||
if (getInteractType(packet) != EnumWrappers.EntityUseAction.ATTACK) {
|
||||
return packet.getHands().read(0);
|
||||
}
|
||||
|
||||
return EnumWrappers.Hand.MAIN_HAND;
|
||||
}
|
||||
|
||||
WrappedEnumEntityUseAction action = packet.getEnumEntityUseActions().read(0);
|
||||
|
||||
if (action.getAction() == EnumWrappers.EntityUseAction.ATTACK) {
|
||||
|
Loading…
Reference in New Issue
Block a user