From 752c2175574a5c26139ad0b4755ba04f33808f95 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Mon, 11 Apr 2011 11:48:30 -0700 Subject: [PATCH] Fixin' the problem of AFK people not in bed. By: sk89q --- .../src/main/java/org/bukkit/entity/Player.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/entity/Player.java b/paper-api/src/main/java/org/bukkit/entity/Player.java index 0ed318c430..f30d27263e 100644 --- a/paper-api/src/main/java/org/bukkit/entity/Player.java +++ b/paper-api/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.