Add fix for invisible players when you teleport
This commit is contained in:
parent
878b0de123
commit
1dc41a9b57
@ -152,6 +152,12 @@ public class ArenaHandler {
|
|||||||
player.setAllowFlight(false);
|
player.setAllowFlight(false);
|
||||||
player.setWalkSpeed(0.25F);
|
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
|
if ((Boolean) W.config
|
||||||
.get(ConfigC.shop_blockChooserv1Enabled) == true) {
|
.get(ConfigC.shop_blockChooserv1Enabled) == true) {
|
||||||
if (W.shop.getFile().get(
|
if (W.shop.getFile().get(
|
||||||
@ -334,6 +340,12 @@ public class ArenaHandler {
|
|||||||
seeker.teleport(arena.seekersWarp);
|
seeker.teleport(arena.seekersWarp);
|
||||||
W.seekertime.put(seeker, arena.waitingTimeSeeker);
|
W.seekertime.put(seeker, arena.waitingTimeSeeker);
|
||||||
seeker.setWalkSpeed(0.25F);
|
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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,6 +128,12 @@ public class OnEntityDamageByEntityEvent implements Listener {
|
|||||||
player.teleport(arena.seekersWarp);
|
player.teleport(arena.seekersWarp);
|
||||||
player.setGameMode(GameMode.SURVIVAL);
|
player.setGameMode(GameMode.SURVIVAL);
|
||||||
player.setWalkSpeed(0.25F);
|
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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user