Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 20:40:08 +01:00
Fixed potential packet loss issue with vanish API. Fixes BUKKIT-1125
Dieser Commit ist enthalten in:
Ursprung
bdd2139c78
Commit
49ff166d15
@ -599,6 +599,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void hidePlayer(Player player) {
|
public void hidePlayer(Player player) {
|
||||||
|
Validate.notNull(player, "hidden player cannot be null");
|
||||||
|
if (equals(player)) return;
|
||||||
if (hiddenPlayers.containsKey(player.getName())) return;
|
if (hiddenPlayers.containsKey(player.getName())) return;
|
||||||
hiddenPlayers.put(player.getName(), player);
|
hiddenPlayers.put(player.getName(), player);
|
||||||
|
|
||||||
@ -615,6 +617,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void showPlayer(Player player) {
|
public void showPlayer(Player player) {
|
||||||
|
Validate.notNull(player, "shown player cannot be null");
|
||||||
|
if (equals(player)) return;
|
||||||
if (!hiddenPlayers.containsKey(player.getName())) return;
|
if (!hiddenPlayers.containsKey(player.getName())) return;
|
||||||
hiddenPlayers.remove(player.getName());
|
hiddenPlayers.remove(player.getName());
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren