skript-mirror enchantment type

  • 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.

stokholm

Member
Jan 30, 2017
1
0
1
23
Hello. I need help with this and was hoping someome would like to help me.
I got a hint for a person that this could be used to get enchantments of a item using skript-mirror but when i reload the skript it gives the error "cant understand this condition import..." (see attached photo)

on script load:
import "ch.njol.skript.util.EnchantmentType"

function enchantments(item: item) :: enchantment types:
set {_map} to (try {_item}.getRandom() ? {_item}).getEnchantments()
loop ...{_map}.keySet():
add new {EnchantmentType}(loop-value and {_map}.get(loop-value)) to {_enchantments::*}
return {_enchantments::*}

Version: 0.19.1
Server version: 1.8.8

Any ideas?
Im new to this mirror.
 

Attachments

  • ddd9faaeccc238a2dd1b500ac7f81f3e.png
    ddd9faaeccc238a2dd1b500ac7f81f3e.png
    19.8 KB · Views: 121
Last edited:
Status
Not open for further replies.