forked from GeyserMC/Geyser
Fix offline mode console spam for skins
This commit is contained in:
parent
d7568ef523
commit
8725dba69c
1 changed files with 4 additions and 1 deletions
|
@ -9,6 +9,7 @@ import lombok.AllArgsConstructor;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import org.apache.commons.codec.Charsets;
|
import org.apache.commons.codec.Charsets;
|
||||||
import org.geysermc.api.Geyser;
|
import org.geysermc.api.Geyser;
|
||||||
|
import org.geysermc.connector.GeyserConnector;
|
||||||
import org.geysermc.connector.entity.PlayerEntity;
|
import org.geysermc.connector.entity.PlayerEntity;
|
||||||
import org.geysermc.connector.network.session.GeyserSession;
|
import org.geysermc.connector.network.session.GeyserSession;
|
||||||
|
|
||||||
|
@ -97,8 +98,10 @@ public class SkinUtils {
|
||||||
|
|
||||||
return new GameProfileData(skinUrl, capeUrl, isAlex);
|
return new GameProfileData(skinUrl, capeUrl, isAlex);
|
||||||
} catch (Exception exception) {
|
} catch (Exception exception) {
|
||||||
// return default skin with default cape when texture data is invalid
|
if (!((GeyserConnector) Geyser.getConnector()).getConfig().getRemote().getAuthType().equals("offline")) {
|
||||||
Geyser.getLogger().debug("Got invalid texture data for " + profile.getName() + " " + exception.getMessage());
|
Geyser.getLogger().debug("Got invalid texture data for " + profile.getName() + " " + exception.getMessage());
|
||||||
|
}
|
||||||
|
// return default skin with default cape when texture data is invalid
|
||||||
return new GameProfileData("", "", false);
|
return new GameProfileData("", "", false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue