diff options
author | afforess <afforess@gmail.com> | 2011-04-02 04:04:57 -0400 |
---|---|---|
committer | Erik Broes <erikbroes@grum.nl> | 2011-04-02 17:17:17 +0200 |
commit | adb13029bcabc3cefab4539aa633e5e2000cdd04 (patch) | |
tree | c339f1617fde0fac216386866587f38d5edae142 /src/main/java/org | |
parent | 39972530f241498707afde36919a65852d72bcb2 (diff) | |
download | craftbukkit-adb13029bcabc3cefab4539aa633e5e2000cdd04.tar craftbukkit-adb13029bcabc3cefab4539aa633e5e2000cdd04.tar.gz craftbukkit-adb13029bcabc3cefab4539aa633e5e2000cdd04.tar.lz craftbukkit-adb13029bcabc3cefab4539aa633e5e2000cdd04.tar.xz craftbukkit-adb13029bcabc3cefab4539aa633e5e2000cdd04.zip |
Forces clients to update to the new time immediately when setTime or setFullTime is called.
Diffstat (limited to 'src/main/java/org')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/CraftWorld.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index 898ef3e0..b487b6d5 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -418,6 +418,12 @@ public class CraftWorld implements World { public void setFullTime(long time) { world.a(time); + + //Forces the client to update to the new time immediately + for (Player p: getPlayers()) { + CraftPlayer cp = (CraftPlayer) p; + cp.getHandle().a.b(new Packet4UpdateTime(time)); + } } public Environment getEnvironment() { |