diff options
author | sk89q <the.sk89q@gmail.com> | 2011-04-11 11:48:31 -0700 |
---|---|---|
committer | sk89q <the.sk89q@gmail.com> | 2011-04-11 11:48:31 -0700 |
commit | 86c467cb50c3fabf48838b0d5c213e277fc49a8d (patch) | |
tree | ce1e51d9f04809e07c88d9e38991b3b47a739f4a /src/main/java/org/bukkit | |
parent | 2685de187a3e4352c554e5362c1a835952e0016f (diff) | |
download | craftbukkit-86c467cb50c3fabf48838b0d5c213e277fc49a8d.tar craftbukkit-86c467cb50c3fabf48838b0d5c213e277fc49a8d.tar.gz craftbukkit-86c467cb50c3fabf48838b0d5c213e277fc49a8d.tar.lz craftbukkit-86c467cb50c3fabf48838b0d5c213e277fc49a8d.tar.xz craftbukkit-86c467cb50c3fabf48838b0d5c213e277fc49a8d.zip |
Fixin' the problem of AFK people not in bed.
Diffstat (limited to 'src/main/java/org/bukkit')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index 276939ca..d66e4eb2 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -212,4 +212,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void updateInventory() { getHandle().m(); } + + public void setSleepingIgnored(boolean isSleeping) { + getHandle().fauxSleeping = isSleeping; + ((CraftWorld)getWorld()).getHandle().checkSleepStatus(); + } + + public boolean isSleepingIgnored() { + return getHandle().fauxSleeping; + } } |