java.lang.Object
nl.sbdeveloper.vehiclesplus.api.vehicles.movement.MovementInput

public class MovementInput extends Object
Represents the input of a player. Constructed in the listener for movement in the plugin.
  • Constructor Summary

    Constructors
    Constructor
    Description
    MovementInput(boolean w, boolean a, boolean s, boolean d, boolean space, boolean shift)
    Creates a new MovementInput instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    isA()
    The left key is pressed.
    boolean
    isD()
    The right key is pressed.
    boolean
    isS()
    The backward key is pressed.
    boolean
    The shift key is pressed.
    boolean
    The space key is pressed.
    boolean
    isW()
    The forward key is pressed.
    void
    setA(boolean a)
    The left key is pressed.
    void
    setD(boolean d)
    The right key is pressed.
    void
    setS(boolean s)
    The backward key is pressed.
    void
    setShift(boolean shift)
    The shift key is pressed.
    void
    setSpace(boolean space)
    The space key is pressed.
    void
    setW(boolean w)
    The forward key is pressed.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • MovementInput

      public MovementInput(boolean w, boolean a, boolean s, boolean d, boolean space, boolean shift)
      Creates a new MovementInput instance.
      Parameters:
      w - The forward key is pressed.
      a - The left key is pressed.
      s - The backward key is pressed.
      d - The right key is pressed.
      space - The space key is pressed.
      shift - The shift key is pressed.
  • Method Details

    • isW

      public boolean isW()
      The forward key is pressed.
    • isA

      public boolean isA()
      The left key is pressed.
    • isS

      public boolean isS()
      The backward key is pressed.
    • isD

      public boolean isD()
      The right key is pressed.
    • isSpace

      public boolean isSpace()
      The space key is pressed.
    • isShift

      public boolean isShift()
      The shift key is pressed.
    • setW

      public void setW(boolean w)
      The forward key is pressed.
    • setA

      public void setA(boolean a)
      The left key is pressed.
    • setS

      public void setS(boolean s)
      The backward key is pressed.
    • setD

      public void setD(boolean d)
      The right key is pressed.
    • setSpace

      public void setSpace(boolean space)
      The space key is pressed.
    • setShift

      public void setShift(boolean shift)
      The shift key is pressed.
    • toString

      public String toString()
      Overrides:
      toString in class Object