Send resource pack with skript-mirror

  • 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 comminuty!

    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,

Since I won't be able to update Skript anymore because of the aliase update and the change of vanilla commands in 1.13 I needed to work with Skript's "send resource pack with hash" effect but it hand't been released in the version I'm using yet. As a workaround could anyone tell me how I would achieve the same result using skript-mirror?

Thanks in advance.
 
code_language.skript:
import:
    org.bukkit.entity.Player
command sendRP:
    trigger:
        set {_p} to player
        {_p}.setResourcePack("DIRECT DOWNLOAD LINK")
It might work :emoji_slight_smile:
 
Ok so I edited your code a bit so it fits more what i'm looking for
Code:
import:
    org.bukkit.entity.Player

function sendRP(p: player):
    {_p}.setResourcePack("pack.zip")
side question: do I really need to import that thing?
 
Last edited:
Ok so I edited your code a bit so it fits more what i'm looking for
Code:
import:
    org.bukkit.entity.Player

function sendRP(p: player):
    {_p}.setResourcePack("https://dl.dropboxusercontent.com/s/bwhh7q1ur3mt2fi/Island_Craft-26-05-2020.zip?dl=1")
side question: do I really need to import that thing?
You don't need to import it.
 
You don't need to import it.
Okay thanks.
[doublepost=1590536658,1590518322][/doublepost]Okay so if I use the method without the hash it will work just fine but when I add it the RP won't load. Help!

EDIT: this is the error that shows up (i hid the resource pack link)
615DBB88-AFF4-4943-A34D-584A392F94BB.jpeg
 
Last edited:
send the hash,

there might be some letters that needs to be doubled eg. "%" +

You are typing the URL outside the quotes

it is not CraftPlayer just player

Wen you cast somthin' the cast need to be in first,

What is the second arg in the method?
 
Okay thanks.
[doublepost=1590536658,1590518322][/doublepost]Okay so if I use the method without the hash it will work just fine but when I add it the RP won't load. Help!

EDIT: this is the error that shows up (i hid the resource pack link)
View attachment 4756
The second argument is a byte array, but your argument is a string.
Use `DatatypeConverter.parseHexBinary({_string})` (javax.xml.bind.DatatypeConverter)
 
send the hash,

there might be some letters that needs to be doubled eg. "%" +

You are typing the URL outside the quotes

it is not CraftPlayer just player

Wen you cast somthin' the cast need to be in first,

What is the second arg in the method?
I did double the "%", the url was inside of a variable so it just shows up like that in the console. I have no idea what a CraftPlayer is but I'm gonna try to look into it (although I don't think this what's causing it as calling the method without the hash works just fine) and wdym with cast?
The second argument is a byte array, but your argument is a string.
Use `DatatypeConverter.parseHexBinary({_string})` (javax.xml.bind.DatatypeConverter)
Yeah I thought about that. Don't know how to use it though, I'm very new to skript-mirror and all this java syntax. I'm gonna look into this first because I'm almost sure this is the problem
 
I did double the "%", the url was inside of a variable so it just shows up like that in the console. I have no idea what a CraftPlayer is but I'm gonna try to look into it (although I don't think this what's causing it as calling the method without the hash works just fine) and wdym with cast?

Yeah I thought about that. Don't know how to use it though, I'm very new to skript-mirror and all this java syntax. I'm gonna look into this first because I'm almost sure this is the problem


cast = (String) you did but it can be anything
 
Code:
import:
    org.bukkit.entity.Player
    javax.xml.bind.DatatypeConverter

function sendRP(p: player):
    set {_link} to "mylink.zip"
    set {_hash} to {_link} hashed with MD5
    DatatypeConverter.parseHexBinary({_hash})
    {_p}.setResourcePack({_link}, {_hash})
So this is my current code and it gives me this error when I call the function:
Code:
[ERROR] #!#!

[ERROR] #!#! [Skript] Severe Error:

[ERROR] #!#!

[ERROR] #!#! Something went horribly wrong with Skript.

[ERROR] #!#! This issue is NOT your fault! You probably can't fix it yourself, either.

[ERROR] #!#! It looks like you are using some plugin(s) that alter how Skript works (addons).

[ERROR] #!#! Here is full list of them:

[ERROR] #!#! skript-mirror SK-NBeeT (https://github.com/ShaneBeee/Sk-NBeeT) skDragon SkStuff MCJukebox MundoSK (https://forums.skunity.com/resources/mundosk.69/) SkQuery Skellett (https://forums.skunity.com/resources/skellett-the-addon-with-a-beast-name.24/)

[ERROR] #!#! We could not identify which of those are specially related, so this might also be Skript issue.

[ERROR] #!#! You should try disabling those plugins one by one, trying to find which one causes it.

[ERROR] #!#! If the error doesn't disappear even after disabling all listed plugins, it is probably Skript issue.

[ERROR] #!#! In that case, you will be given instruction on how should you report it.

[ERROR] #!#! On the other hand, if the error disappears when disabling some plugin, report it to author of that plugin.

[ERROR] #!#! Only if the author tells you to do so, report it as Skript issue (url below)

[ERROR] #!#! Issue tracker: https://github.com/SkriptLang/Skript/issues (only if you know what you're doing!)

[ERROR] #!#!

[ERROR] #!#! Stack trace:

[ERROR] #!#! java.lang.ClassCastException: [B incompatible with [Ljava.lang.Object;

[ERROR] #!#! at ch.njol.skript.registrations.Classes.toString(Classes.java:585)

[ERROR] #!#! at ch.njol.skript.registrations.Classes.toString(Classes.java:569)

[ERROR] #!#! at com.btk5h.skriptmirror.skript.reflect.ExprJavaCall.lambda$toString$7(ExprJavaCall.java:251)

[ERROR] #!#! at com.btk5h.skriptmirror.skript.reflect.ExprJavaCall$$Lambda$206.000000008150FF10.apply(Unknown Source)

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

[ERROR] #!#! at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)

[ERROR] #!#! at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:497)

[ERROR] #!#! at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:487)

[ERROR] #!#! at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)

[ERROR] #!#! at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:241)

[ERROR] #!#! at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)

[ERROR] #!#! at com.btk5h.skriptmirror.skript.reflect.ExprJavaCall.toString(ExprJavaCall.java:252)

[ERROR] #!#! at com.btk5h.skriptmirror.skript.reflect.ExprJavaCall.invoke(ExprJavaCall.java:226)

[ERROR] #!#! at com.btk5h.skriptmirror.skript.reflect.ExprJavaCall.getAll(ExprJavaCall.java:435)

[ERROR] #!#! at com.btk5h.skriptmirror.skript.reflect.ExprJavaCall.check(ExprJavaCall.java:460)

[ERROR] #!#! at com.w00tmast3r.skquery.elements.conditions.CondBoolean.check(CondBoolean.java:25)

[ERROR] #!#! at ch.njol.skript.lang.Condition.run(Condition.java:56)

[ERROR] #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:61)

[ERROR] #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:89)

[ERROR] #!#! at ch.njol.skript.lang.Trigger.execute(Trigger.java:55)

[ERROR] #!#! at ch.njol.skript.lang.function.ScriptFunction.execute(ScriptFunction.java:93)

[ERROR] #!#! at ch.njol.skript.lang.function.Function.execute(Function.java:119)

[ERROR] #!#! at ch.njol.skript.lang.function.FunctionReference.execute(FunctionReference.java:204)

[ERROR] #!#! at ch.njol.skript.lang.function.EffFunctionCall.execute(EffFunctionCall.java:53)

[ERROR] #!#! at ch.njol.skript.lang.Effect.run(Effect.java:52)

[ERROR] #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:61)

[ERROR] #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:89)

[ERROR] #!#! at ch.njol.skript.effects.Delay$1.run(Delay.java:101)

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

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

[ERROR] #!#! at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:739)

[ERROR] #!#! at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:406)

[ERROR] #!#! at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:679)

[ERROR] #!#! at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:577)

[ERROR] #!#! at java.lang.Thread.run(Thread.java:813)

[ERROR] #!#!

[ERROR] #!#! Version Information:

[ERROR] #!#! Skript: 2.2-dev36 (custom version)

[ERROR] #!#! Bukkit: 1.12.2-R0.1-SNAPSHOT

[ERROR] #!#! Minecraft: 1.12.2

