Add support for noclip

Dieser Commit ist enthalten in:
Moulberry 2023-10-10 13:56:08 +08:00
Ursprung 3f613db359
Commit c8f7c55138

Datei anzeigen

@ -127,9 +127,12 @@ public class AxiomPaper extends JavaPlugin implements Listener {
@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
}
}
}