Add per-player Weather API. Adds BUKKIT-812

This commit is contained in:
T00thpick1
2012-12-07 14:19:01 -05:00
committed by Travis Watkins
parent 987aa600c4
commit 4a23f3f2d0
2 changed files with 40 additions and 0 deletions

View File

@@ -12,6 +12,7 @@ import org.bukkit.Note;
import org.bukkit.OfflinePlayer;
import org.bukkit.Sound;
import org.bukkit.Statistic;
import org.bukkit.WeatherType;
import org.bukkit.command.CommandSender;
import org.bukkit.conversations.Conversable;
import org.bukkit.map.MapView;
@@ -363,6 +364,29 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
*/
public void resetPlayerTime();
/**
* Sets the type of weather the player will see. When used, the weather
* status of the player is locked until {@link #resetPlayerWeather()} is
* used.
*
* @param type The WeatherType enum type the player should experience
*/
public void setPlayerWeather(WeatherType type);
/**
* Returns the type of weather the player is currently experiencing.
*
* @return The WeatherType that the player is currently experiencing or
* null if player is seeing server weather.
*/
public WeatherType getPlayerWeather();
/**
* Restores the normal condition where the player's weather is controlled
* by server conditions.
*/
public void resetPlayerWeather();
/**
* Gives the player the amount of experience specified.
*