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

Item flag expression with all item flags errors #7326

Open
1 task done
ShaneBeee opened this issue Dec 30, 2024 · 0 comments
Open
1 task done

Item flag expression with all item flags errors #7326

ShaneBeee opened this issue Dec 30, 2024 · 0 comments
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. completed The issue has been fully resolved and the change will be in the next Skript update.

Comments

@ShaneBeee
Copy link
Contributor

Skript/Server Version

> sk info
[18:24:19 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[18:24:19 INFO]: [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[18:24:19 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[18:24:19 INFO]: [Skript] Server Version: 1.21.4-DEV-326104b (MC: 1.21.4)
[18:24:19 INFO]: [Skript] Skript Version: 2.9.5 (selfbuilt-unknown)
[18:24:19 INFO]: [Skript] Installed Skript Addons: None
[18:24:19 INFO]: [Skript] Installed dependencies: None

Bug Description

When using the code diamond sword with item flag all item flags, an error occurs
(this occurs on dev/feature branch builds)

Expected Behavior

No errors please :)

Steps to Reproduce

run a simple script:

on load:
	set {_i} to diamond sword with item flag (all item flags)

Errors or Screenshots

Error from above script:

[18:24:10 ERROR]: #!#! 
[18:24:10 ERROR]: #!#! [Skript] Severe Error:
[18:24:10 ERROR]: #!#! 
[18:24:10 ERROR]: #!#! Something went horribly wrong with Skript.
[18:24:10 ERROR]: #!#! This issue is NOT your fault! You probably can't fix it yourself, either.
[18:24:10 ERROR]: #!#! You should report it at https://github.com/SkriptLang/Skript/issues. Please copy paste this report there (or use paste service).
[18:24:10 ERROR]: #!#! This ensures that your issue is noticed and will be fixed as soon as possible.
[18:24:10 ERROR]: #!#! 
[18:24:10 ERROR]: #!#! Stack trace:
[18:24:10 ERROR]: #!#! java.lang.ClassCastException: class [Ljava.lang.Object; cannot be cast to class [Lorg.bukkit.inventory.ItemFlag; ([Ljava.lang.Object; is in module java.base of loader 'bootstrap'; [Lorg.bukkit.inventory.ItemFlag; is in unnamed module of loader java.net.URLClassLoader @9629756)
[18:24:10 ERROR]: #!#!     at Skript-2.9.5.jar//ch.njol.skript.expressions.ExprWithItemFlags.get(ExprWithItemFlags.java:49)
[18:24:10 ERROR]: #!#!     at Skript-2.9.5.jar//ch.njol.skript.expressions.ExprWithItemFlags.get(ExprWithItemFlags.java:19)
[18:24:10 ERROR]: #!#!     at Skript-2.9.5.jar//ch.njol.skript.lang.util.SimpleExpression.getArray(SimpleExpression.java:80)
[18:24:10 ERROR]: #!#!     at Skript-2.9.5.jar//ch.njol.skript.effects.EffChange.execute(EffChange.java:262)
[18:24:10 ERROR]: #!#!     at Skript-2.9.5.jar//ch.njol.skript.lang.Effect.run(Effect.java:31)
[18:24:10 ERROR]: #!#!     at Skript-2.9.5.jar//ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:40)
[18:24:10 ERROR]: #!#!     at Skript-2.9.5.jar//ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:67)
[18:24:10 ERROR]: #!#!     at Skript-2.9.5.jar//ch.njol.skript.lang.Trigger.execute(Trigger.java:33)
[18:24:10 ERROR]: #!#!     at Skript-2.9.5.jar//ch.njol.skript.events.EvtScript.runTrigger(EvtScript.java:70)
[18:24:10 ERROR]: #!#!     at Skript-2.9.5.jar//ch.njol.skript.events.EvtScript.postLoad(EvtScript.java:43)
[18:24:10 ERROR]: #!#!     at Skript-2.9.5.jar//ch.njol.skript.structures.StructEvent.postLoad(StructEvent.java:73)
[18:24:10 ERROR]: #!#!     at Skript-2.9.5.jar//ch.njol.skript.ScriptLoader.lambda$loadScripts$10(ScriptLoader.java:570)
[18:24:10 ERROR]: #!#!     at java.base/java.util.ArrayList.removeIf(ArrayList.java:1756)
[18:24:10 ERROR]: #!#!     at java.base/java.util.ArrayList.removeIf(ArrayList.java:1744)
[18:24:10 ERROR]: #!#!     at Skript-2.9.5.jar//ch.njol.skript.ScriptLoader.lambda$loadScripts$14(ScriptLoader.java:561)
[18:24:10 ERROR]: #!#!     at java.base/java.util.concurrent.CompletableFuture.uniApplyNow(CompletableFuture.java:684)
[18:24:10 ERROR]: #!#!     at java.base/java.util.concurrent.CompletableFuture.uniApplyStage(CompletableFuture.java:662)
[18:24:10 ERROR]: #!#!     at java.base/java.util.concurrent.CompletableFuture.thenApply(CompletableFuture.java:2200)
[18:24:10 ERROR]: #!#!     at Skript-2.9.5.jar//ch.njol.skript.ScriptLoader.loadScripts(ScriptLoader.java:489)
[18:24:10 ERROR]: #!#!     at Skript-2.9.5.jar//ch.njol.skript.ScriptLoader.loadScripts(ScriptLoader.java:432)
[18:24:10 ERROR]: #!#!     at Skript-2.9.5.jar//ch.njol.skript.Skript$1.run(Skript.java:826)
[18:24:10 ERROR]: #!#!     at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:78)
[18:24:10 ERROR]: #!#!     at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:474)
[18:24:10 ERROR]: #!#!     at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1175)
[18:24:10 ERROR]: #!#!     at net.minecraft.server.MinecraftServer.lambda$spin$2(MinecraftServer.java:310)
[18:24:10 ERROR]: #!#!     at java.base/java.lang.Thread.run(Thread.java:1570)
[18:24:10 ERROR]: #!#! 
[18:24:10 ERROR]: #!#! Version Information:
[18:24:10 ERROR]: #!#!   Skript: 2.9.5 (custom version)
[18:24:10 ERROR]: #!#!     Flavor: selfbuilt-unknown
[18:24:10 ERROR]: #!#!     Date: unknown
[18:24:10 ERROR]: #!#!   Bukkit: 1.21.4-R0.1-SNAPSHOT
[18:24:10 ERROR]: #!#!   Minecraft: 1.21.4
[18:24:10 ERROR]: #!#!   Java: 22.0.2 (OpenJDK 64-Bit Server VM 22.0.2+9)
[18:24:10 ERROR]: #!#!   OS: Mac OS X aarch64 15.2
[18:24:10 ERROR]: #!#! 
[18:24:10 ERROR]: #!#! Server platform: Paper
[18:24:10 ERROR]: #!#! 
[18:24:10 ERROR]: #!#! Current node: on load: (test.sk, line 2)
[18:24:10 ERROR]: #!#! Current item: set {_i} (as java.lang.Object) to [[itemtype:diamond sword]] with item flags all of the item flags
[18:24:10 ERROR]: #!#! Current trigger: load (script load) (test.sk, line 2)
[18:24:10 ERROR]: #!#! 
[18:24:10 ERROR]: #!#! Thread: Server thread
[18:24:10 ERROR]: #!#! 
[18:24:10 ERROR]: #!#! Language: english
[18:24:10 ERROR]: #!#! Link parse mode: DISABLED
[18:24:10 ERROR]: #!#! 
[18:24:10 ERROR]: #!#! End of Error.
[18:24:10 ERROR]: #!#! 

Other

No response

Agreement

  • I have read the guidelines above and affirm I am following them with this report.
@sovdeeth sovdeeth added bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. completed The issue has been fully resolved and the change will be in the next Skript update. labels Dec 31, 2024
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. completed The issue has been fully resolved and the change will be in the next Skript update.
Projects
None yet
Development

No branches or pull requests

2 participants