[ERROR] #!#! Java: 1.8.0_212 (Eclipse OpenJ9 VM openj9-0.14.0)

[ERROR] #!#! OS: Linux amd64 4.15.0-64-generic

[ERROR] #!#!

[ERROR] #!#! Server platform: Spigot

[ERROR] #!#!

[ERROR] #!#! Current node: null

[ERROR] #!#! Current item: Boolean condition

[ERROR] #!#! Current trigger: function sendRP (simple event) (fw.sk, line -1)

[ERROR] #!#!

[ERROR] #!#! Thread: Server thread

[ERROR] #!#!

[ERROR] #!#! Language: english

[ERROR] #!#! Link parse mode: DISABLED

[ERROR] #!#!

[ERROR] #!#! End of Error.

[ERROR] #!#!
 
second argument is a byte array
[doublepost=1590571418,1590571368][/doublepost]
second argument is a byte array
Code:
import:
    org.bukkit.entity.Player
    javax.xml.bind.DatatypeConverter

function sendRP(p: player):
    set {_link} to "mylink.zip"
    set {_hash} to {_link} hashed with MD5
    DatatypeConverter.parseHexBinary({_hash})
    {_p}.setResourcePack({_link}, {_hash})
So this is my current code and it gives me this error when I call the function:
Code:
[ERROR] #!#!

[ERROR] #!#! [Skript] Severe Error:

[ERROR] #!#!

[ERROR] #!#! Something went horribly wrong with Skript.

[ERROR] #!#! This issue is NOT your fault! You probably can't fix it yourself, either.

[ERROR] #!#! It looks like you are using some plugin(s) that alter how Skript works (addons).

[ERROR] #!#! Here is full list of them:

[ERROR] #!#! skript-mirror SK-NBeeT (https://github.com/ShaneBeee/Sk-NBeeT) skDragon SkStuff MCJukebox MundoSK (https://forums.skunity.com/resources/mundosk.69/) SkQuery Skellett (https://forums.skunity.com/resources/skellett-the-addon-with-a-beast-name.24/)

[ERROR] #!#! We could not identify which of those are specially related, so this might also be Skript issue.

[ERROR] #!#! You should try disabling those plugins one by one, trying to find which one causes it.

[ERROR] #!#! If the error doesn't disappear even after disabling all listed plugins, it is probably Skript issue.

[ERROR] #!#! In that case, you will be given instruction on how should you report it.

[ERROR] #!#! On the other hand, if the error disappears when disabling some plugin, report it to author of that plugin.

[ERROR] #!#! Only if the author tells you to do so, report it as Skript issue (url below)

[ERROR] #!#! Issue tracker: https://github.com/SkriptLang/Skript/issues (only if you know what you're doing!)

[ERROR] #!#!

[ERROR] #!#! Stack trace:

[ERROR] #!#! java.lang.ClassCastException: [B incompatible with [Ljava.lang.Object;

[ERROR] #!#! at ch.njol.skript.registrations.Classes.toString(Classes.java:585)

[ERROR] #!#! at ch.njol.skript.registrations.Classes.toString(Classes.java:569)

[ERROR] #!#! at com.btk5h.skriptmirror.skript.reflect.ExprJavaCall.lambda$toString$7(ExprJavaCall.java:251)

[ERROR] #!#! at com.btk5h.skriptmirror.skript.reflect.ExprJavaCall$$Lambda$206.000000008150FF10.apply(Unknown Source)

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

[ERROR] #!#! at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)

[ERROR] #!#! at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:497)

[ERROR] #!#! at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:487)

[ERROR] #!#! at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)

[ERROR] #!#! at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:241)

[ERROR] #!#! at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)

[ERROR] #!#! at com.btk5h.skriptmirror.skript.reflect.ExprJavaCall.toString(ExprJavaCall.java:252)

[ERROR] #!#! at com.btk5h.skriptmirror.skript.reflect.ExprJavaCall.invoke(ExprJavaCall.java:226)

[ERROR] #!#! at com.btk5h.skriptmirror.skript.reflect.ExprJavaCall.getAll(ExprJavaCall.java:435)

[ERROR] #!#! at com.btk5h.skriptmirror.skript.reflect.ExprJavaCall.check(ExprJavaCall.java:460)

