Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ See the patches list below.
[FalchusSpigot-????] Improve NetworkManager
[FalchusSpigot-????] Add FastNetworkManager
[FalchusSpigot-????] Async knockback
[FalchusSpigot-????] Fix getOfflinePlayer

[DashSpigot-0033] Fix SPIGOT-1746: Tile entities may not always tick
[DashSpigot-0011] Fix MC-94186: Dragon egg falling in lazy chunks
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ public String[] a() {
return (String[]) arraylist.toArray(new String[arraylist.size()]);
}

public GameProfile getProfile(UUID uuid) { return this.a(uuid); } // FalchusSpigot - OBFHELPER
public GameProfile a(UUID uuid) {
UserCache.UserCacheEntry usercache_usercacheentry = this.d.get(uuid);

Expand Down Expand Up @@ -357,4 +358,4 @@ public UserCacheEntry deserialize(JsonElement jsonelement, Type type,
this();
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1555,8 +1555,19 @@ public OfflinePlayer getOfflinePlayer(UUID id) {
if (result == null) {
result = offlinePlayers.get(id);
if (result == null) {
result = new CraftOfflinePlayer(this, new GameProfile(id, null));
offlinePlayers.put(id, result);
// FalchusSpigot start - fix like above
GameProfile profile = null;
// Only fetch an online UUID in online mode
if (MinecraftServer.getServer().getOnlineMode() || org.spigotmc.SpigotConfig.bungee) {
profile = MinecraftServer.getServer().getUserCache().getProfile(id);
}
if (profile == null) {
// Make an OfflinePlayer using a UUID since the profile has no name
result = getOfflinePlayer(new GameProfile(id, null));
} else {
result = getOfflinePlayer(profile);
}
// FalchusSpigot end
}
} else {
offlinePlayers.remove(id);
Expand Down
Loading