You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
OfflinePlayer#setWhitelisted writes an empty name to whitelist.json for players obtained via getOfflinePlayer(UUID) #14412
Whitelisting a player with Bukkit.getOfflinePlayer(uuid).setWhitelisted(true) should store the player’s real name next to the UUID, using the profile cache or the player’s profile, like /whitelist add does.
Observed/Actual behavior
whitelist.json gets {"uuid": "<uuid>", "name": ""}. /whitelist list then shows a blank entry, and the player is missing from tab-completion of /whitelist remove.
Steps/models to reproduce
Call Bukkit.getOfflinePlayer(uuid).setWhitelisted(true) for a player who is not online. For example, call it during the configuration phase, in a handler for PlayerCustomClickEvent.
Open whitelist.json: the name is "".
Run /whitelist list: the entry shows as blank.
Plugin and Datapack List
Just a test plugin that triggers the behaviour described in the 'Steps to reproduce' section. There are no data packs (only vanilla).
Paper version
This server is running Paper version 26.3-205-main@a90108f (2026-10-17T20:50:27Z) (Implementing API version 26.3.build.205-stable)
@OverridepublicOfflinePlayergetOfflinePlayer(UUIDid) {
Preconditions.checkArgument(id != null, "UUID id cannot be null");
OfflinePlayerresult = this.getPlayer(id);
if (result == null) {
result = this.offlinePlayers.get(id);
if (result == null) {
result = newCraftOfflinePlayer(this, newNameAndId(id, ""));
this.offlinePlayers.put(id, result);
}
} else {
this.offlinePlayers.remove(id);
}
returnresult;
}
I believe the bug comes from this line: result = new CraftOfflinePlayer(this, new NameAndId(id, "")); which gives the offline player an empty name and setting whitelisted to true forwards the NameAndId to UserWhiteListEntry and gets serialized with the empty name.
Activity
MonoDev-1 commentedon Oct 19, 2026
I believe the bug comes from this line:
result = new CraftOfflinePlayer(this, new NameAndId(id, ""));which gives the offline player an empty name and setting whitelisted to true forwards the NameAndId toUserWhiteListEntryand gets serialized with the empty name.