Need help with nbt

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

Danielh90

Member
Jan 8, 2018
10
0
0
24
Hello, I have this code here
code_language.skript:
make console execute command "/give %player% diamond_hoe 1 1 {HideFlags:4,Unbreakable:1}"
I need to be able to add a name and a lore too it. How should I do that? I tried named and stuff but it came up with errors.

Would this work? (When I test this out it does not work)
code_language.skript:
: give player a diamond_hoe with custom nbt "{Unbreakable:1,HideFlags:4}" named "Test" with lore "Test"


Also at the moment I have this working. I need to hide the unbreakable tag.
code_language.skript:
     give player an unbreakable diamond hoe:1 named "Tool 1" with lore "&cTool 1." with no nbt
 
Last edited:
Part of this is just understanding how Skript handles stuff; specifying a name and lore will likely override the custom NBT since they're both separately taking the base item ("diamond_hoe") and modifying it. That being said, you should be able to just add the name and lore directly in the NBT:
code_language.skript:
give player a diamond_hoe with custom nbt "{Unbreakable:1,HideFlags:4,display:{Name:""Test Name"", Lore:[""Line 1 of example lore"", ""Line 2 of example lore""]}}"
 
  • Like
Reactions: Abdera7mane
alternately, you can just put the custom nbt before the other shit. I also made this none nbt based solution for skript-mirror:
code_language.skript:
on script load:
  import "org.bukkit.inventory.ItemFlag"
get expression hide (0¦attributes|1¦destroy[s]|2¦enchant[s]|3¦(placed|built|build) [on]|4¦potion effects|5¦unbreakable):
  switch parse mark:
    case 0:
      continue returning {ItemFlag}.HIDE_ATTRIBUTES!
    case 1:
      continue returning {ItemFlag}.HIDE_DESTROYS!
    case 2:
      continue returning {ItemFlag}.HIDE_ENCHANTS!
    case 3:
      continue returning {ItemFlag}.HIDE_PLACED_ON!
    case 4:
      continue returning {ItemFlag}.HIDE_POTION_EFFECTS!
    case 5:
      continue returning {ItemFlag}.HIDE_UNBREAKABLE!
get expression %itemstack% with [item] flag[s] %objects%:
  set {_item} to first element out of (try ((expression 1).getRandom()) and expression 1)
  set {_stack} to {_item}.clone()
  set {_meta} to {_stack}.getItemMeta()
  {_meta}.addItemFlags([expressions 2 as {ItemFlag}]);
  {_stack}.setItemMeta({_meta});
  continue returning {_stack}
 
alternately, you can just put the custom nbt before the other shit. I also made this none nbt based solution for skript-mirror:
code_language.skript:
on script load:
  import "org.bukkit.inventory.ItemFlag"
get expression hide (0¦attributes|1¦destroy[s]|2¦enchant[s]|3¦(placed|built|build) [on]|4¦potion effects|5¦unbreakable):
  switch parse mark:
    case 0:
      continue returning {ItemFlag}.HIDE_ATTRIBUTES!
    case 1:
      continue returning {ItemFlag}.HIDE_DESTROYS!
    case 2:
      continue returning {ItemFlag}.HIDE_ENCHANTS!
    case 3:
      continue returning {ItemFlag}.HIDE_PLACED_ON!
    case 4:
      continue returning {ItemFlag}.HIDE_POTION_EFFECTS!
    case 5:
      continue returning {ItemFlag}.HIDE_UNBREAKABLE!
get expression %itemstack% with [item] flag[s] %objects%:
  set {_item} to first element out of (try ((expression 1).getRandom()) and expression 1)
  set {_stack} to {_item}.clone()
  set {_meta} to {_stack}.getItemMeta()
  {_meta}.addItemFlags([expressions 2 as {ItemFlag}]);
  {_stack}.setItemMeta({_meta});
  continue returning {_stack}
can you provide an example please, i have no idea how to use it?
 
can you provide an example please, i have no idea how to use it?
code_language.skript:
give dirt with flag hide enchants to player

it is untested code that i wrote off the top of my head, but nobody ever came back with issues so i assume it works
 
code_language.skript:
give dirt with flag hide enchants to player

