#player's head in chat with custom skin. (For offline players)

1 messages · Page 1 of 1 (latest)

slow oar
#

you can use this function, does the same (require sk-reflect):

    java.net.URL
    javax.imageio.ImageIO
    net.md_5.bungee.api.ChatColor
    java.awt.Color

function getPlayerSkin(player: offline player, display.char: string="█") :: strings:
    set {_image} to ImageIO.read(new URL("https://cravatar.eu/helmavatar/%{_player}'s uuid%/8.png"))
    loop 8 times:
        loop 8 times:
            set {_line} to (loop-value-1) - 1
            set {_skin::%{_line}%} to join {_skin::%{_line}%} and "%ChatColor.of(new Color({_image}.getRGB((loop-value-2) - 1, {_line})))%█"
    return {_skin::*}
toxic mist
slow oar
#
    trigger:
        set {_face} to ""
        set {_pixels::*} to getPlayerSkin(arg-1)
        loop {_pixels::*}:
            if (loop-index parsed as a number) = 4:
                set {_face} to "%{_face}%%loop-value%%nl%"
            else if (loop-index parsed as a number) = 5:
                set {_face} to "%{_face}%%loop-value%%nl%"
            else:
                set {_face} to "%{_face}%%loop-value%%nl%"
        send formatted "%{_face}%" to all players```
#

try this

toxic mist
#

tried on online and offline player right on my server

slow oar
#

did you use the imports?

toxic mist
#

i fixed code but it still dont work

#

it still work only 4 online players

slow oar
#

I don't understand, does it work for you or not?

toxic mist
# slow oar

it's works only for online players (With Minecraft license). If u will try to use offline players or u will use SkinRestorer to change ur skin in-game that won't work. I need to make it work for offline players. Somehow.

#

Online player with original skin

slow oar
#

I see, no man, I can't help you in your case. This only works with minecraft premium people because the skin is obtained from the url that is in the function.

toxic mist
#

ty anyway

slow oar
#

maybe if you look at the skinrestorer api and use that same skin in the function it might work for you.

#

I can only think of that idea, because if you update your skin with skinrestores it will only work on that server, it's like it's server side only.

toxic mist
#

this is the only possible way i could imagine

dense sigil
#

@slow oar how did u add text next to it?

slow oar
dense sigil
slow oar
#

example:
replace

                set {_face} to "%{_face}%%loop-value%%nl%"```
for this
```if (loop-index parsed as a number) = 4:
                set {_face} to "%{_face}%%loop-value% &cexample text %nl%"```
dense sigil
#

ahhh

#

okay

slow oar
#

try this and comment

torn elm
#

ig i can add this

toxic mist
knotty current
torn elm
#

wym

knotty current
# torn elm wym

I get an error when I try to set the player skin to a specific one

torn elm
#

which one

knotty current
#

look

#

command /skin [<text>] [<text>]: trigger: if arg-2 is not set: send "&r⤷ &x&d&b&d&5&c&3Skins:" send "&f" send " &6▎ &x&d&b&d&5&c&3/skin url url (set skin from url)" send " &6▎ &x&d&b&d&5&c&3/skin name name (set skin from name)" else: if arg-1 is "url": set {_blueprint} to classic blueprint from url "%arg-2%" set skin of player to {_blueprint} send "&r⤷ &x&d&b&d&5&c&3Loading.." if arg-1 is "name": set {_blueprint} to new blueprint from player "%arg-2%" set skin of player to {_blueprint} send "&r⤷ &x&d&b&d&5&c&3Loading.."

torn elm
#

ok what is arg-2

knotty current
#

oh wait

#

arg-2 is player name or url

torn elm
#

you made it idk

knotty current
#

like /skin name Notch

#

an error occurs when executing in both cases

torn elm
#

ok send errr

knotty current
#

ok wait

#

oh, it working on some names, on other names may occurs error and server tps drops until 17-18 but i have powerful server

torn elm
#

send full error pllz

knotty current
#

and i cant set skin from any url

torn elm
#

opk i will fix this next update

knotty current
slow oar
torn elm
#

@toxic mist

toxic mist
#

ty

torn elm
#

it will be released next update