SPIGOT-954: Don't send block animations or gamemode updates to players can't see the player

This commit is contained in:
Thinkofdeath
2015-06-07 21:04:28 +01:00
parent 845336b511
commit 53433de98d
3 changed files with 66 additions and 21 deletions

View File

@@ -14,6 +14,15 @@
public class PlayerInteractManager {
public World world;
@@ -26,7 +34,7 @@
this.gamemode = worldsettings_enumgamemode;
worldsettings_enumgamemode.a(this.player.abilities);
this.player.updateAbilities();
- this.player.server.getPlayerList().sendAll(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.UPDATE_GAME_MODE, new EntityPlayer[] { this.player}));
+ this.player.server.getPlayerList().sendAll(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.UPDATE_GAME_MODE, new EntityPlayer[] { this.player}), this.player); // CraftBukkit
}
public WorldSettings.EnumGamemode getGameMode() {
@@ -50,7 +58,7 @@
}