it is untested code that i wrote off the top of my head, but nobody ever came back with issues so i assume it works
Ah I see, I gave it a try and i got a can't understand this expression error, this is the line:
code_language.skript:
set slot 0 of player's current inventory to unbreakable diamond hoe:11 with flag hide unbreakable
I have skript-mirror 0.8.3, spigot 1.12.2, skript bensku dev32c
 
Ah I see, I gave it a try and i got a can't understand this expression error, this is the line:
code_language.skript:
set slot 0 of player's current inventory to unbreakable diamond hoe:11 with flag hide unbreakable
I have skript-mirror 0.8.3, spigot 1.12.2, skript bensku dev32c
did you put the expression above your code? Also, do you have async parsing enabled in the Skript config?
 
did you put the expression above your code? Also, do you have async parsing enabled in the Skript config?
yeah I did, I don't seem to have that option in my skript config, maybe I have to generate a new config?
 
yeah I did, I don't seem to have that option in my skript config, maybe I have to generate a new config?
well, its good that it isn't enabled i was just checking. give me a little to test this on my own
[doublepost=1515651747,1515650507][/doublepost]
yeah I did, I don't seem to have that option in my skript config, maybe I have to generate a new config?
so, the issue is custom syntax doesn't work on the newest skript versions, it seems to be a bug. Until that gets fixed, i can write it in function form if you like
[doublepost=1515653437][/doublepost]
yeah I did, I don't seem to have that option in my skript config, maybe I have to generate a new config?
alright nevermind, custom syntax isnt completely broken... put the revised code below into a script in your scripts folder named "!!!!.sk" (the exclamation points make it load before your other scripts)
code_language.skript:
get expression hide (0¦attributes|1¦destroy[s]|2¦enchant[s]|3¦(placed|built|build) [on]|4¦potion effects|5¦unbreakable):
  if parse mark is 0:
    continue returning {ItemFlag}.HIDE_ATTRIBUTES!
  else if parse mark is 1:
    continue returning {ItemFlag}.HIDE_DESTROYS!
  else if parse mark is 2:
    continue returning {ItemFlag}.HIDE_ENCHANTS!
  else if parse mark is 3:
    continue returning {ItemFlag}.HIDE_PLACED_ON!
  else if parse mark is 4:
    continue returning {ItemFlag}.HIDE_POTION_EFFECTS!
  else if parse mark is 5:
    continue returning {ItemFlag}.HIDE_UNBREAKABLE!
    
get expression %itemstack% with [item] flag[s] %objects%:
  set {_item} to first element out of (try ((expression 1).getRandom()) and expression 1)
  set {_stack} to {_item}.clone()
  set {_meta} to {_stack}.getItemMeta()
  {_meta}.addItemFlags(expressions 2);
  {_stack}.setItemMeta({_meta});
  continue returning {_stack}

then things like this are possible

code_language.skript:
give diamond sword of sharpness 1 with flag hide enchants to all players
 
well, its good that it isn't enabled i was just checking. give me a little to test this on my own
[doublepost=1515651747,1515650507][/doublepost]
so, the issue is custom syntax doesn't work on the newest skript versions, it seems to be a bug. Until that gets fixed, i can write it in function form if you like
[doublepost=1515653437][/doublepost]
alright nevermind, custom syntax isnt completely broken... put the revised code below into a script in your scripts folder named "!!!!.sk" (the exclamation points make it load before your other scripts)
code_language.skript:
get expression hide (0¦attributes|1¦destroy[s]|2¦enchant[s]|3¦(placed|built|build) [on]|4¦potion effects|5¦unbreakable):
  if parse mark is 0:
    continue returning {ItemFlag}.HIDE_ATTRIBUTES!
  else if parse mark is 1:
    continue returning {ItemFlag}.HIDE_DESTROYS!
  else if parse mark is 2:
    continue returning {ItemFlag}.HIDE_ENCHANTS!
  else if parse mark is 3:
    continue returning {ItemFlag}.HIDE_PLACED_ON!
  else if parse mark is 4:
    continue returning {ItemFlag}.HIDE_POTION_EFFECTS!
  else if parse mark is 5:
    continue returning {ItemFlag}.HIDE_UNBREAKABLE!
   
