mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-25 20:25:16 +01:00
Put a try catch around head getting #2464
This commit is contained in:
parent
ed700a1915
commit
3c29f88d23
@ -68,9 +68,7 @@ public class HeadCache
|
|||||||
* @param timestamp of type long
|
* @param timestamp of type long
|
||||||
*/
|
*/
|
||||||
public HeadCache(String userName,
|
public HeadCache(String userName,
|
||||||
UUID userId,
|
UUID userId, PlayerProfile playerProfile, long timestamp)
|
||||||
PlayerProfile playerProfile,
|
|
||||||
long timestamp)
|
|
||||||
{
|
{
|
||||||
this.userName = userName;
|
this.userName = userName;
|
||||||
this.playerProfile = playerProfile;
|
this.playerProfile = playerProfile;
|
||||||
@ -99,8 +97,12 @@ public class HeadCache
|
|||||||
// Set correct Skull texture
|
// Set correct Skull texture
|
||||||
if (meta != null && this.playerProfile != null)
|
if (meta != null && this.playerProfile != null)
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
meta.setOwnerProfile(this.playerProfile);
|
meta.setOwnerProfile(this.playerProfile);
|
||||||
item.setItemMeta(meta);
|
item.setItemMeta(meta);
|
||||||
|
} catch (Exception e) {
|
||||||
|
// Do nothing - there was an error getting the head
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return item;
|
return item;
|
||||||
|
Loading…
Reference in New Issue
Block a user