From 93a3e2448d0293836df461aa09d5e0290768a7cc Mon Sep 17 00:00:00 2001 From: sk89q Date: Mon, 11 Apr 2011 11:48:30 -0700 Subject: [PATCH] Fixin' the problem of AFK people not in bed. --- src/main/java/org/bukkit/entity/Player.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java index 0ed318c4..f30d2726 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -109,6 +109,23 @@ public interface Player extends HumanEntity, CommandSender { * Note: This will overwrite the players current inventory, health, motion, etc, with the state from the saved dat file. */ public void loadData(); + + /** + * Sets whether the player is ignored as not sleeping. If everyone is + * either sleeping or has this flag set, then time will advance to the + * next day. If everyone has this flag set but no one is actually in bed, + * then nothing will happen. + * + * @param isSleeping + */ + public void setSleepingIgnored(boolean isSleeping); + + /** + * Returns whether the player is sleeping ignored. + * + * @return + */ + public boolean isSleepingIgnored(); /** * Forces an update of the player's entire inventory.