Class ResetMovedPlayerEvent

java.lang.Object
de.ellpeck.rockbottom.api.event.Event
de.ellpeck.rockbottom.api.event.impl.ResetMovedPlayerEvent

public final class ResetMovedPlayerEvent extends Event
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 Details

    • player

      public final AbstractPlayerEntity player
    • lastCalcX

      public final double lastCalcX
    • lastCalcY

      public final double lastCalcY
    • fallingTicks

      @Deprecated public final int fallingTicks
      Deprecated.
      See Also:
    • climbingTicks

      @Deprecated public final int 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)