geforkt von Mirrors/Paper
[Bleeding] Don't allow null display names. Fixes BUKKIT-5254
Currently, plugins can set a player's display name to null, which could cause issues for other calls to getDisplayName that aren't expecting a null value. This changes setDisplayName to follow the same logic as setPlayerListName, which sets the player's name back to their unmodified "vanilla" name if it receives a null value as a parameter.
Dieser Commit ist enthalten in:
Ursprung
2a2cdd4885
Commit
730adbbf42
@ -169,7 +169,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setDisplayName(final String name) {
|
public void setDisplayName(final String name) {
|
||||||
getHandle().displayName = name;
|
getHandle().displayName = name == null ? getName() : name;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren