summaryrefslogtreecommitdiffstats
path: root/src/main/java/org
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index e38ec9b0..7ce51a20 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -298,6 +298,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return getHandle().isSneaking();
}
+ public boolean isSprinting() {
+ return getHandle().at();
+ }
+
+ public void setSprinting(boolean sprinting) {
+ getHandle().g(sprinting);
+ }
+
public void loadData() {
server.getHandle().playerFileData.b(getHandle());
}
@@ -411,7 +419,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public void setGameMode(GameMode mode) {
if (getHandle().netServerHandler == null) return;
-
+
if (mode == null) {
throw new IllegalArgumentException("Mode cannot be null");
}