Implement per-player Weather API. Adds BUKKIT-812

By: T00thpick1 <t00thpick1dirko@gmail.com>
This commit is contained in:
CraftBukkit/Spigot 2012-12-20 16:51:27 -05:00
parent 206334875b
commit 4c1cb5c8a7

View file

@ -24,6 +24,7 @@ import org.bukkit.*;
import org.bukkit.Achievement; import org.bukkit.Achievement;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.Statistic; import org.bukkit.Statistic;
import org.bukkit.WeatherType;
import org.bukkit.World; import org.bukkit.World;
import org.bukkit.configuration.serialization.DelegateDeserialization; import org.bukkit.configuration.serialization.DelegateDeserialization;
import org.bukkit.conversations.Conversation; import org.bukkit.conversations.Conversation;
@ -497,6 +498,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
setPlayerTime(0, true); setPlayerTime(0, true);
} }
public void setPlayerWeather(WeatherType type) {
getHandle().setPlayerWeather(type, true);
}
public WeatherType getPlayerWeather() {
return getHandle().getPlayerWeather();
}
public void resetPlayerWeather() {
getHandle().resetPlayerWeather();
}
public boolean isBanned() { public boolean isBanned() {
return server.getHandle().getNameBans().isBanned(getName().toLowerCase()); return server.getHandle().getNameBans().isBanned(getName().toLowerCase());
} }