Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-19 04:50:06 +01:00
SPIGOT-5554: Clear error message when BossBar is used for not fully joined players
Dieser Commit ist enthalten in:
Ursprung
18168500ea
Commit
df371c1b69
@ -166,11 +166,16 @@ public class CraftBossBar implements BossBar {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addPlayer(Player player) {
|
public void addPlayer(Player player) {
|
||||||
|
Preconditions.checkArgument(player != null, "player == null");
|
||||||
|
Preconditions.checkArgument(((CraftPlayer) player).getHandle().playerConnection != null, "player is not fully connected (wait for PlayerJoinEvent)");
|
||||||
|
|
||||||
handle.addPlayer(((CraftPlayer) player).getHandle());
|
handle.addPlayer(((CraftPlayer) player).getHandle());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void removePlayer(Player player) {
|
public void removePlayer(Player player) {
|
||||||
|
Preconditions.checkArgument(player != null, "player == null");
|
||||||
|
|
||||||
handle.removePlayer(((CraftPlayer) player).getHandle());
|
handle.removePlayer(((CraftPlayer) player).getHandle());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren