Skip to content

Commit

Permalink
Add support for noclip
Browse files Browse the repository at this point in the history
  • Loading branch information
Moulberry committed Oct 10, 2023
1 parent 3f613db commit c8f7c55
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/main/java/com/moulberry/axiom/AxiomPaper.java
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,12 @@ public void afterInitChannel(@NonNull Channel channel) {

@EventHandler
public void onFailMove(PlayerFailMoveEvent event) {
if (event.getPlayer().hasPermission("axiom.*") &&
event.getFailReason() == PlayerFailMoveEvent.FailReason.MOVED_TOO_QUICKLY) {
event.setAllowed(true);
if (event.getPlayer().hasPermission("axiom.*")) {
if (event.getFailReason() == PlayerFailMoveEvent.FailReason.MOVED_TOO_QUICKLY) {
event.setAllowed(true); // Support for arcball camera
} else if (event.getPlayer().isFlying()) {
event.setAllowed(true); // Support for noclip
}
}
}

Expand Down

0 comments on commit c8f7c55

Please sign in to comment.