Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.8.0 #66

Merged
merged 3 commits into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
feat: fallback skull_value
  • Loading branch information
Naimadx123 committed Jan 22, 2025
commit 4b2c7ca469ba5f81598b173e61b7299c778a71cf
2 changes: 1 addition & 1 deletion src/main/java/zone/vao/nexoAddon/utils/ItemConfigUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ private static void loadFertilizerComponent(ConfigurationSection section, Compon

private static void loadSkullValueComponent(ConfigurationSection section, Components component) {
if (section.contains("Components.skull_value")) {
String value = section.getString("Components.skull_value", SkullUtil.NEXO_HEAD_BASE64);
String value = section.getString("Components.skull_value", SkullUtil.NEXOADDON_HEAD_BASE64);
component.setSkullValue(value);
}
}
Expand Down
8 changes: 6 additions & 2 deletions src/main/java/zone/vao/nexoAddon/utils/SkullUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

public class SkullUtil {

public static String NEXO_HEAD_BASE64 = "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNWY1ZTgzNWMxMTZlOGUyMDBlMmUwNmFhNTkzY2FiOGYxYTlmOGM0MGU3ZjAwNWE5Yzc2ZjEyZTI0ZjRjNjM3MCJ9fX0=";
public static String NEXOADDON_HEAD_BASE64 = "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNWY1ZTgzNWMxMTZlOGUyMDBlMmUwNmFhNTkzY2FiOGYxYTlmOGM0MGU3ZjAwNWE5Yzc2ZjEyZTI0ZjRjNjM3MCJ9fX0=";

public static void applyTextures(){

Expand Down Expand Up @@ -64,7 +64,11 @@ private static PlayerProfile getProfileBase64(String base64, String itemId) {
urlObject = getUrlFromBase64(base64);
} catch (MalformedURLException exception) {
NexoAddon.getInstance().getLogger().warning("Invalid base64: "+itemId);
return null;
try {
urlObject = getUrlFromBase64(NEXOADDON_HEAD_BASE64);
} catch(MalformedURLException ignored) {
return null;
}
}
textures.setSkin(urlObject);
profile.setTextures(textures);
Expand Down