summaryrefslogtreecommitdiffstats
path: root/src/main/java/org
diff options
context:
space:
mode:
authorT00thpick1 <t00thpick1dirko@gmail.com>2012-12-20 16:51:27 -0500
committerTravis Watkins <amaranth@ubuntu.com>2013-03-18 13:03:54 -0500
commit1bde25bb3328186c2d13b8e566b84ada543f1b1a (patch)
tree04023883d8e1e8c32614e6a6177cda517ab71ba5 /src/main/java/org
parenta7a5f273e3765a819f7d2ac71b4be4dbd28f9db4 (diff)
downloadcraftbukkit-1bde25bb3328186c2d13b8e566b84ada543f1b1a.tar
craftbukkit-1bde25bb3328186c2d13b8e566b84ada543f1b1a.tar.gz
craftbukkit-1bde25bb3328186c2d13b8e566b84ada543f1b1a.tar.lz
craftbukkit-1bde25bb3328186c2d13b8e566b84ada543f1b1a.tar.xz
craftbukkit-1bde25bb3328186c2d13b8e566b84ada543f1b1a.zip
Implement per-player Weather API. Adds BUKKIT-812
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index f8dbbee7..70111e7a 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -24,6 +24,7 @@ import org.bukkit.*;
import org.bukkit.Achievement;
import org.bukkit.Material;
import org.bukkit.Statistic;
+import org.bukkit.WeatherType;
import org.bukkit.World;
import org.bukkit.configuration.serialization.DelegateDeserialization;
import org.bukkit.conversations.Conversation;
@@ -497,6 +498,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
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() {
return server.getHandle().getNameBans().isBanned(getName().toLowerCase());
}