Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,10 @@ public static ItemStack getSkullByName(@NotNull final DeluxeMenus plugin, @NotNu

final OfflinePlayer offlinePlayer = Bukkit.getOfflinePlayer(playerName);

if (!VersionHelper.IS_SKULL_OWNER_LEGACY) {
if (VersionHelper.HAS_PLAYER_PROFILES && offlinePlayer.getPlayerProfile().getTextures().isEmpty()) {
// updates the Player Profile and populates textures for offline players - for some reason this doesn't populate when getting the Profile first time
headMeta.setOwnerProfile(offlinePlayer.getPlayerProfile().update().join());
} else if (!VersionHelper.IS_SKULL_OWNER_LEGACY) {
headMeta.setOwningPlayer(offlinePlayer);
} else {
headMeta.setOwner(offlinePlayer.getName());
Expand Down
Loading