Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trigger can be null in EvtScript #5722

Open
TheLimeGlass opened this issue May 30, 2023 · 0 comments
Open

Trigger can be null in EvtScript #5722

TheLimeGlass opened this issue May 30, 2023 · 0 comments
Assignees
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. priority: lowest "Nice to have" updates that are not required (tiny low impact bug fixes or QoL enhancements).

Comments

@TheLimeGlass
Copy link
Collaborator

TheLimeGlass commented May 30, 2023

Skript/Server Version

v2.7.0-beta2-nightly-ea6ce6cdd
Paper 1.19.4 #540

Bug Description

So playing with alternatives to #5503 I added a getConvertedExpression(Object.class) to the second compared item and Skript literally broke because I did not surround it in a RetainingLogHandler. Trigger can be null when it should not, somewhere is not accounted for possible throws.

[WARN]: Retaining log wasn't instructed to print anything at Skript.jar//ch.njol.skript.conditions.CondCompare.init(CondCompare.java:206)
java.lang.NullPointerException: Cannot invoke "ch.njol.skript.lang.Trigger.execute(org.bukkit.event.Event)" because "trigger" is null
        at ch.njol.skript.events.EvtScript.runTrigger(EvtScript.java:88) ~[Skript.jar:?]
        at ch.njol.skript.events.EvtScript.unload(EvtScript.java:68) ~[Skript.jar:?]
        at ch.njol.skript.ScriptLoader.unloadScripts(ScriptLoader.java:808) ~[Skript.jar:?]
        at ch.njol.skript.Skript.beforeDisable(Skript.java:1163) ~[Skript.jar:?]
        at ch.njol.skript.Skript.onDisable(Skript.java:1173) ~[Skript.jar:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:283) ~[paper-api-1.19.4-R0.1-SNAPSHOT.jar:?]
        at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.disablePlugin(PaperPluginInstanceManager.java:224) ~[paper-1.19.4.jar:git-Paper-540]
        at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.disablePlugins(PaperPluginInstanceManager.java:148) ~[paper-1.19.4.jar:git-Paper-540]
        at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.disablePlugins(PaperPluginManagerImpl.java:92) ~[paper-1.19.4.jar:git-Paper-540]
        at org.bukkit.plugin.SimplePluginManager.disablePlugins(SimplePluginManager.java:528) ~[paper-api-1.19.4-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_19_R3.CraftServer.disablePlugins(CraftServer.java:487) ~[paper-1.19.4.jar:git-Paper-540]
        at net.minecraft.server.MinecraftServer.stopServer(MinecraftServer.java:947) ~[paper-1.19.4.jar:git-Paper-540]
        at net.minecraft.server.dedicated.DedicatedServer.stopServer(DedicatedServer.java:804) ~[paper-1.19.4.jar:git-Paper-540]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1213) ~[paper-1.19.4.jar:git-Paper-540]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:320) ~[paper-1.19.4.jar:git-Paper-540]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'speed potion' to potions of speedof extended strength
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'water bottle' to bottles of water
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'water bottle' to bottles of water
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'strength potion' to potions of strength
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'strength potion' to potions of strength
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'water bottle' to bottles of waterrown splash potions of leaping
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'water bottle' to bottles of waterrown splash potions of leaping
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'long strength potion' to potions of extended strengthf poisoning
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'long strength potion' to potions of extended strengthf poisoning
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'water bottle' to bottles of watering' to thrown lingering potions of health
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'water bottle' to bottles of watering' to thrown lingering potions of health
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'a cleric' to clericaby zombie
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'a cleric' to clericaby zombie
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'a thrown potion of leaping' to thrown splash potions of leaping
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'a thrown potion of leaping' to thrown splash potions of leaping
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'a thrown potion of poison' to thrown splash potions of poisoning
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'a thrown potion of poison' to thrown splash potions of poisoning
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'a thrown lingering potion of healing' to thrown lingering potions of health
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'a thrown lingering potion of healing' to thrown lingering potions of health
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'a baby zombie' to baby zombie
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'a baby zombie' to baby zombie
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'a baby entity' to baby entity
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'a baby entity' to baby entity
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'an adult zombie' to adult zombie
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'an adult zombie' to adult zombie
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'an adult entity' to adult entity
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'an adult entity' to adult entity
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'a baby cow' to baby cowheep
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'a baby cow' to baby cowheep
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'a baby entity' to baby entity
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'a baby entity' to baby entity
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'an adult cow' to adult cowheep
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'an adult cow' to adult cowheep
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'an adult entity' to adult entity
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'an adult entity' to adult entity
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'a baby sheep' to baby sheepin
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'a baby sheep' to baby sheepin
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'a baby entity' to baby entity
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'a baby entity' to baby entity
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'an adult sheep' to adult sheepin
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'an adult sheep' to adult sheepin
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'an adult entity' to adult entity
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'an adult entity' to adult entity
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'a baby piglin' to baby piglin
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'a baby piglin' to baby piglin
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'a baby entity' to baby entity
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'a baby entity' to baby entity
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'an adult piglin' to adult piglin
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'an adult piglin' to adult piglin
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'an adult entity' to adult entity
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'an adult entity' to adult entity
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'a baby zoglin' to baby zoglin
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'a baby zoglin' to baby zoglin
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'a baby entity' to baby entity
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'a baby entity' to baby entity
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'an adult zoglin' to adult zoglin
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'an adult zoglin' to adult zoglin
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'an adult entity' to adult entitymet
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'an adult entity' to adult entitymet
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'fire' to fire
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'fire' to fire
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'a chicken' to chicken helmet
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'a chicken' to chickenr helmet, iron helmet, gold helmet, diamond helmet, chain helmet, turtle helmet or netherite helmet
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'composter' to compostere helmet
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'composter' to composterhelmet, iron helmet, gold helmet, diamond helmet, chain helmet, turtle helmet or netherite helmet
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'a diamond helmet' to diamond helmet
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'a diamond helmet' to diamond helmet
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'any helmet' to gold helmet
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'any helmet' to leather helmet, iron helmet, gold helmet, diamond helmet, chain helmet, turtle helmet or netherite helmet
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'any helmet' to turtle helmett
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'any helmet' to leather helmet, iron helmet, gold helmet, diamond helmet, chain helmet, turtle helmet or netherite helmet
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'any helmet' to gold helmet
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'any helmet' to leather helmet, iron helmet, gold helmet, diamond helmet, chain helmet, turtle helmet or netherite helmet
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'any helmet' to turtle helmetmet
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'any helmet' to leather helmet, iron helmet, gold helmet, diamond helmet, chain helmet, turtle helmet or netherite helmet
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'any helmet' to gold helmet
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'any helmet' to leather helmet, iron helmet, gold helmet, diamond helmet, chain helmet, turtle helmet or netherite helmet
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'any helmet' to leather helmet
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'any helmet' to leather helmet, iron helmet, gold helmet, diamond helmet, chain helmet, turtle helmet or netherite helmet
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'any helmet' to diamond helmet
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'any helmet' to leather helmet, iron helmet, gold helmet, diamond helmet, chain helmet, turtle helmet or netherite helmet
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'any helmet' to gold helmett campfire
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'any helmet' to leather helmet, iron helmet, gold helmet, diamond helmet, chain helmet, turtle helmet or netherite helmet
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'any boots' to netherite bootsts\syntaxes\expressions\ExprStringCase.sk)
[02:20:35 INFO]: [Skript] [STDOUT] parsed 'any boots' to leather boots, iron boots, gold boots, diamond boots, chain boots or netherite boots
[02:20:36 INFO]: [Skript] [STDOUT] parsed 'dirt' to dirt block
[02:20:36 INFO]: [Skript] [STDOUT] parsed 'dirt' to dirt block
[02:20:36 INFO]: [Skript] [STDOUT] parsed 'bone' to bone
[02:20:36 INFO]: [Skript] [STDOUT] parsed 'bone' to bone
[02:20:36 INFO]: [Skript] [STDOUT] parsed 'an unlit campfire' to unlit campfire
[02:20:36 INFO]: [Skript] [STDOUT] parsed 'an unlit campfire' to campfire
@TheLimeGlass TheLimeGlass added bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. priority: lowest "Nice to have" updates that are not required (tiny low impact bug fixes or QoL enhancements). labels May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. priority: lowest "Nice to have" updates that are not required (tiny low impact bug fixes or QoL enhancements).
Projects
None yet
Development

No branches or pull requests

2 participants