Solved Set a player's skin through url

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

PatoFrango

Active Member
Jul 12, 2017
240
14
18
Hi,

I'd like to know if there's a way to set the skin of a player through the url of the image, not by grabbing the skin of an already existing user. Thanks in advance.
[doublepost=1586425270,1586373154][/doublepost]bump
[doublepost=1586521027][/doublepost]bump
[doublepost=1586951822][/doublepost]bump
[doublepost=1587206795][/doublepost]bump
 
Well, from the addon's description it seems to be exactly what I'm looking for. I honestly have no idea how I wasn't able to find this earlier. I will give it a go and then I'll let you know how it turned out. Thank you for now!

EDIT: Just realized it requires Spigot 1.13+ and I'm on 1.12.2 (and can't update). Is there a way to do what I asked on 1.12?

EDIT 2: Ok so I installed it and apparently it works, but now I'm having a different issue:
Code:
on join:
    retrieve skin from url "mylinklol.png" into {_skin}
    set player's displayed skin to {_skin}
So I tried to do it with this code, but when I join the server nothing happens. I tried printing out the value of {_skin} and it does return me a big string, so the problem isn't when retrieving the skin, it's probably when trying to set it. I opened the console and it gave me this error:
Code:
[INFO] [Tablisknu] An exception has occured within Tablisknu

[INFO] [Tablisknu] Please create an issue regarding this on Tablisknu's GitHub page: (no github link available yet, but you can join the skript discord chat at https://discord.gg/vb9dGbu for help)

[INFO] [Tablisknu] You can also run the '/tablisknu desc' command and go to one of the links provided for help.

[INFO] [Tablisknu] Bukkit/Spigot version: git-Spigot-eb3d921-2b93d83 (MC: 1.12.2)

[INFO] [Tablisknu] Skript version: 2.2-dev36

[INFO] [Tablisknu] Tablisknu version: 1.0

[INFO] [Tablisknu] Exception at ProfileManager

[WARNING] java.lang.NullPointerException

[WARNING] at us.tlatoani.tablisknu.skin.ProfileManager.respawnPlayer(ProfileManager.java:255)

[WARNING] at us.tlatoani.tablisknu.skin.ProfileManager.refreshPlayer(ProfileManager.java:231)

[WARNING] at us.tlatoani.tablisknu.skin.ModifiableProfile$Specific.changeDisplayedSkin(ModifiableProfile.java:141)

[WARNING] at us.tlatoani.tablisknu.skin.ModifiableProfile$Specific.access$300(ModifiableProfile.java:128)

[WARNING] at us.tlatoani.tablisknu.skin.ModifiableProfile.lambda$consistentlySetDisplayedSkin$6(ModifiableProfile.java:104)

[WARNING] at us.tlatoani.tablisknu.skin.ModifiableProfile$$Lambda$185.00000000ECF67980.accept(Unknown Source)

[WARNING] at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)

[WARNING] at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)

[WARNING] at java.util.Iterator.forEachRemaining(Iterator.java:116)

[WARNING] at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)

[WARNING] at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:497)

[WARNING] at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:487)

[WARNING] at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)

[WARNING] at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)

[WARNING] at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:241)

[WARNING] at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)

[WARNING] at us.tlatoani.tablisknu.skin.ModifiableProfile.consistentlySetDisplayedSkin(ModifiableProfile.java:102)

[WARNING] at us.tlatoani.tablisknu.skin.ExprDisplayedSkinOfPlayer.change(ExprDisplayedSkinOfPlayer.java:108)

[WARNING] at ch.njol.skript.effects.EffChange.execute(EffChange.java:271)

[WARNING] at ch.njol.skript.lang.Effect.run(Effect.java:52)

[WARNING] at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:61)

[WARNING] at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:89)

[WARNING] at us.tlatoani.tablisknu.skin.retrieval.EffRetrieveSkin.afterRetrieval(EffRetrieveSkin.java:93)

[WARNING] at us.tlatoani.tablisknu.skin.retrieval.EffRetrieveSkin.lambda$walk$1(EffRetrieveSkin.java:51)

[WARNING] at us.tlatoani.tablisknu.skin.retrieval.EffRetrieveSkin$$Lambda$181.00000000ECDFF960.accept(Unknown Source)

[WARNING] at us.tlatoani.tablisknu.skin.retrieval.MineSkinRetrieval.lambda$null$0(MineSkinRetrieval.java:49)

[WARNING] at us.tlatoani.tablisknu.skin.retrieval.MineSkinRetrieval$$Lambda$183.00000000E0025A90.run(Unknown Source)

[WARNING] at org.bukkit.craftbukkit.v1_12_R1.scheduler.CraftTask.run(CraftTask.java:76)

[WARNING] at org.bukkit.craftbukkit.v1_12_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:361)

[WARNING] at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:739)

[WARNING] at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:406)

[WARNING] at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:679)

[WARNING] at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:577)

[WARNING] at java.lang.Thread.run(Thread.java:813)
This is much likely because I'm trying to run it on 1.12.2. Still, any ideas?

EDIT 3: Okay nevermind, I just realized MundoSK has the exact same effects and works on 1.12. It works now, but I remember that I’ve tried to use MundoSK in the past and it was a pain in the ass (can't remember exactly why but I remember it bugged the whole server). I hope I don't find anything bad.

SO THE ANSWER HERE IS if you're on 1.13+, use Tablisknu to set a skin from an url/file. If you're on 1.12 or earlier, go with MundoSK.

Thank you @Lego_freak1999 ! That helped a lot :emoji_slight_smile:
 
Last edited:
  • Like
Reactions: Lego_freak1999
Status
Not open for further replies.