Class ResetMovedPlayerEvent
java.lang.Object
de.ellpeck.rockbottom.api.event.Event
de.ellpeck.rockbottom.api.event.impl.ResetMovedPlayerEvent
This event is fired when a simple calculation in the server results in the
AbstractPlayerEntity in question having moved farther than they
should be able to. If this event is not cancelled, the player will be reset
to the last calculated coordinates if the moved distance is greater than the
allowed distance. You can change the moved distance (that is squared,
however) or the allowed distance (which is not squared!) if you want the
player to be allowed to move further.-
Field Summary
FieldsModifier and TypeFieldDescriptiondoublefinal intDeprecated.doublefinal intDeprecated.final doublefinal doublefinal AbstractPlayerEntity -
Constructor Summary
ConstructorsConstructorDescriptionResetMovedPlayerEvent(AbstractPlayerEntity player, double lastCalcX, double lastCalcY, double distanceSqMoved, double allowedDefaultDistance) -
Method Summary
-
Field Details
-
player
-
lastCalcX
public final double lastCalcX -
lastCalcY
public final double lastCalcY -
fallingTicks
Deprecated.- See Also:
-
climbingTicks
Deprecated.- See Also:
-
distanceSqMoved
public double distanceSqMoved -
allowedDefaultDistance
public double allowedDefaultDistance
-
-
Constructor Details
-
ResetMovedPlayerEvent
public ResetMovedPlayerEvent(AbstractPlayerEntity player, double lastCalcX, double lastCalcY, double distanceSqMoved, double allowedDefaultDistance)
-