mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-28 13:36:16 +01:00
Fixed weather changes affecting players in all worlds, instead of their respective worlds.
This commit is contained in:
parent
569b1d2746
commit
053e05dd37
@ -184,11 +184,17 @@ public class WorldServer extends World implements BlockChangeDelegate {
|
||||
|
||||
super.i();
|
||||
if (flag != this.v()) {
|
||||
// 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) {
|
||||
this.server.serverConfigurationManager.sendAll(new Packet70Bed(2));
|
||||
((EntityPlayer) this.players.get(i)).netServerHandler.sendPacket(new Packet70Bed(2));
|
||||
} else {
|
||||
this.server.serverConfigurationManager.sendAll(new Packet70Bed(1));
|
||||
((EntityPlayer) this.players.get(i)).netServerHandler.sendPacket(new Packet70Bed(1));
|
||||
}
|
||||
}
|
||||
}
|
||||
// CraftBukkit end
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user