Fix NPE if there is no player info for a player entity
This commit is contained in:
@@ -12,7 +12,7 @@ public class SkinProvider {
|
||||
public static ResourceLocation getResourceLocationForPlayerUUID(UUID uuid) {
|
||||
NetworkPlayerInfo info = Minecraft.getMinecraft().getNetHandler().getPlayerInfo(uuid);
|
||||
ResourceLocation skinLocation;
|
||||
if(info.hasLocationSkin()) {
|
||||
if (info != null && info.hasLocationSkin()) {
|
||||
skinLocation = info.getLocationSkin();
|
||||
} else {
|
||||
skinLocation = DefaultPlayerSkin.getDefaultSkin(uuid);
|
||||
|
||||
Reference in New Issue
Block a user