antihunger and elytraflight compatibility

This commit is contained in:
Bella 2020-04-14 12:25:14 -04:00
parent 61b9da5977
commit 02be9df565
No known key found for this signature in database
GPG Key ID: DBD4A6030080C8B3
1 changed files with 2 additions and 3 deletions

View File

@ -25,9 +25,8 @@ public class AntiHunger extends Module {
@EventHandler
public Listener<PacketEvent.Send> packetListener = new Listener<>(event -> {
if (MODULE_MANAGER.getModule(ElytraFlight.class).isEnabled() && cancelMovementState.getValue()) {
sendChatMessage(getChatName() + "ElytraFlight is not compatible with the 'Cancel Movement State' option, disabling");
disable();
if (MODULE_MANAGER.getModule(ElytraFlight.class).isEnabled()) {
return;
}
if (event.getPacket() instanceof CPacketEntityAction) {
final CPacketEntityAction packet = (CPacketEntityAction) event.getPacket();