From 28011b1217f366d481ec428b6ff16ccf82bdf4a3 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Fri, 22 Apr 2011 02:17:53 -0700 Subject: [PATCH] Added weather control methods. By: sk89q --- paper-api/src/main/java/org/bukkit/World.java | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/World.java b/paper-api/src/main/java/org/bukkit/World.java index ab4166acf7..ea6d327217 100644 --- a/paper-api/src/main/java/org/bukkit/World.java +++ b/paper-api/src/main/java/org/bukkit/World.java @@ -409,6 +409,35 @@ public interface World { * @see #setTime(long) Sets the relative time of this world */ public void setFullTime(long time); + + /** + * Returns whether the world has an ongoing storm. + * + * @return Whether there is an ongoing storm + */ + public boolean hasStorm(); + + /** + * Set whether there is a storm. A duration will be set for the new + * current conditions. + * + * @param hasStorm Whether there is rain and snow + */ + public void setStorm(boolean hasStorm); + + /** + * Get the remaining time in ticks of the current conditions. + * + * @return Time in ticks + */ + public int getWeatherDuration(); + + /** + * Set the remaining time in ticks of the current conditions. + * + * @param duration Time in ticks + */ + public void setWeatherDuration(int duration); /** * Gets the {@link Environment} type of this world