1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT??:

    You can always check our our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Exception when dropping an item

Discussion in 'Skript' started by pepper82, Jul 18, 2019.

Thread Status:
Not open for further replies.
  1. pepper82

    pepper82 Member

    Joined:
    Jan 26, 2017
    Messages:
    239
    Likes Received:
    1
    Hi all,
    I get an exception when dropping an item at victim's location ... makes no sense:


    Code (Text):
    1. on death:
    2.     if victim is a polar bear:
    3.         set {_drop} to apple named "test"
    4.         drop 1 of {_drop} at victim's location
    Code (Text):
    1. [10:51:14] [Server thread/ERROR]: #!#!
    2. [10:51:14] [Server thread/ERROR]: #!#! [Skript] Severe Error:
    3. [10:51:14] [Server thread/ERROR]: #!#!
    4. [10:51:14] [Server thread/ERROR]: #!#! Something went horribly wrong with Skript.
    5. [10:51:14] [Server thread/ERROR]: #!#! This issue is NOT your fault! You probably can't fix it yourself, either.
    6. [10:51:14] [Server thread/ERROR]: #!#! You're running outdated version of Skript! Please try updating it NOW; it might fix this.
    7. [10:51:14] [Server thread/ERROR]: #!#! Run /sk update check to get a download link to latest Skript!
    8. [10:51:14] [Server thread/ERROR]: #!#! You will be given instructions how to report this error if it persists after update.
    9. [10:51:14] [Server thread/ERROR]: #!#!
    10. [10:51:14] [Server thread/ERROR]: #!#! Stack trace:
    11. [10:51:14] [Server thread/ERROR]: #!#! java.lang.ClassCastException: org.bukkit.inventory.ItemStack cannot be cast to ch.njol.skript.aliases.ItemType
    12. [10:51:14] [Server thread/ERROR]: #!#!     at ch.njol.skript.effects.EffDrop.execute(EffDrop.java:89)
    13. [10:51:14] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.Effect.run(Effect.java:52)
    14. [10:51:14] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:61)
    15. [10:51:14] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:89)
    16. [10:51:14] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.Trigger.execute(Trigger.java:57)
    17. [10:51:14] [Server thread/ERROR]: #!#!     at ch.njol.skript.SkriptEventHandler.check(SkriptEventHandler.java:152)
    18. [10:51:14] [Server thread/ERROR]: #!#!     at ch.njol.skript.SkriptEventHandler$1.execute(SkriptEventHandler.java:110)
    19. [10:51:14] [Server thread/ERROR]: #!#!     at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80)
    20. [10:51:14] [Server thread/ERROR]: #!#!     at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:66)
    21. [10:51:14] [Server thread/ERROR]: #!#!     at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:520)
    22. [10:51:14] [Server thread/ERROR]: #!#!     at org.bukkit.craftbukkit.v1_13_R2.event.CraftEventFactory.callEntityDeathEvent(CraftEventFactory.java:607)
    23. [10:51:14] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_13_R2.EntityLiving.die(EntityLiving.java:1243)
    24. [10:51:14] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_13_R2.EntityLiving.damageEntity(EntityLiving.java:1088)
    25. [10:51:14] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_13_R2.EntityHuman.attack(EntityHuman.java:1082)
    26. [10:51:14] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_13_R2.EntityPlayer.attack(EntityPlayer.java:1492)
    27. [10:51:14] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_13_R2.PlayerConnection.a(PlayerConnection.java:2010)
    28. [10:51:14] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_13_R2.PacketPlayInUseEntity.a(PacketPlayInUseEntity.java:49)
    29. [10:51:14] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_13_R2.PacketPlayInUseEntity.a(PacketPlayInUseEntity.java:6)
    30. [10:51:14] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_13_R2.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:15)
    31. [10:51:14] [Server thread/ERROR]: #!#!     at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    32. [10:51:14] [Server thread/ERROR]: #!#!     at java.util.concurrent.FutureTask.run(Unknown Source)
    33. [10:51:14] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_13_R2.SystemUtils.a(SystemUtils.java:108)
    34. [10:51:14] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_13_R2.MinecraftServer.b(MinecraftServer.java:1018)
    35. [10:51:14] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_13_R2.DedicatedServer.b(DedicatedServer.java:439)
    36. [10:51:14] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:940)
    37. [10:51:14] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_13_R2.MinecraftServer.run(MinecraftServer.java:837)
    38. [10:51:14] [Server thread/ERROR]: #!#!     at java.lang.Thread.run(Unknown Source)
    39. [10:51:14] [Server thread/ERROR]: #!#!
    40. [10:51:14] [Server thread/ERROR]: #!#! Current node: null
    41. [10:51:14] [Server thread/ERROR]: #!#! Current item: drop [[long:1]] of {_drop}(as java.lang.Object) at the location of (the attacked entity >> [email protected]: org.bukkit.entity.Entity->org.bukkit.Location)
    42. [10:51:14] [Server thread/ERROR]: #!#! Current trigger: death (death/spawn) (test.sk, line 9)
    43. [10:51:14] [Server thread/ERROR]: #!#!
    44. [10:51:14] [Server thread/ERROR]: #!#! Thread: Server thread
    45. [10:51:14] [Server thread/ERROR]: #!#!
    46. [10:51:14] [Server thread/ERROR]: #!#! Language: english
    47. [10:51:14] [Server thread/ERROR]: #!#! Link parse mode: STRICT
    48. [10:51:14] [Server thread/ERROR]: #!#!
    49. [10:51:14] [Server thread/ERROR]: #!#! End of Error.
    50. [10:51:14] [Server thread/ERROR]: #!#!
    51.  
     
  2. LukynkaCZE

    LukynkaCZE Member

    Joined:
    May 12, 2019
    Messages:
    24
    Likes Received:
    0
    Hi, You're running outdated version of Skript. Try update plugin.
    https://github.com/SkriptLang/Skript/releases

    You can also simplify your entire code to this:
    Code (Text):
    1. on death:
    2.     victim is a creeper
    3.     drop 1 apple named "test" at victim's location
     
Thread Status:
Not open for further replies.
Loading...