Severe error with 'instanceof' condition syntax after Skript 2.15
Describe the bug if I use 'instanceof' with 'stop if <+.>' syntax, it send severe error and screwed up.
To reproduce
just use stop if ~ (is/isn't) instance of [any JavaType] on any event
Expected behavior it should works well. and it was worked before Skript 2.15. this bug appeared with updated Skript 2.15 (I used 2.14 before)
Screenshots
Server information
- skript-reflect: 2.6.3
- Skript: 2.15.0
- Bukkit: 1.21.11
- Minecraft: 1.21.11
- Java: 21
- OS: Linux/Windows - tested both
Additional context
[02:01:19 ERROR]: #!#!
[02:01:19 ERROR]: #!#! [Skript] Severe Error:
[02:01:19 ERROR]: #!#!
[02:01:19 ERROR]: #!#! An unexpected error occurred with Skript. This issue is likely not your fault.
[02:01:19 ERROR]: #!#! You are using some plugins that alter how Skript works (addons).
[02:01:19 ERROR]: #!#! Full list of addons:
[02:01:19 ERROR]: #!#! skript-reflect v2.6.3 (https://github.com/SkriptLang/skript-reflect)
[02:01:19 ERROR]: #!#! We could not identify related addons, it might also be a Skript issue.
[02:01:19 ERROR]: #!#! Try temporarily removing the listed plugins one by one to identify the cause.
[02:01:19 ERROR]: #!#! If removing a plugin resolves the issue, please report the problem to the plugin developer.
[02:01:19 ERROR]: #!#!
[02:01:19 ERROR]: #!#! Stack trace:
[02:01:19 ERROR]: #!#! Caused by: ch.njol.skript.SkriptAPIException: UnparsedLiterals must be converted before use
[02:01:19 ERROR]: #!#! at Skript-2.15.0.jar//ch.njol.skript.lang.UnparsedLiteral.invalidAccessException(UnparsedLiteral.java:177)
[02:01:19 ERROR]: #!#! at Skript-2.15.0.jar//ch.njol.skript.lang.UnparsedLiteral.check(UnparsedLiteral.java:227)
[02:01:19 ERROR]: #!#! at skript-reflect-2.6.3.jar//com.btk5h.skriptmirror.skript.CondIsInstanceOf.check(CondIsInstanceOf.java:25)
[02:01:19 ERROR]: #!#! at Skript-2.15.0.jar//ch.njol.skript.lang.Condition.evaluate(Condition.java:92)
[02:01:19 ERROR]: #!#! at Skript-2.15.0.jar//ch.njol.skript.lang.Condition.evaluate(Condition.java:23)
[02:01:19 ERROR]: #!#! at Skript-2.15.0.jar//org.skriptlang.skript.lang.condition.Conditional.evaluate(Conditional.java:45)
[02:01:19 ERROR]: #!#! at Skript-2.15.0.jar//org.skriptlang.skript.lang.condition.Conditional.evaluateAnd(Conditional.java:105)
[02:01:19 ERROR]: #!#! at Skript-2.15.0.jar//org.skriptlang.skript.lang.condition.CompoundConditional.evaluate(CompoundConditional.java:85)
[02:01:19 ERROR]: #!#! at Skript-2.15.0.jar//org.skriptlang.skript.lang.condition.CompoundConditional.evaluate(CompoundConditional.java:68)
[02:01:19 ERROR]: #!#! at Skript-2.15.0.jar//ch.njol.skript.sections.SecConditional.checkConditions(SecConditional.java:414)
[02:01:19 ERROR]: #!#! at Skript-2.15.0.jar//ch.njol.skript.sections.SecConditional.walk(SecConditional.java:302)
[02:01:19 ERROR]: #!#! at Skript-2.15.0.jar//ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:67)
[02:01:19 ERROR]: #!#! at Skript-2.15.0.jar//ch.njol.skript.lang.Trigger.execute(Trigger.java:33)
[02:01:19 ERROR]: #!#! at Skript-2.15.0.jar//ch.njol.skript.SkriptEventHandler.lambda$execute$0(SkriptEventHandler.java:168)
[02:01:19 ERROR]: #!#! at Skript-2.15.0.jar//ch.njol.skript.SkriptEventHandler.lambda$execute$1(SkriptEventHandler.java:179)
[02:01:19 ERROR]: #!#! at Skript-2.15.0.jar//ch.njol.skript.util.Task.callSync(Task.java:212)
[02:01:19 ERROR]: #!#! at Skript-2.15.0.jar//ch.njol.skript.util.Task.callSync(Task.java:196)
[02:01:19 ERROR]: #!#! at Skript-2.15.0.jar//ch.njol.skript.SkriptEventHandler.execute(SkriptEventHandler.java:177)
[02:01:19 ERROR]: #!#! at Skript-2.15.0.jar//ch.njol.skript.SkriptEventHandler.check(SkriptEventHandler.java:110)
[02:01:19 ERROR]: #!#! at Skript-2.15.0.jar//ch.njol.skript.SkriptEventHandler$PriorityListener.lambda$new$0(SkriptEventHandler.java:36)
[02:01:19 ERROR]: #!#! at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80)
[02:01:19 ERROR]: #!#! at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:71)
[02:01:19 ERROR]: #!#! at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54)
[02:01:19 ERROR]: #!#! at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131)
[02:01:19 ERROR]: #!#! at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:628)
[02:01:19 ERROR]: #!#! at org.bukkit.event.Event.callEvent(Event.java:46)
[02:01:19 ERROR]: #!#! at org.bukkit.craftbukkit.event.CraftEventFactory.callEntityDamageEvent(CraftEventFactory.java:1190)
[02:01:19 ERROR]: #!#! at org.bukkit.craftbukkit.event.CraftEventFactory.callEntityDamageEvent(CraftEventFactory.java:1180)
[02:01:19 ERROR]: #!#! at org.bukkit.craftbukkit.event.CraftEventFactory.handleEntityDamageEvent(CraftEventFactory.java:1110)
[02:01:19 ERROR]: #!#! at org.bukkit.craftbukkit.event.CraftEventFactory.handleEntityDamageEvent(CraftEventFactory.java:1071)
[02:01:19 ERROR]: #!#! at org.bukkit.craftbukkit.event.CraftEventFactory.handleLivingEntityDamageEvent(CraftEventFactory.java:1234)
[02:01:19 ERROR]: #!#! at net.minecraft.world.entity.LivingEntity.handleEntityDamage(LivingEntity.java:2441)
[02:01:19 ERROR]: #!#! at net.minecraft.world.entity.LivingEntity.hurtServer(LivingEntity.java:1486)
[02:01:19 ERROR]: #!#! at net.minecraft.world.entity.Entity.hurtOrSimulate(Entity.java:2365)
[02:01:19 ERROR]: #!#! at net.minecraft.world.entity.player.Player.attack(Player.java:1066)
[02:01:19 ERROR]: #!#! at net.minecraft.server.level.ServerPlayer.attack(ServerPlayer.java:2563)
[02:01:19 ERROR]: #!#! at net.minecraft.server.network.ServerGamePacketListenerImpl$1.onAttack(ServerGamePacketListenerImpl.java:2916)
[02:01:19 ERROR]: #!#! at net.minecraft.network.protocol.game.ServerboundInteractPacket$1.dispatch(ServerboundInteractPacket.java:31)
[02:01:19 ERROR]: #!#! at net.minecraft.network.protocol.game.ServerboundInteractPacket.dispatch(ServerboundInteractPacket.java:98)
[02:01:19 ERROR]: #!#! at net.minecraft.server.network.ServerGamePacketListenerImpl.handleInteract(ServerGamePacketListenerImpl.java:2824)
[02:01:19 ERROR]: #!#! at net.minecraft.network.protocol.game.ServerboundInteractPacket.handle(ServerboundInteractPacket.java:80)
[02:01:19 ERROR]: #!#! at net.minecraft.network.protocol.game.ServerboundInteractPacket.handle(ServerboundInteractPacket.java:16)
[02:01:19 ERROR]: #!#! at net.minecraft.network.PacketProcessor$ListenerAndPacket.handle(PacketProcessor.java:99)
[02:01:19 ERROR]: #!#! at net.minecraft.network.PacketProcessor.executeSinglePacket(PacketProcessor.java:33)
[02:01:19 ERROR]: #!#! at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1499)
[02:01:19 ERROR]: #!#! at net.minecraft.server.MinecraftServer.recordTaskExecutionTimeWhileWaiting(MinecraftServer.java:1225)
[02:01:19 ERROR]: #!#! at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1341)
[02:01:19 ERROR]: #!#! at net.minecraft.server.MinecraftServer.lambda$spin$2(MinecraftServer.java:388)
[02:01:19 ERROR]: #!#! at java.base/java.lang.Thread.run(Thread.java:1583)
[02:01:19 ERROR]: #!#!
[02:01:19 ERROR]: #!#! Skript: 2.15.0 (latest)
[02:01:19 ERROR]: #!#! Flavor: skriptlang-github
[02:01:19 ERROR]: #!#! Date: 23:12:00.312072300
[02:01:19 ERROR]: #!#! Bukkit: 1.21.11-R0.1-SNAPSHOT
[02:01:19 ERROR]: #!#! Minecraft: 1.21.11
[02:01:19 ERROR]: #!#! Java: 21.0.8 (OpenJDK 64-Bit Server VM 21.0.8+9-LTS)
[02:01:19 ERROR]: #!#! OS: Windows 11 amd64 10.0
[02:01:19 ERROR]: #!#!
[02:01:19 ERROR]: #!#! Server platform: Paper
[02:01:19 ERROR]: #!#!
[02:01:19 ERROR]: #!#! Current node: null
[02:01:19 ERROR]: #!#! Current item: if 'stop if attacker' instanceof [[javatype:org.bukkit.entity.Player]]
[02:01:19 ERROR]: #!#! Current trigger: damage (damage) (test.sk, line 10)
[02:01:19 ERROR]: #!#! Thread: Server thread
[02:01:19 ERROR]: #!#! Language: english
[02:01:19 ERROR]: #!#! Link parse mode: DISABLED
[02:01:19 ERROR]: #!#! End of Error.
[02:01:19 ERROR]: #!#
@Saros-6585 Here is a jar that appears to be working fine. Now just to make this clear I did use AI for this and do not understand what actually is causing this issue. Therefore I sadly cannot contribute anything useful to this project and as far as I know doing pull requests with AI code would actually make it harder for actual developers.