Skip to content

Commit

Permalink
feat: add trust-all-skins option
Browse files Browse the repository at this point in the history
  • Loading branch information
smartcmd committed Oct 15, 2024
1 parent 2789f9c commit aeb7baf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/src/main/java/org/allaymc/api/client/skin/Skin.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import it.unimi.dsi.fastutil.io.FastByteArrayOutputStream;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.allaymc.api.server.Server;
import org.allaymc.api.utils.Utils;
import org.cloudburstmc.protocol.bedrock.data.skin.*;
import org.jose4j.json.internal.json_simple.JSONObject;
Expand Down Expand Up @@ -48,7 +49,7 @@ public class Skin {
private boolean premium;
private boolean persona;
private boolean capeOnClassic;
private boolean trusted = false;
private boolean trusted = Server.SETTINGS.resourcePackSettings().trustAllSkins();
private boolean primaryUser = true;

private List<SkinAnimation> skinAnimations = new ArrayList<>();
Expand Down
4 changes: 4 additions & 0 deletions api/src/main/java/org/allaymc/api/server/ServerSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,10 @@ public static class ResourcePackSettings extends OkaeriConfig {
@CustomKey("allow-client-resource-packs")
private boolean allowClientResourcePacks = false;

@Comment("If set to true, all skins will be marked as trusted")
@CustomKey("trust-all-skins")
private boolean trustAllSkins = true;

// TODO: URL packs configuration
}

Expand Down

0 comments on commit aeb7baf

Please sign in to comment.