Expression for Skull Texture#8500
Open
AnOwlBe wants to merge 2 commits intoSkriptLang:dev/featurefrom
Open
Conversation
Efnilite
requested changes
Mar 15, 2026
Comment on lines
+36
to
+37
| } | ||
| @Override |
Member
There was a problem hiding this comment.
Suggested change
| } | |
| @Override | |
| } | |
| @Override |
Comment on lines
+28
to
+29
| } | ||
| @Override |
Member
There was a problem hiding this comment.
Suggested change
| } | |
| @Override | |
| } | |
| @Override |
| @Name("Skull Texture") | ||
| @Description("The skull texture for a player head.") | ||
| @Example("set the skull texture of {_i} to \"<base64>\"") | ||
| @Since("2.15") |
Member
There was a problem hiding this comment.
Suggested change
| @Since("2.15") | |
| @Since("INSERT VERSION") |
|
|
||
| @Name("Skull Texture") | ||
| @Description("The skull texture for a player head.") | ||
| @Example("set the skull texture of {_i} to \"<base64>\"") |
Member
There was a problem hiding this comment.
can you use an example base64 string here so that its more clear here. should probably return notch's skull or someone else's
| public void change(Event event, Object @Nullable [] delta, ChangeMode mode) { | ||
| String value = delta == null ? null : (String) delta[0]; | ||
| switch (mode) { | ||
| case DELETE, RESET: |
Comment on lines
+65
to
+67
| @Nullable | ||
| @Override | ||
| public String convert(ItemType item) { |
Member
There was a problem hiding this comment.
Suggested change
| @Nullable | |
| @Override | |
| public String convert(ItemType item) { | |
| @Override | |
| public @Nullable String convert(ItemType item) { |
| @Nullable | ||
| @Override | ||
| public String convert(ItemType item) { | ||
| if (!(item.getMaterial() == Material.PLAYER_HEAD)) { |
Member
There was a problem hiding this comment.
Suggested change
| if (!(item.getMaterial() == Material.PLAYER_HEAD)) { | |
| if (item.getMaterial() != Material.PLAYER_HEAD) { |
lol havent seen this in a while
| return null; | ||
| } | ||
| ProfileProperty texture = profile.getProperties().stream() | ||
| .filter(p -> p.getName().equals("textures")) |
Member
There was a problem hiding this comment.
Suggested change
| .filter(p -> p.getName().equals("textures")) | |
| .filter(property -> property.getName().equals("textures")) |
p doesnt really explain what you're checking here
Comment on lines
+80
to
+84
| if (!(texture == null)) { | ||
| return texture.getValue(); | ||
| } else{ | ||
| return null; | ||
| } |
Member
There was a problem hiding this comment.
Suggested change
| if (!(texture == null)) { | |
| return texture.getValue(); | |
| } else{ | |
| return null; | |
| } | |
| if (texture == null) { | |
| return null; | |
| } | |
| return texture.getValue(); |
also use !=
| return "skull texture"; | ||
| } | ||
|
|
||
| } No newline at end of file |
Member
|
additionally you should target the dev/feature branch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Skript doesn't have it and Skbee sort of has it
Its a very useful utility used by almost every server
Solution
Adds an expression to set/get/reset/delete the skull texture of a player head
eg
set the head texture of {_i} to "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNGNhNDA3ZDNiZGI1ZDBkODAzYjViZmU1MWU4NmU5MWY4YTI5ZTg2NWZjNGNkMzYwMmVhZjA3N2EwYjg1ZGQ2NSJ9fX0="or
reset head texture of {_i}Testing Completed
Compiled and tested on 1.21.11 with no other addons it appears to work fine
Supporting Information
From testing upon texturing a player head if the name is minecraft's default value for the name (eg OwlBe's Head) then it will rename it to " 's head" else if its named eg "&cTest" it won't be renamed
Completes: none
Related: #8448
AI assistance: Tiny bit for retrieving texture value of a player head