Added PlayerToggleSprint event and sprinting related API.

By: Rigby <rigby@onarandombox.com>
This commit is contained in:
Bukkit/Spigot
2011-09-21 11:46:33 +01:00
parent ff51e5c299
commit a3e8ec7d78
5 changed files with 76 additions and 7 deletions

View File

@@ -98,6 +98,20 @@ public interface Player extends HumanEntity, CommandSender, OfflinePlayer {
*/
public void setSneaking(boolean sneak);
/**
* Gets whether the player is sprinting or not.
*
* @return true if player is sprinting.
*/
public boolean isSprinting();
/**
* Sets whether the player is sprinting or not.
*
* @param sprinting true if the player should be sprinting
*/
public void setSprinting(boolean sprinting);
/**
* Saves the players current location, health, inventory, motion, and other information into the username.dat file, in the world/player folder
*/
@@ -298,6 +312,7 @@ public interface Player extends HumanEntity, CommandSender, OfflinePlayer {
*
* @return Current experience points
*/
public int getExperience();
/**