Add ability to use texture url in /skull #5120
Merged
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.
Information
This PR closes #3804.
Details
Proposed feature:
This lets users provide custom skins when using the
/skull
command by specifying a skin identifier instead of a username. This feature is only available on specific versions of Spigot 1.18.1 and above because it uses the new player profile API. On older versions, only a username can be used.The
/skull
command now supports the following values in the first argument:The first 7 characters of the skin identifier will be used for the skull's display name and the success message. An error message will be sent if a base64 value isn't a valid skin object.
Environments tested:
OS: Windows 11
Java version: openjdk version "17.0.1" 2021-10-19
CraftBukkit/Spigot/Paper 1.12.2CraftBukkit 1.8.8Demonstration:
I used this head as an example. The screenshot below was taken immediately after running the following commands (and switching my hotbar slot in between):