get expression %itemstack% with [item] flag[s] %objects%:
  set {_item} to first element out of (try ((expression 1).getRandom()) and expression 1)
  set {_stack} to {_item}.clone()
  set {_meta} to {_stack}.getItemMeta()
  {_meta}.addItemFlags(expressions 2);
  {_stack}.setItemMeta({_meta});
  continue returning {_stack}

then things like this are possible

code_language.skript:
give diamond sword of sharpness 1 with flag hide enchants to all players
awesome! Thanks for this, I'll give it a shot as soon as I can
[doublepost=1515738118][/doublepost]
well, its good that it isn't enabled i was just checking. give me a little to test this on my own
[doublepost=1515651747,1515650507][/doublepost]
so, the issue is custom syntax doesn't work on the newest skript versions, it seems to be a bug. Until that gets fixed, i can write it in function form if you like
[doublepost=1515653437][/doublepost]
alright nevermind, custom syntax isnt completely broken... put the revised code below into a script in your scripts folder named "!!!!.sk" (the exclamation points make it load before your other scripts)
code_language.skript:
get expression hide (0¦attributes|1¦destroy[s]|2¦enchant[s]|3¦(placed|built|build) [on]|4¦potion effects|5¦unbreakable):
  if parse mark is 0:
    continue returning {ItemFlag}.HIDE_ATTRIBUTES!
  else if parse mark is 1:
    continue returning {ItemFlag}.HIDE_DESTROYS!
  else if parse mark is 2:
    continue returning {ItemFlag}.HIDE_ENCHANTS!
  else if parse mark is 3:
    continue returning {ItemFlag}.HIDE_PLACED_ON!
  else if parse mark is 4:
    continue returning {ItemFlag}.HIDE_POTION_EFFECTS!
  else if parse mark is 5:
    continue returning {ItemFlag}.HIDE_UNBREAKABLE!
   
get expression %itemstack% with [item] flag[s] %objects%:
  set {_item} to first element out of (try ((expression 1).getRandom()) and expression 1)
  set {_stack} to {_item}.clone()
  set {_meta} to {_stack}.getItemMeta()
  {_meta}.addItemFlags(expressions 2);
  {_stack}.setItemMeta({_meta});
  continue returning {_stack}

then things like this are possible

code_language.skript:
give diamond sword of sharpness 1 with flag hide enchants to all players
@Pikachu Finally got a chance to try the updated code, the example you provided seems to work fine and I also no longer get reload errors with the updated code, however it doesn't seem to work with the hide unbreakable flag and I get this error in the console:

code_language.skript:
ERROR [Skript] The arguments passed to (unspecified)#addItemFlags could not be parsed. Try setting a list variable to the arguments and pass that variable to the reflection call instead!

this is the test line:
code_language.skript:
give unbreakable dirt with flag hide unbreakable to player
 
awesome! Thanks for this, I'll give it a shot as soon as I can
[doublepost=1515738118][/doublepost]
@Pikachu Finally got a chance to try the updated code, the example you provided seems to work fine and I also no longer get reload errors with the updated code, however it doesn't seem to work with the hide unbreakable flag and I get this error in the console:

code_language.skript:
ERROR [Skript] The arguments passed to (unspecified)#addItemFlags could not be parsed. Try setting a list variable to the arguments and pass that variable to the reflection call instead!

this is the test line:
code_language.skript:
give unbreakable dirt with flag hide unbreakable to player
try this:
code_language.skript:
get expression hide (0¦attributes|1¦destroy[s]|2¦enchant[s]|3¦(placed|built|build) [on]|4¦potion effects|5¦unbreakable):
  if parse mark is 0:
    continue returning {ItemFlag}.HIDE_ATTRIBUTES!
  else if parse mark is 1:
    continue returning {ItemFlag}.HIDE_DESTROYS!
  else if parse mark is 2:
    continue returning {ItemFlag}.HIDE_ENCHANTS!
  else if parse mark is 3:
    continue returning {ItemFlag}.HIDE_PLACED_ON!
  else if parse mark is 4:
    continue returning {ItemFlag}.HIDE_POTION_EFFECTS!
  else if parse mark is 5:
    continue returning {ItemFlag}.HIDE_UNBREAKABLE!
  
