summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDinnerbone <dinnerbone@dinnerbone.com>2011-02-01 14:53:26 +0000
committerDinnerbone <dinnerbone@dinnerbone.com>2011-02-01 14:53:26 +0000
commitfb9fdc518eca023073b549c2a9db6a0f5f0cf785 (patch)
treedfc39d1369ff494de6cb1238b8d6463068c475f0 /src
parent67fbbced23097e3661dad87c2aa40e155a110016 (diff)
downloadbukkit-fb9fdc518eca023073b549c2a9db6a0f5f0cf785.tar
bukkit-fb9fdc518eca023073b549c2a9db6a0f5f0cf785.tar.gz
bukkit-fb9fdc518eca023073b549c2a9db6a0f5f0cf785.tar.lz
bukkit-fb9fdc518eca023073b549c2a9db6a0f5f0cf785.tar.xz
bukkit-fb9fdc518eca023073b549c2a9db6a0f5f0cf785.zip
What's the time, mr wolf?
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/bukkit/Server.java4
-rw-r--r--src/main/java/org/bukkit/World.java39
2 files changed, 43 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index be8da671..bfaff2f5 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -79,14 +79,18 @@ public interface Server {
* Gets the in-game time on the server (in hours*1000)
*
* @return The current time in hours*1000
+ * @deprecated Use World.getTime
*/
+ @Deprecated
public long getTime();
/**
* Sets the in-game time on the server (in hours*1000)
*
* @param time The time to set the in-game time to (in hours*1000)
+ * @deprecated Use World.setTime
*/
+ @Deprecated
public void setTime(long time);
/**
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 3fd21db2..93b1a719 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -197,4 +197,43 @@ public interface World {
* Gets the default spawn location.
*/
public Location getSpawnLocation();
+
+ /**
+ * Gets the relative in-game time on this world (in hours*1000)
+ *
+ * @return The current relative time in hours*1000
+ * @see getFullTime
+ */
+ public long getTime();
+
+ /**
+ * Sets the relative in-game time on the server (in hours*1000)<br />
+ * <br />
+ * Note that setting the relative time below the current relative time will
+ * actually move the clock forward a day. If you require to rewind time, please
+ * see setFullTime
+ *
+ * @param time The new relative time to set the in-game time to (in hours*1000)
+ * @see setFullTime
+ */
+ public void setTime(long time);
+
+ /**
+ * Gets the full in-game time on this world (in hours*1000)
+ *
+ * @return The current time in hours*1000
+ * @see setTime
+ */
+ public long getFullTime();
+
+ /**
+ * Sets the in-game time on the server (in hours*1000)<br />
+ * <br />
+ * Note that this sets the full time of the world, which may cause adverse
+ * effects such as breaking redstone clocks and any scheduled events
+ *
+ * @param time The new time to set the in-game time to (in hours*1000)
+ * @see setTime
+ */
+ public void setFullTime(long time);
}