[ERROR] #!#! at com.w00tmast3r.skquery.elements.conditions.CondBoolean.check(CondBoolean.java:25)

[ERROR] #!#! at ch.njol.skript.lang.Condition.run(Condition.java:56)

[ERROR] #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:61)

[ERROR] #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:89)

[ERROR] #!#! at ch.njol.skript.lang.Trigger.execute(Trigger.java:55)

[ERROR] #!#! at ch.njol.skript.lang.function.ScriptFunction.execute(ScriptFunction.java:93)

[ERROR] #!#! at ch.njol.skript.lang.function.Function.execute(Function.java:119)

[ERROR] #!#! at ch.njol.skript.lang.function.FunctionReference.execute(FunctionReference.java:204)

[ERROR] #!#! at ch.njol.skript.lang.function.EffFunctionCall.execute(EffFunctionCall.java:53)

[ERROR] #!#! at ch.njol.skript.lang.Effect.run(Effect.java:52)

[ERROR] #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:61)

[ERROR] #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:89)

[ERROR] #!#! at ch.njol.skript.effects.Delay$1.run(Delay.java:101)

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

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

[ERROR] #!#! at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:739)

[ERROR] #!#! at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:406)

[ERROR] #!#! at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:679)

[ERROR] #!#! at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:577)

[ERROR] #!#! at java.lang.Thread.run(Thread.java:813)

[ERROR] #!#!

[ERROR] #!#! Version Information:

[ERROR] #!#! Skript: 2.2-dev36 (custom version)

[ERROR] #!#! Bukkit: 1.12.2-R0.1-SNAPSHOT

[ERROR] #!#! Minecraft: 1.12.2

[ERROR] #!#! Java: 1.8.0_212 (Eclipse OpenJ9 VM openj9-0.14.0)

[ERROR] #!#! OS: Linux amd64 4.15.0-64-generic

[ERROR] #!#!

[ERROR] #!#! Server platform: Spigot

[ERROR] #!#!

[ERROR] #!#! Current node: null

[ERROR] #!#! Current item: Boolean condition

[ERROR] #!#! Current trigger: function sendRP (simple event) (fw.sk, line -1)

[ERROR] #!#!

[ERROR] #!#! Thread: Server thread

[ERROR] #!#!

[ERROR] #!#! Language: english

[ERROR] #!#! Link parse mode: DISABLED

[ERROR] #!#!

[ERROR] #!#! End of Error.

[ERROR] #!#!

Try "yourlink.com/[UR HASH]" or your link format
[doublepost=1590571487][/doublepost]
second argument is a byte array
[doublepost=1590571418,1590571368][/doublepost]


Try "yourlink.com/[UR HASH]" or your link format
Code:
import:
    org.bukkit.entity.Player
    javax.xml.bind.DatatypeConverter

function sendRP(p: player):
    set {_link} to "mylink.zip"
    set {_hash} to {_link} hashed with MD5
    DatatypeConverter.parseHexBinary({_hash})
    {_p}.setResourcePack({_link}, {_hash})
So this is my current code and it gives me this error when I call the function:
Code:
[ERROR] #!#!

[ERROR] #!#! [Skript] Severe Error:

[ERROR] #!#!

[ERROR] #!#! Something went horribly wrong with Skript.

[ERROR] #!#! This issue is NOT your fault! You probably can't fix it yourself, either.

[ERROR] #!#! It looks like you are using some plugin(s) that alter how Skript works (addons).

[ERROR] #!#! Here is full list of them:

[ERROR] #!#! skript-mirror SK-NBeeT (https://github.com/ShaneBeee/Sk-NBeeT) skDragon SkStuff MCJukebox MundoSK (https://forums.skunity.com/resources/mundosk.69/) SkQuery Skellett (https://forums.skunity.com/resources/skellett-the-addon-with-a-beast-name.24/)

[ERROR] #!#! We could not identify which of those are specially related, so this might also be Skript issue.

[ERROR] #!#! You should try disabling those plugins one by one, trying to find which one causes it.

[ERROR] #!#! If the error doesn't disappear even after disabling all listed plugins, it is probably Skript issue.

[ERROR] #!#! In that case, you will be given instruction on how should you report it.