get expression %itemstack% with [item] flag[s] %objects%:
  set {_item} to first element out of (try ((expression 1).getRandom()) and expression 1)
  set {_stack} to {_item}.clone()
  set {_meta} to {_stack}.getItemMeta()
  set {_args::*} to expressions 2
  {_meta}.addItemFlags({_args::*});
  {_stack}.setItemMeta({_meta});
  continue returning {_stack}
it is working here.
 
try this:
code_language.skript:
get expression hide (0¦attributes|1¦destroy[s]|2¦enchant[s]|3¦(placed|built|build) [on]|4¦potion effects|5¦unbreakable):
  if parse mark is 0:
    continue returning {ItemFlag}.HIDE_ATTRIBUTES!
  else if parse mark is 1:
    continue returning {ItemFlag}.HIDE_DESTROYS!
  else if parse mark is 2:
    continue returning {ItemFlag}.HIDE_ENCHANTS!
  else if parse mark is 3:
    continue returning {ItemFlag}.HIDE_PLACED_ON!
  else if parse mark is 4:
    continue returning {ItemFlag}.HIDE_POTION_EFFECTS!
  else if parse mark is 5:
    continue returning {ItemFlag}.HIDE_UNBREAKABLE!
 
get expression %itemstack% with [item] flag[s] %objects%:
  set {_item} to first element out of (try ((expression 1).getRandom()) and expression 1)
  set {_stack} to {_item}.clone()
  set {_meta} to {_stack}.getItemMeta()
  set {_args::*} to expressions 2
  {_meta}.addItemFlags({_args::*});
  {_stack}.setItemMeta({_meta});
  continue returning {_stack}
