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 newMovementInputinstance. -
Method Summary
Modifier and TypeMethodDescriptionbooleanisA()The left key is pressed.booleanisD()The right key is pressed.booleanisS()The backward key is pressed.booleanisShift()The shift key is pressed.booleanisSpace()The space key is pressed.booleanisW()The forward key is pressed.voidsetA(boolean a) The left key is pressed.voidsetD(boolean d) The right key is pressed.voidsetS(boolean s) The backward key is pressed.voidsetShift(boolean shift) The shift key is pressed.voidsetSpace(boolean space) The space key is pressed.voidsetW(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 newMovementInputinstance.- 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
-