[ERROR] #!#! On the other hand, if the error disappears when disabling some plugin, report it to author of that plugin.

[ERROR] #!#! Only if the author tells you to do so, report it as Skript issue (url below)

[ERROR] #!#! Issue tracker: https://github.com/SkriptLang/Skript/issues (only if you know what you're doing!)

[ERROR] #!#!

[ERROR] #!#! Stack trace:

[ERROR] #!#! java.lang.ClassCastException: [B incompatible with [Ljava.lang.Object;

[ERROR] #!#! at ch.njol.skript.registrations.Classes.toString(Classes.java:585)

[ERROR] #!#! at ch.njol.skript.registrations.Classes.toString(Classes.java:569)

[ERROR] #!#! at com.btk5h.skriptmirror.skript.reflect.ExprJavaCall.lambda$toString$7(ExprJavaCall.java:251)

[ERROR] #!#! at com.btk5h.skriptmirror.skript.reflect.ExprJavaCall$$Lambda$206.000000008150FF10.apply(Unknown Source)

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

[ERROR] #!#! at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)

[ERROR] #!#! at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:497)

[ERROR] #!#! at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:487)

[ERROR] #!#! at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)

[ERROR] #!#! at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:241)

[ERROR] #!#! at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)

[ERROR] #!#! at com.btk5h.skriptmirror.skript.reflect.ExprJavaCall.toString(ExprJavaCall.java:252)

[ERROR] #!#! at com.btk5h.skriptmirror.skript.reflect.ExprJavaCall.invoke(ExprJavaCall.java:226)

[ERROR] #!#! at com.btk5h.skriptmirror.skript.reflect.ExprJavaCall.getAll(ExprJavaCall.java:435)

[ERROR] #!#! at com.btk5h.skriptmirror.skript.reflect.ExprJavaCall.check(ExprJavaCall.java:460)

[ERROR] #!#! at com.w00tmast3r.skquery.elements.conditions.CondBoolean.check(CondBoolean.java:25)

[ERROR] #!#! at ch.njol.skript.lang.Condition.run(Condition.java:56)

[ERROR] #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:61)

[ERROR] #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:89)

[ERROR] #!#! at ch.njol.skript.lang.Trigger.execute(Trigger.java:55)

[ERROR] #!#! at ch.njol.skript.lang.function.ScriptFunction.execute(ScriptFunction.java:93)

[ERROR] #!#! at ch.njol.skript.lang.function.Function.execute(Function.java:119)

[ERROR] #!#! at ch.njol.skript.lang.function.FunctionReference.execute(FunctionReference.java:204)

[ERROR] #!#! at ch.njol.skript.lang.function.EffFunctionCall.execute(EffFunctionCall.java:53)

[ERROR] #!#! at ch.njol.skript.lang.Effect.run(Effect.java:52)

[ERROR] #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:61)

[ERROR] #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:89)

[ERROR] #!#! at ch.njol.skript.effects.Delay$1.run(Delay.java:101)

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

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

[ERROR] #!#! at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:739)

[ERROR] #!#! at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:406)

[ERROR] #!#! at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:679)

[ERROR] #!#! at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:577)

[ERROR] #!#! at java.lang.Thread.run(Thread.java:813)

[ERROR] #!#!

[ERROR] #!#! Version Information:

[ERROR] #!#! Skript: 2.2-dev36 (custom version)

[ERROR] #!#! Bukkit: 1.12.2-R0.1-SNAPSHOT

[ERROR] #!#! Minecraft: 1.12.2

[ERROR] #!#! Java: 1.8.0_212 (Eclipse OpenJ9 VM openj9-0.14.0)

[ERROR] #!#! OS: Linux amd64 4.15.0-64-generic

[ERROR] #!#!

[ERROR] #!#! Server platform: Spigot

[ERROR] #!#!

[ERROR] #!#! Current node: null

[ERROR] #!#! Current item: Boolean condition

[ERROR] #!#! Current trigger: function sendRP (simple event) (fw.sk, line -1)

[ERROR] #!#!

[ERROR] #!#! Thread: Server thread

[ERROR] #!#!

[ERROR] #!#! Language: english

[ERROR] #!#! Link parse mode: DISABLED