it is working here.
The example you provided seems to work fine but for some reason the hide unbreakable flag is not working and throwing a huge error in the console:
code_language.skript:
13.01 00:01:09 [Server] ERROR #!#!
13.01 00:01:09 [Server] ERROR #!#! [Skript] Severe Error:
13.01 00:01:09 [Server] ERROR #!#!
13.01 00:01:09 [Server] ERROR #!#! Something went horribly wrong with Skript.
13.01 00:01:09 [Server] ERROR #!#! This issue is NOT your fault! You probably can't fix it yourself, either.
13.01 00:01:09 [Server] ERROR #!#! You're running outdated version of Skript! Please try updating it NOW; it might fix this.
13.01 00:01:09 [Server] ERROR #!#! You may download new version of Skript at https://github.com/bensku/Skript/releases
13.01 00:01:09 [Server] ERROR #!#! You will be given instructions how to report this error if it persists with latest Skript.
13.01 00:01:09 [Server] ERROR #!#! Issue tracker: https://github.com/bensku/Skript/issues (only if you know what you're doing!)
13.01 00:01:09 [Server] ERROR #!#!
13.01 00:01:09 [Server] ERROR #!#! Stack trace:
13.01 00:01:09 [Server] ERROR #!#! ch.njol.skript.SkriptAPIException: UnparsedLiterals must be converted before use
13.01 00:01:09 [Server] ERROR #!#! at ch.njol.skript.lang.UnparsedLiteral.invalidAccessException(UnparsedLiteral.java:273)
13.01 00:01:09 [Server] ERROR #!#! at ch.njol.skript.lang.UnparsedLiteral.getAll(UnparsedLiteral.java:283)
13.01 00:01:09 [Server] ERROR #!#! at com.btk5h.skriptmirror.skript.custom.CustomSyntaxExpression.get(CustomSyntaxExpression.java:28)
13.01 00:01:09 [Server] ERROR #!#! at ch.njol.skript.lang.util.SimpleExpression.getAll(SimpleExpression.java:78)
13.01 00:01:09 [Server] ERROR #!#! at com.btk5h.skriptmirror.skript.custom.ExprExpression.getAll(ExprExpression.java:77)
13.01 00:01:09 [Server] ERROR #!#! at com.btk5h.skriptmirror.skript.custom.ExprExpression.getArray(ExprExpression.java:66)
13.01 00:01:09 [Server] ERROR #!#! at ch.njol.skript.effects.EffChange.execute(EffChange.java:268)
13.01 00:01:09 [Server] ERROR #!#! at ch.njol.skript.lang.Effect.run(Effect.java:52)
13.01 00:01:09 [Server] ERROR #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:61)
13.01 00:01:09 [Server] ERROR #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:89)
13.01 00:01:09 [Server] ERROR #!#! at ch.njol.skript.lang.Trigger.execute(Trigger.java:55)
13.01 00:01:09 [Server] ERROR #!#! at com.btk5h.skriptmirror.skript.custom.CustomExpression$ExpressionHandler.getAll(CustomExpression.java:311)
13.01 00:01:09 [Server] ERROR #!#! at com.btk5h.skriptmirror.skript.custom.CustomExpression$ExpressionHandler.getArray(CustomExpression.java:296)
13.01 00:01:09 [Server] ERROR #!#! at ch.njol.skript.expressions.base.PropertyExpression.get(PropertyExpression.java:74)
13.01 00:01:09 [Server] ERROR #!#! at ch.njol.skript.lang.util.SimpleExpression.getArray(SimpleExpression.java:104)
13.01 00:01:09 [Server] ERROR #!#! at ch.njol.skript.expressions.base.PropertyExpression.get(PropertyExpression.java:74)
13.01 00:01:09 [Server] ERROR #!#! at ch.njol.skript.lang.util.SimpleExpression.getArray(SimpleExpression.java:104)
13.01 00:01:09 [Server] ERROR #!#! at ch.njol.skript.lang.util.ConvertedExpression.getArray(ConvertedExpression.java:158)
13.01 00:01:09 [Server] ERROR #!#! at ch.njol.skript.expressions.base.PropertyExpression.get(PropertyExpression.java:74)
13.01 00:01:09 [Server] ERROR #!#! at ch.njol.skript.lang.util.SimpleExpression.getArray(SimpleExpression.java:104)
13.01 00:01:09 [Server] ERROR #!#! at ch.njol.skript.effects.EffChange.execute(EffChange.java:268)
13.01 00:01:09 [Server] ERROR #!#! at ch.njol.skript.lang.Effect.run(Effect.java:52)
13.01 00:01:09 [Server] ERROR #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:61)
13.01 00:01:09 [Server] ERROR #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:89)
13.01 00:01:09 [Server] ERROR #!#! at ch.njol.skript.effects.Delay$1.run(Delay.java:101)
13.01 00:01:09 [Server] ERROR #!#! at org.bukkit.craftbukkit.v1_12_R1.scheduler.CraftTask.run(CraftTask.java:71)
13.01 00:01:09 [Server] ERROR #!#! at org.bukkit.craftbukkit.v1_12_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:353)
13.01 00:01:09 [Server] ERROR #!#! at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:739)
13.01 00:01:09 [Server] ERROR #!#! at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:406)
13.01 00:01:09 [Server] ERROR #!#! at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:679)
13.01 00:01:09 [Server] ERROR #!#! at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:577)
13.01 00:01:09 [Server] ERROR #!#! at java.lang.Thread.run(Thread.java:748)
13.01 00:01:09 [Server] ERROR #!#!
13.01 00:01:09 [Server] ERROR #!#! Version Information:
13.01 00:01:09 [Server] ERROR #!#! Skript: 2.2-dev32c (OUTDATED)
13.01 00:01:09 [Server] ERROR #!#! Bukkit: 1.12.2-R0.1-SNAPSHOT
13.01 00:01:09 [Server] ERROR #!#! Minecraft: 1.12.2
13.01 00:01:09 [Server] ERROR #!#! Java: 1.8.0_152 (Java HotSpot(TM) 64-Bit Server VM 25.152-b16)
13.01 00:01:09 [Server] ERROR #!#! OS: Linux amd64 4.4.0-96-generic
13.01 00:01:09 [Server] ERROR #!#!
13.01 00:01:09 [Server] ERROR #!#! Running CraftBukkit: false
13.01 00:01:09 [Server] ERROR #!#! Running Spigot (or compatible): true
13.01 00:01:09 [Server] ERROR #!#! Running Paper (or compatible): false
13.01 00:01:09 [Server] ERROR #!#!
13.01 00:01:09 [Server] ERROR #!#! Current node: null
13.01 00:01:09 [Server] ERROR #!#! Current item: set {_args::*}(as java.lang.Object) to expression 2
13.01 00:01:09 [Server] ERROR #!#! Thread: Server thread
13.01 00:01:09 [Server] ERROR #!#!
13.01 00:01:09 [Server] ERROR #!#! Language: english
13.01 00:01:09 [Server] ERROR #!#! Link parse mode: DISABLED
13.01 00:01:09 [Server] ERROR #!#!
13.01 00:01:09 [Server] ERROR #!#! End of Error.
13.01 00:01:09 [Server] ERROR #!#!
13.01 00:01:09 [Server] ERROR [Skript] The get handler for '%itemstack% with [item] flag[s] %objects%' did not continue.
 
