Skip to content

Commit

Permalink
Update PilotListener.java
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerS1066 committed Jun 23, 2024
1 parent 9491d3f commit 0d10a5a
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,17 @@ public void onCraftPilot(CraftDetectEvent event) {
if (direction == CruiseDirection.NONE) {
direction = currentDirection;
} else if (direction != currentDirection && requireCruiseSignAlignment) {
craft.getAudience().sendMessage(Component.text(ChatUtils.MOVECRAFT_COMMAND_PREFIX
// TODO: Remove cast when maven cache is cleared
((Audience) craft.getAudience()).sendMessage(Component.text(ChatUtils.MOVECRAFT_COMMAND_PREFIX
+ "Detection failed: All cruise signs must face the same way."));
event.setCancelled(true);
}
}
}

if (direction != CruiseDirection.NONE) {
if (!checkDimensions(craft.getHitBox(), direction, type, craft.getAudience())) {
// TODO: Remove cast when maven cache is cleared
if (!checkDimensions(craft.getHitBox(), direction, type, (Audience) craft.getAudience())) {
event.setCancelled(true);
return;
}
Expand Down

0 comments on commit 0d10a5a

Please sign in to comment.