Package io.papermc.paper.event.player
Class PlayerFailMoveEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
io.papermc.paper.event.player.PlayerFailMoveEvent
Runs when a player attempts to move, but is prevented from doing so by the server
- 
Nested Class SummaryNested ClassesNested classes/interfaces inherited from class org.bukkit.event.EventEvent.Result
- 
Field SummaryFields inherited from class org.bukkit.event.player.PlayerEventplayer
- 
Constructor SummaryConstructorsConstructorDescriptionPlayerFailMoveEvent(Player player, PlayerFailMoveEvent.FailReason failReason, boolean allowed, boolean logWarning, Location from, Location to) 
- 
Method SummaryModifier and TypeMethodDescriptionGets the reason this movement was prevented by the servergetFrom()Gets the location this player moved fromstatic HandlerListbooleanGets if warnings will be printed to console.getTo()Gets the location this player tried to move tobooleanGets if the check should be bypassed, allowing the movementvoidsetAllowed(boolean allowed) Set if the check should be bypassed and the movement should be allowedvoidsetLogWarning(boolean logWarning) Set if a warning is printed to console.Methods inherited from class org.bukkit.event.player.PlayerEventgetPlayerMethods inherited from class org.bukkit.event.EventcallEvent, getEventName, isAsynchronous
- 
Constructor Details- 
PlayerFailMoveEvent@Internal public PlayerFailMoveEvent(Player player, PlayerFailMoveEvent.FailReason failReason, boolean allowed, boolean logWarning, Location from, Location to) 
 
- 
- 
Method Details- 
getFailReasonGets the reason this movement was prevented by the server- Returns:
- The reason the movement was prevented
 
- 
getFromGets the location this player moved from- Returns:
- Location the player moved from
 
- 
getToGets the location this player tried to move to- Returns:
- Location the player tried to move to
 
- 
isAllowedpublic boolean isAllowed()Gets if the check should be bypassed, allowing the movement- Returns:
- whether to bypass the check
 
- 
setAllowedpublic void setAllowed(boolean allowed) Set if the check should be bypassed and the movement should be allowed- Parameters:
- allowed- whether to bypass the check
 
- 
getLogWarningpublic boolean getLogWarning()Gets if warnings will be printed to console. e.g. "Player123 moved too quickly!"- Returns:
- whether to log warnings
 
- 
setLogWarningpublic 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- Specified by:
- getHandlersin class- Event
 
- 
getHandlerList
 
-