mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-31 21:37:39 +01:00
#561: Add clear weather World API
By: Parker Hawke <hawkeboyz2@hotmail.com>
This commit is contained in:
parent
5e82375383
commit
031310657d
@ -965,6 +965,9 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
* Set whether there is a storm. A duration will be set for the new
|
||||
* current conditions.
|
||||
*
|
||||
* This will implicitly call {@link #setClearWeatherDuration(int)} with 0
|
||||
* ticks to reset the world's clear weather.
|
||||
*
|
||||
* @param hasStorm Whether there is rain and snow
|
||||
*/
|
||||
public void setStorm(boolean hasStorm);
|
||||
@ -993,6 +996,9 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
/**
|
||||
* Set whether it is thundering.
|
||||
*
|
||||
* This will implicitly call {@link #setClearWeatherDuration(int)} with 0
|
||||
* ticks to reset the world's clear weather.
|
||||
*
|
||||
* @param thundering Whether it is thundering
|
||||
*/
|
||||
public void setThundering(boolean thundering);
|
||||
@ -1011,6 +1017,37 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
*/
|
||||
public void setThunderDuration(int duration);
|
||||
|
||||
/**
|
||||
* Returns whether the world has clear weather.
|
||||
*
|
||||
* This will be true such that {@link #isThundering()} and
|
||||
* {@link #hasStorm()} are both false.
|
||||
*
|
||||
* @return true if clear weather
|
||||
*/
|
||||
public boolean isClearWeather();
|
||||
|
||||
/**
|
||||
* Set the clear weather duration.
|
||||
*
|
||||
* The clear weather ticks determine whether or not the world will be
|
||||
* allowed to rain or storm. If clear weather ticks are > 0, the world will
|
||||
* not naturally do either until the duration has elapsed.
|
||||
*
|
||||
* This method is equivalent to calling {@code /weather clear} with a set
|
||||
* amount of ticks.
|
||||
*
|
||||
* @param duration duration in ticks
|
||||
*/
|
||||
public void setClearWeatherDuration(int duration);
|
||||
|
||||
/**
|
||||
* Get the clear weather duration.
|
||||
*
|
||||
* @return duration in ticks
|
||||
*/
|
||||
public int getClearWeatherDuration();
|
||||
|
||||
/**
|
||||
* Creates explosion at given coordinates with given power
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user