Class ReceivePlayerInputPacketEvent

All Implemented Interfaces:
Cancellable

@NullMarked public final class ReceivePlayerInputPacketEvent extends ReceivePacketEvent implements Cancellable
서버가 클라이언트로부터 PacketType.Client.PLAYER_INPUT 패킷을 전달받았을 때 호출됩니다.
  • Constructor Details

    • ReceivePlayerInputPacketEvent

      @Internal public ReceivePlayerInputPacketEvent(Player who, float sideways, float forward, boolean jumping, boolean shiftKeyDown)
  • Method Details

    • getSideways

      public float getSideways()
      Gets sideways value.
      Returns:
      sideways value
    • setSideways

      public void setSideways(float sideways)
      Sets sideways value.
      Parameters:
      sideways - new sideways value
    • getForward

      public float getForward()
      Gets forward value.
      Returns:
      forward value
    • setForward

      public void setForward(float forward)
      Sets forward value.
      Parameters:
      forward - new forward value
    • isJumping

      public boolean isJumping()
      Gets jumping value.
      Returns:
      jumping value
    • setJumping

      public void setJumping(boolean jumping)
      Sets jumping value.
      Parameters:
      jumping - new jumping value
    • isShiftKeyDown

      public boolean isShiftKeyDown()
      Gets shiftKeyDown value.
      Returns:
      shiftKeyDown value
    • setShiftKeyDown

      public void setShiftKeyDown(boolean shiftKeyDown)
      Sets shiftKeyDown value.
      Parameters:
      shiftKeyDown - new shiftKeyDown value
    • isCancelled

      public boolean isCancelled()
      Description copied from interface: Cancellable
      Gets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins
      Specified by:
      isCancelled in interface Cancellable
      Returns:
      true if this event is cancelled
    • setCancelled

      public void setCancelled(boolean cancel)
      Description copied from interface: Cancellable
      Sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.
      Specified by:
      setCancelled in interface Cancellable
      Parameters:
      cancel - true if you wish to cancel this event
    • toString

      public String toString()
      Overrides:
      toString in class Object