Class PlayerFailMoveEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
io.papermc.paper.event.player.PlayerFailMoveEvent

@NullMarked public class PlayerFailMoveEvent extends PlayerEvent
Runs when a player attempts to move, but is prevented from doing so by the server
  • Constructor Details

  • Method Details

    • getFailReason

      public PlayerFailMoveEvent.FailReason getFailReason()
      Gets the reason this movement was prevented by the server
      Returns:
      The reason the movement was prevented
    • getFrom

      public Location getFrom()
      Gets the location this player moved from
      Returns:
      Location the player moved from
    • getTo

      public Location getTo()
      Gets the location this player tried to move to
      Returns:
      Location the player tried to move to
    • isAllowed

      public boolean isAllowed()
      Gets if the check should be bypassed, allowing the movement
      Returns:
      whether to bypass the check
    • setAllowed

      public void setAllowed(boolean allowed)
      Set if the check should be bypassed and the movement should be allowed
      Parameters:
      allowed - whether to bypass the check
    • getLogWarning

      public boolean getLogWarning()
      Gets if warnings will be printed to console. e.g. "Player123 moved too quickly!"
      Returns:
      whether to log warnings
    • setLogWarning

      public void setLogWarning(boolean logWarning)
      Set if a warning is printed to console. e.g. "Player123 moved too quickly!"
      Parameters:
      logWarning - whether to log warnings
    • getHandlers

      public HandlerList getHandlers()
      Specified by:
      getHandlers in class Event
    • getHandlerList

      public static HandlerList getHandlerList()