diff options
author | EvilSeph <evilseph@unaligned.org> | 2011-06-09 02:33:16 -0400 |
---|---|---|
committer | EvilSeph <evilseph@unaligned.org> | 2011-06-09 02:33:16 -0400 |
commit | 053e05dd3793f8580fa5eef89eb133bfdb03c176 (patch) | |
tree | 1209343fb875e2a3021cd8cfe2d113ca872eef4b /src/main/java | |
parent | 569b1d274699a1a018a217800d6df33bc9a55ec0 (diff) | |
download | craftbukkit-053e05dd3793f8580fa5eef89eb133bfdb03c176.tar craftbukkit-053e05dd3793f8580fa5eef89eb133bfdb03c176.tar.gz craftbukkit-053e05dd3793f8580fa5eef89eb133bfdb03c176.tar.lz craftbukkit-053e05dd3793f8580fa5eef89eb133bfdb03c176.tar.xz craftbukkit-053e05dd3793f8580fa5eef89eb133bfdb03c176.zip |
Fixed weather changes affecting players in all worlds, instead of their respective worlds.
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/net/minecraft/server/WorldServer.java | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java index 14006ee8..dbc25308 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -184,11 +184,17 @@ public class WorldServer extends World implements BlockChangeDelegate { super.i(); if (flag != this.v()) { - if (flag) { - this.server.serverConfigurationManager.sendAll(new Packet70Bed(2)); - } else { - this.server.serverConfigurationManager.sendAll(new Packet70Bed(1)); + // CraftBukkit start - only sending weather packets to those affected + for (int i = 0; i < this.players.size(); ++i) { + if (((EntityPlayer) this.players.get(i)).world == (World) this) { + if (flag) { + ((EntityPlayer) this.players.get(i)).netServerHandler.sendPacket(new Packet70Bed(2)); + } else { + ((EntityPlayer) this.players.get(i)).netServerHandler.sendPacket(new Packet70Bed(1)); + } + } } + // CraftBukkit end } } } |