From 86c467cb50c3fabf48838b0d5c213e277fc49a8d Mon Sep 17 00:00:00 2001 From: sk89q Date: Mon, 11 Apr 2011 11:48:31 -0700 Subject: Fixin' the problem of AFK people not in bed. --- src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/main/java/org/bukkit') 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; + } } -- cgit v1.2.3