[ERROR] #!#!

[ERROR] #!#! End of Error.

[ERROR] #!#!
If it does not work i'll try to send u MD5 hash converter
 
Code:
import:
    org.bukkit.entity.Player
    javax.xml.bind.DatatypeConverter

function sendRP(p: player):
    set {_link} to "mylink.zip"
    set {_hash} to {_link} hashed with MD5
    DatatypeConverter.parseHexBinary({_hash})
    {_p}.setResourcePack({_link}, {_hash})
So this is my current code and it gives me this error when I call the function:
Code:
[ERROR] #!#!

[ERROR] #!#! [Skript] Severe Error:

[ERROR] #!#!

[ERROR] #!#! Something went horribly wrong with Skript.

[ERROR] #!#! This issue is NOT your fault! You probably can't fix it yourself, either.

[ERROR] #!#! It looks like you are using some plugin(s) that alter how Skript works (addons).

[ERROR] #!#! Here is full list of them:

[ERROR] #!#! skript-mirror SK-NBeeT (https://github.com/ShaneBeee/Sk-NBeeT) skDragon SkStuff MCJukebox MundoSK (https://forums.skunity.com/resources/mundosk.69/) SkQuery Skellett (https://forums.skunity.com/resources/skellett-the-addon-with-a-beast-name.24/)

[ERROR] #!#! We could not identify which of those are specially related, so this might also be Skript issue.

[ERROR] #!#! You should try disabling those plugins one by one, trying to find which one causes it.

[ERROR] #!#! If the error doesn't disappear even after disabling all listed plugins, it is probably Skript issue.

[ERROR] #!#! In that case, you will be given instruction on how should you report it.

[ERROR] #!#! On the other hand, if the error disappears when disabling some plugin, report it to author of that plugin.

[ERROR] #!#! Only if the author tells you to do so, report it as Skript issue (url below)

[ERROR] #!#! Issue tracker: https://github.com/SkriptLang/Skript/issues (only if you know what you're doing!)

[ERROR] #!#!

[ERROR] #!#! Stack trace:

[ERROR] #!#! java.lang.ClassCastException: [B incompatible with [Ljava.lang.Object;

[ERROR] #!#! at ch.njol.skript.registrations.Classes.toString(Classes.java:585)

[ERROR] #!#! at ch.njol.skript.registrations.Classes.toString(Classes.java:569)

[ERROR] #!#! at com.btk5h.skriptmirror.skript.reflect.ExprJavaCall.lambda$toString$7(ExprJavaCall.java:251)

[ERROR] #!#! at com.btk5h.skriptmirror.skript.reflect.ExprJavaCall$$Lambda$206.000000008150FF10.apply(Unknown Source)

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

[ERROR] #!#! at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)

[ERROR] #!#! at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:497)

[ERROR] #!#! at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:487)

[ERROR] #!#! at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)

[ERROR] #!#! at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:241)

[ERROR] #!#! at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)

[ERROR] #!#! at com.btk5h.skriptmirror.skript.reflect.ExprJavaCall.toString(ExprJavaCall.java:252)

[ERROR] #!#! at com.btk5h.skriptmirror.skript.reflect.ExprJavaCall.invoke(ExprJavaCall.java:226)

[ERROR] #!#! at com.btk5h.skriptmirror.skript.reflect.ExprJavaCall.getAll(ExprJavaCall.java:435)

[ERROR] #!#! at com.btk5h.skriptmirror.skript.reflect.ExprJavaCall.check(ExprJavaCall.java:460)

[ERROR] #!#! at com.w00tmast3r.skquery.elements.conditions.CondBoolean.check(CondBoolean.java:25)

[ERROR] #!#! at ch.njol.skript.lang.Condition.run(Condition.java:56)

[ERROR] #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:61)

[ERROR] #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:89)

[ERROR] #!#! at ch.njol.skript.lang.Trigger.execute(Trigger.java:55)

[ERROR] #!#! at ch.njol.skript.lang.function.ScriptFunction.execute(ScriptFunction.java:93)

[ERROR] #!#! at ch.njol.skript.lang.function.Function.execute(Function.java:119)

[ERROR] #!#! at ch.njol.skript.lang.function.FunctionReference.execute(FunctionReference.java:204)