Last edited:
The example you provided seems to work fine but for some reason the hide unbreakable flag is not working and throwing a huge error in the console:
code_language.skript:
13.01 00:01:09 [Server] ERROR #!#!
13.01 00:01:09 [Server] ERROR #!#! [Skript] Severe Error:
13.01 00:01:09 [Server] ERROR #!#!
13.01 00:01:09 [Server] ERROR #!#! Something went horribly wrong with Skript.
13.01 00:01:09 [Server] ERROR #!#! This issue is NOT your fault! You probably can't fix it yourself, either.
13.01 00:01:09 [Server] ERROR #!#! You're running outdated version of Skript! Please try updating it NOW; it might fix this.
13.01 00:01:09 [Server] ERROR #!#! You may download new version of Skript at https://github.com/bensku/Skript/releases
13.01 00:01:09 [Server] ERROR #!#! You will be given instructions how to report this error if it persists with latest Skript.
13.01 00:01:09 [Server] ERROR #!#! Issue tracker: https://github.com/bensku/Skript/issues (only if you know what you're doing!)
13.01 00:01:09 [Server] ERROR #!#!
13.01 00:01:09 [Server] ERROR #!#! Stack trace:
13.01 00:01:09 [Server] ERROR #!#! ch.njol.skript.SkriptAPIException: UnparsedLiterals must be converted before use
13.01 00:01:09 [Server] ERROR #!#! at ch.njol.skript.lang.UnparsedLiteral.invalidAccessException(UnparsedLiteral.java:273)
13.01 00:01:09 [Server] ERROR #!#! at ch.njol.skript.lang.UnparsedLiteral.getAll(UnparsedLiteral.java:283)
13.01 00:01:09 [Server] ERROR #!#! at com.btk5h.skriptmirror.skript.custom.CustomSyntaxExpression.get(CustomSyntaxExpression.java:28)
13.01 00:01:09 [Server] ERROR #!#! at ch.njol.skript.lang.util.SimpleExpression.getAll(SimpleExpression.java:78)
13.01 00:01:09 [Server] ERROR #!#! at com.btk5h.skriptmirror.skript.custom.ExprExpression.getAll(ExprExpression.java:77)
13.01 00:01:09 [Server] ERROR #!#! at com.btk5h.skriptmirror.skript.custom.ExprExpression.getArray(ExprExpression.java:66)
13.01 00:01:09 [Server] ERROR #!#! at ch.njol.skript.effects.EffChange.execute(EffChange.java:268)
13.01 00:01:09 [Server] ERROR #!#! at ch.njol.skript.lang.Effect.run(Effect.java:52)
13.01 00:01:09 [Server] ERROR #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:61)
13.01 00:01:09 [Server] ERROR #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:89)
13.01 00:01:09 [Server] ERROR #!#! at ch.njol.skript.lang.Trigger.execute(Trigger.java:55)
13.01 00:01:09 [Server] ERROR #!#! at com.btk5h.skriptmirror.skript.custom.CustomExpression$ExpressionHandler.getAll(CustomExpression.java:311)
13.01 00:01:09 [Server] ERROR #!#! at com.btk5h.skriptmirror.skript.custom.CustomExpression$ExpressionHandler.getArray(CustomExpression.java:296)
13.01 00:01:09 [Server] ERROR #!#! at ch.njol.skript.expressions.base.PropertyExpression.get(PropertyExpression.java:74)
13.01 00:01:09 [Server] ERROR #!#! at ch.njol.skript.lang.util.SimpleExpression.getArray(SimpleExpression.java:104)
13.01 00:01:09 [Server] ERROR #!#! at ch.njol.skript.expressions.base.PropertyExpression.get(PropertyExpression.java:74)
13.01 00:01:09 [Server] ERROR #!#! at ch.njol.skript.lang.util.SimpleExpression.getArray(SimpleExpression.java:104)
13.01 00:01:09 [Server] ERROR #!#! at ch.njol.skript.lang.util.ConvertedExpression.getArray(ConvertedExpression.java:158)
13.01 00:01:09 [Server] ERROR #!#! at ch.njol.skript.expressions.base.PropertyExpression.get(PropertyExpression.java:74)
13.01 00:01:09 [Server] ERROR #!#! at ch.njol.skript.lang.util.SimpleExpression.getArray(SimpleExpression.java:104)
13.01 00:01:09 [Server] ERROR #!#! at ch.njol.skript.effects.EffChange.execute(EffChange.java:268)
13.01 00:01:09 [Server] ERROR #!#! at ch.njol.skript.lang.Effect.run(Effect.java:52)
13.01 00:01:09 [Server] ERROR #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:61)
13.01 00:01:09 [Server] ERROR #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:89)
13.01 00:01:09 [Server] ERROR #!#! at ch.njol.skript.effects.Delay$1.run(Delay.java:101)
13.01 00:01:09 [Server] ERROR #!#! at org.bukkit.craftbukkit.v1_12_R1.scheduler.CraftTask.run(CraftTask.java:71)
13.01 00:01:09 [Server] ERROR #!#! at org.bukkit.craftbukkit.v1_12_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:353)
13.01 00:01:09 [Server] ERROR #!#! at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:739)
13.01 00:01:09 [Server] ERROR #!#! at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:406)
13.01 00:01:09 [Server] ERROR #!#! at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:679)
13.01 00:01:09 [Server] ERROR #!#! at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:577)
13.01 00:01:09 [Server] ERROR #!#! at java.lang.Thread.run(Thread.java:748)
13.01 00:01:09 [Server] ERROR #!#!
13.01 00:01:09 [Server] ERROR #!#! Version Information:
13.01 00:01:09 [Server] ERROR #!#! Skript: 2.2-dev32c (OUTDATED)
13.01 00:01:09 [Server] ERROR #!#! Bukkit: 1.12.2-R0.1-SNAPSHOT
13.01 00:01:09 [Server] ERROR #!#! Minecraft: 1.12.2
13.01 00:01:09 [Server] ERROR #!#! Java: 1.8.0_152 (Java HotSpot(TM) 64-Bit Server VM 25.152-b16)
13.01 00:01:09 [Server] ERROR #!#! OS: Linux amd64 4.4.0-96-generic
13.01 00:01:09 [Server] ERROR #!#!
13.01 00:01:09 [Server] ERROR #!#! Running CraftBukkit: false
13.01 00:01:09 [Server] ERROR #!#! Running Spigot (or compatible): true
13.01 00:01:09 [Server] ERROR #!#! Running Paper (or compatible): false
13.01 00:01:09 [Server] ERROR #!#!
13.01 00:01:09 [Server] ERROR #!#! Current node: null
13.01 00:01:09 [Server] ERROR #!#! Current item: set {_args::*}(as java.lang.Object) to expression 2
13.01 00:01:09 [Server] ERROR #!#! Thread: Server thread
13.01 00:01:09 [Server] ERROR #!#!
13.01 00:01:09 [Server] ERROR #!#! Language: english
13.01 00:01:09 [Server] ERROR #!#! Link parse mode: DISABLED
13.01 00:01:09 [Server] ERROR #!#!
13.01 00:01:09 [Server] ERROR #!#! End of Error.
13.01 00:01:09 [Server] ERROR #!#!
13.01 00:01:09 [Server] ERROR [Skript] The get handler for '%itemstack% with [item] flag[s] %objects%' did not continue.
can you provide your code to reproduce this? i'd like to make a issue report for it. try setting a variable like this:
code_language.skript:
set {_hide} to hide unbreakable
then use that
 
can you provide your code to reproduce this? i'd like to make a issue report for it. try setting a variable like this:
code_language.skript:
set {_hide} to hide unbreakable
then use that
just did some quick testing and this works fine with no errors:
code_language.skript:
set {_hide} to hide unbreakable
        give unbreakable diamond hoe:8 with flag {_hide} to player

but the console error happens when I try to hide the unbreakable flag directly:
code_language.skript:
give unbreakable diamond hoe:8 with flag hide unbreakable
 
Status
Not open for further replies.