SPIGOT-7919: Add API to access current player input
By: md_5 <git@md-5.net>
This commit is contained in:
59
paper-api/src/main/java/org/bukkit/Input.java
Normal file
59
paper-api/src/main/java/org/bukkit/Input.java
Normal file
@@ -0,0 +1,59 @@
|
||||
package org.bukkit;
|
||||
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
/**
|
||||
* Represents a movement input applied to an entity.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
public interface Input {
|
||||
|
||||
/**
|
||||
* Gets whether a forward input is applied.
|
||||
*
|
||||
* @return forward input
|
||||
*/
|
||||
boolean isForward();
|
||||
|
||||
/**
|
||||
* Gets whether a backward input is applied.
|
||||
*
|
||||
* @return backward input
|
||||
*/
|
||||
boolean isBackward();
|
||||
|
||||
/**
|
||||
* Gets whether a left input is applied.
|
||||
*
|
||||
* @return left input
|
||||
*/
|
||||
boolean isLeft();
|
||||
|
||||
/**
|
||||
* Gets whether a right input is applied.
|
||||
*
|
||||
* @return right input
|
||||
*/
|
||||
boolean isRight();
|
||||
|
||||
/**
|
||||
* Gets whether a jump input is applied.
|
||||
*
|
||||
* @return jump input
|
||||
*/
|
||||
boolean isJump();
|
||||
|
||||
/**
|
||||
* Gets whether a sneak input is applied.
|
||||
*
|
||||
* @return sneak input
|
||||
*/
|
||||
boolean isSneak();
|
||||
|
||||
/**
|
||||
* Gets whether a sprint input is applied.
|
||||
*
|
||||
* @return sprint input
|
||||
*/
|
||||
boolean isSprint();
|
||||
}
|
||||
Reference in New Issue
Block a user