[ERROR] #!#! at ch.njol.skript.lang.function.EffFunctionCall.execute(EffFunctionCall.java:53)

[ERROR] #!#! at ch.njol.skript.lang.Effect.run(Effect.java:52)

[ERROR] #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:61)

[ERROR] #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:89)

[ERROR] #!#! at ch.njol.skript.effects.Delay$1.run(Delay.java:101)

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

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

[ERROR] #!#! at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:739)

[ERROR] #!#! at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:406)

[ERROR] #!#! at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:679)

[ERROR] #!#! at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:577)

[ERROR] #!#! at java.lang.Thread.run(Thread.java:813)

[ERROR] #!#!

[ERROR] #!#! Version Information:

[ERROR] #!#! Skript: 2.2-dev36 (custom version)

[ERROR] #!#! Bukkit: 1.12.2-R0.1-SNAPSHOT

[ERROR] #!#! Minecraft: 1.12.2

[ERROR] #!#! Java: 1.8.0_212 (Eclipse OpenJ9 VM openj9-0.14.0)

[ERROR] #!#! OS: Linux amd64 4.15.0-64-generic

[ERROR] #!#!

[ERROR] #!#! Server platform: Spigot

[ERROR] #!#!

[ERROR] #!#! Current node: null

[ERROR] #!#! Current item: Boolean condition

[ERROR] #!#! Current trigger: function sendRP (simple event) (fw.sk, line -1)

[ERROR] #!#!

[ERROR] #!#! Thread: Server thread

[ERROR] #!#!

[ERROR] #!#! Language: english

[ERROR] #!#! Link parse mode: DISABLED

[ERROR] #!#!

[ERROR] #!#! End of Error.

[ERROR] #!#!
The method I send earlier, returns a byte array, so you'll have to save its output. Also, you need to hash the zip file (not the string) with SHA-1, not MD5:
hash - The sha1 hash sum of the resource pack file which is used to apply a cached version of the pack directly without downloading if it is available. Hast to be 20 bytes long!
Also, make sure you have an actual url in there (not sure if you've got `mylink.zip` because you don't want to show the url or because that's what you have in the script)
 
second argument is a byte array
[doublepost=1590571418,1590571368][/doublepost]


Try "yourlink.com/[UR HASH]" or your link format
[doublepost=1590571487][/doublepost]

If it does not work i'll try to send u MD5 hash converter
Ok so using the slash thing worked
Code:
function sendRP(p: player):
    set {_link} to "myurl.zip"
    set {_hash} to {_link} hashed with MD5
    {_p}.setResourcePack("%{_link}%/%{_hash}%")
The resource pack gets sent and I'm able to download it, but if I change add any textures to it the RP doesn't update automatically like it should when you specify a hash. So basically it's like I didn't specify any hash.
The method I send earlier, returns a byte array, so you'll have to save its output. Also, you need to hash the zip file (not the string) with SHA-1, not MD5:
Also, make sure you have an actual url in there (not sure if you've got `mylink.zip` because you don't want to show the url or because that's what you have in the script)

Ok I'm gonna try this. And yes I wrote "mylink.zip" cause I didn't want to show the real one lol i'm not that stupid
[doublepost=1590575145][/doublepost]
Code:
function sendRP(p: player):
    set {_link} to "myurl.zip"
    set {_hash} to "32ff533b4917787841e096532b0606aadf270c5d"
    set {_convertedHash::*} to DatatypeConverter.parseHexBinary({_hash})
    {_p}.setResourcePack({_link}, {_convertedHash::*})
Code:
[WARNING] [Skript] No matching method: CraftPlayer#setResourcePack called with (myurl.zip (String), [50, -1, 83, 59, 73, 23, 120, 120, 65, -32, -106, 83, 43, 6, 6, -86, -33, 39, 12, 93] (Object[]))
I converted the string to a SHA-1 hash, tried doing this and it gave me this error (I also hid the url on the error).

EDIT: I didn't notice when you said "you need to hash the file, not the string". I hashed the file, replaced the hash in the code with this one e0d2f0373c1befd029b67a56b976db86705e2b45 and it still gives me the last error.
 
Last edited:
Status
Not open for further replies.