Class MovementInput
java.lang.Object
nl.sbdeveloper.vehiclesplus.api.vehicles.movement.MovementInput
Represents the input of a player.
Constructed in the listener for movement in the plugin.
-
Constructor Summary
ConstructorsConstructorDescriptionMovementInput
(boolean w, boolean a, boolean s, boolean d, boolean space, boolean shift) Creates a newMovementInput
instance. -
Method Summary
Modifier and TypeMethodDescriptionboolean
isA()
The left key is pressed.boolean
isD()
The right key is pressed.boolean
isS()
The backward key is pressed.boolean
isShift()
The shift key is pressed.boolean
isSpace()
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.toString()
-
Constructor Details
-
MovementInput
public MovementInput(boolean w, boolean a, boolean s, boolean d, boolean space, boolean shift) Creates a newMovementInput
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
-