Add fix for invisible players when you teleport

This commit is contained in:
addstar 2014-02-08 01:37:07 +11:00
parent 878b0de123
commit 1dc41a9b57
2 changed files with 18 additions and 0 deletions

View File

@ -152,6 +152,12 @@ public class ArenaHandler {
player.setAllowFlight(false);
player.setWalkSpeed(0.25F);
// Fix for client not showing players after they join
for (Player otherplayer : arena.playersInArena) {
if (otherplayer.canSee(player)) otherplayer.showPlayer(player); // Make new player visible to others
if (player.canSee(otherplayer)) player.showPlayer(otherplayer); // Make other players visible to new player
}
if ((Boolean) W.config
.get(ConfigC.shop_blockChooserv1Enabled) == true) {
if (W.shop.getFile().get(
@ -334,6 +340,12 @@ public class ArenaHandler {
seeker.teleport(arena.seekersWarp);
W.seekertime.put(seeker, arena.waitingTimeSeeker);
seeker.setWalkSpeed(0.25F);
// Fix for client not showing players after they join
for (Player otherplayer : arena.playersInArena) {
if (otherplayer.canSee(player)) otherplayer.showPlayer(player); // Make new player visible to others
if (player.canSee(otherplayer)) player.showPlayer(otherplayer); // Make other players visible to new player
}
}
}

View File

@ -128,6 +128,12 @@ public class OnEntityDamageByEntityEvent implements Listener {
player.teleport(arena.seekersWarp);
player.setGameMode(GameMode.SURVIVAL);
player.setWalkSpeed(0.25F);
// Fix for client not showing players after they join
for (Player otherplayer : arena.playersInArena) {
if (otherplayer.canSee(player)) otherplayer.showPlayer(player); // Make new player visible to others
if (player.canSee(otherplayer)) player.showPlayer(otherplayer); // Make other players visible to new player
}
}
}
}