Asleeepp / skript-itemsadder

GNU General Public License v3.0
6 stars 1 forks source link

[BUG] Giving myself a book with effect commands #16

Open GalaxyGamingFR opened 1 month ago

GalaxyGamingFR commented 1 month ago

Describe the bug When I execute the effect command, "!give me book", it prints out an error

To Reproduce Steps to reproduce the behavior:

  1. Enable effect commands
  2. Type out !give me book and replace ! with your prefix

Expected behavior Supposed to give me a book

Screenshots

Screenshot 2024-07-16 at 12 01 37 PM

Server Version (/version): 1.20.4

Screenshot 2024-07-16 at 12 00 14 PM

Skript and skript-itemadder version:

Logs:

[13:53:59] [Server thread/ERROR]: #!#! [Skript] Severe Error: [13:53:59] [Server thread/ERROR]: #!#! Unexpected error while executing effect command 'give me book' by 'GalaxyGaming__'

[13:53:59] [Server thread/ERROR]: #!#! You're running outdated version of Skript! Please try updating it NOW; it might fix this. [13:53:59] [Server thread/ERROR]: #!#! Run /sk update check to get a download link to latest Skript! [13:53:59] [Server thread/ERROR]: #!#! You will be given instructions how to report this error if it persists after update.

[13:53:59] [Server thread/ERROR]: #!#! Stack trace: [13:53:59] [Server thread/ERROR]: #!#! java.lang.NullPointerException: Cannot invoke "org.bukkit.inventory.ItemStack.clone()" because "" is null [13:53:59] [Server thread/ERROR]: #!#! at ItemsAdder_3.6.3-beta-13.jar//dev.lone.itemsadder.api.CustomStack.(SourceFile:35) [13:53:59] [Server thread/ERROR]: #!#! at ItemsAdder_3.6.3-beta-13.jar//dev.lone.itemsadder.api.CustomStack.(SourceFile:29) [13:53:59] [Server thread/ERROR]: #!#! at ItemsAdder_3.6.3-beta-13.jar//dev.lone.itemsadder.api.CustomBlock.(SourceFile:35) [13:53:59] [Server thread/ERROR]: #!#! at ItemsAdder_3.6.3-beta-13.jar//dev.lone.itemsadder.api.CustomBlock.getOriginal(SourceFile:57) [13:53:59] [Server thread/ERROR]: #!#! at ItemsAdder_3.6.3-beta-13.jar//dev.lone.itemsadder.api.CustomBlock.getInstance(SourceFile:66) [13:53:59] [Server thread/ERROR]: #!#! at skript-itemsadder-1.5.jar//me.asleepp.SkriptItemsAdder.elements.types.Types$1.parse(Types.java:40) [13:53:59] [Server thread/ERROR]: #!#! at skript-itemsadder-1.5.jar//me.asleepp.SkriptItemsAdder.elements.types.Types$1.parse(Types.java:26) [13:53:59] [Server thread/ERROR]: #!#! at Skript-2.8.7.jar//ch.njol.skript.registrations.Classes.parseSimple(Classes.java:481) [13:53:59] [Server thread/ERROR]: #!#! at Skript-2.8.7.jar//ch.njol.skript.lang.SkriptParser.parseSingleExpr(SkriptParser.java:588) [13:53:59] [Server thread/ERROR]: #!#! at Skript-2.8.7.jar//ch.njol.skript.lang.SkriptParser.parseExpression(SkriptParser.java:771) [13:53:59] [Server thread/ERROR]: #!#! at Skript-2.8.7.jar//ch.njol.skript.patterns.TypePatternElement.match(TypePatternElement.java:162) [13:53:59] [Server thread/ERROR]: #!#! at Skript-2.8.7.jar//ch.njol.skript.patterns.PatternElement.matchNext(PatternElement.java:54) [13:53:59] [Server thread/ERROR]: #!#! at Skript-2.8.7.jar//ch.njol.skript.patterns.LiteralPatternElement.match(LiteralPatternElement.java:65) [13:53:59] [Server thread/ERROR]: #!#! at Skript-2.8.7.jar//ch.njol.skript.patterns.PatternElement.matchNext(PatternElement.java:54) [13:53:59] [Server thread/ERROR]: #!#! at Skript-2.8.7.jar//ch.njol.skript.patterns.TypePatternElement.match(TypePatternElement.java:157) [13:53:59] [Server thread/ERROR]: #!#! at Skript-2.8.7.jar//ch.njol.skript.patterns.PatternElement.matchNext(PatternElement.java:54) [13:53:59] [Server thread/ERROR]: #!#! at Skript-2.8.7.jar//ch.njol.skript.patterns.LiteralPatternElement.match(LiteralPatternElement.java:65) [13:53:59] [Server thread/ERROR]: #!#! at Skript-2.8.7.jar//ch.njol.skript.patterns.SkriptPattern.match(SkriptPattern.java:62) [13:53:59] [Server thread/ERROR]: #!#! at Skript-2.8.7.jar//ch.njol.skript.lang.SkriptParser.parse_i(SkriptParser.java:1293) [13:53:59] [Server thread/ERROR]: #!#! at Skript-2.8.7.jar//ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:232) [13:53:59] [Server thread/ERROR]: #!#! at Skript-2.8.7.jar//ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:179) [13:53:59] [Server thread/ERROR]: #!#! at Skript-2.8.7.jar//ch.njol.skript.lang.Effect.parse(Effect.java:75) [13:53:59] [Server thread/ERROR]: #!#! at Skript-2.8.7.jar//ch.njol.skript.command.Commands.handleEffectCommand(Commands.java:190) [13:53:59] [Server thread/ERROR]: #!#! at Skript-2.8.7.jar//ch.njol.skript.command.Commands$2.lambda$onPlayerChat$0(Commands.java:300) [13:53:59] [Server thread/ERROR]: #!#! at org.bukkit.craftbukkit.v1_20_R3.scheduler.CraftFuture.run(CraftFuture.java:88) [13:53:59] [Server thread/ERROR]: #!#! at org.bukkit.craftbukkit.v1_20_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:482) [13:53:59] [Server thread/ERROR]: #!#! at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1653) [13:53:59] [Server thread/ERROR]: #!#! at net.minecraft.server.dedicated.DedicatedServer.b(DedicatedServer.java:450) [13:53:59] [Server thread/ERROR]: #!#! at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1532) [13:53:59] [Server thread/ERROR]: #!#! at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1227) [13:53:59] [Server thread/ERROR]: #!#! at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:320) [13:53:59] [Server thread/ERROR]: #!#! at java.base/java.lang.Thread.run(Thread.java:1583)

[13:53:59] [Server thread/ERROR]: #!#! Version Information: [13:53:59] [Server thread/ERROR]: #!#! Skript: 2.8.7 (OUTDATED) [13:53:59] [Server thread/ERROR]: #!#! Flavor: skriptlang-github [13:53:59] [Server thread/ERROR]: #!#! Date: 14:50:13.592363600 [13:53:59] [Server thread/ERROR]: #!#! Bukkit: 1.20.4-R0.1-SNAPSHOT [13:53:59] [Server thread/ERROR]: #!#! Minecraft: 1.20.4 [13:53:59] [Server thread/ERROR]: #!#! Java: 21.0.3 (OpenJDK 64-Bit Server VM 21.0.3+9-LTS) [13:53:59] [Server thread/ERROR]: #!#! OS: Linux amd64 5.4.0-186-generic

[13:53:59] [Server thread/ERROR]: #!#! Server platform: Paper

[13:53:59] [Server thread/ERROR]: #!#! Current node: null [13:53:59] [Server thread/ERROR]: #!#! Current item: null

[13:53:59] [Server thread/ERROR]: #!#! Thread: Server thread

[13:53:59] [Server thread/ERROR]: #!#! Language: english [13:53:59] [Server thread/ERROR]: #!#! Link parse mode: DISABLED

[13:53:59] [Server thread/ERROR]: #!#! End of Error.

Asleeepp commented 1 month ago

I can't reproduce this issue, I don't really see how this could be an skript-itemsadder issue, The addon doesn't modify any Skript syntax, maybe this is an itemsadder issue?

it could also be a result of Pufferfish, outdated Skript, etc, please check and report back

GalaxyGamingFR commented 1 month ago

I can't reproduce this issue, I don't really see how this could be an skript-itemsadder issue, The addon doesn't modify any Skript syntax, maybe this is an itemsadder issue?

it could also be a result of Pufferfish, outdated Skript, etc, please check and report back

skript-itemsadder is passing bad information to itemsadder image

GalaxyGamingFR commented 1 month ago

Skript is 2.9

Screenshot 2024-07-16 at 1 14 37 PM
GalaxyGamingFR commented 1 month ago

If I reload my other script, this happens:

Screenshot 2024-07-16 at 1 26 40 PM

(there is no function named this) Logs: [15:21:51] [Server thread/INFO]: GalaxyGaming__ issued server command: /sk reload misc.sk

[15:21:51] [Server thread/ERROR]: #!#! [Skript] Severe Error: [15:21:51] [Server thread/ERROR]: #!#! An error occurred while trying to load a Structure.

[15:21:51] [Server thread/ERROR]: #!#! Something went horribly wrong with Skript. [15:21:51] [Server thread/ERROR]: #!#! This issue is NOT your fault! You probably can't fix it yourself, either. [15:21:51] [Server thread/ERROR]: #!#! It looks like you are using some plugin(s) that alter how Skript works (addons). [15:21:51] [Server thread/ERROR]: #!#! Here is full list of them: [15:21:51] [Server thread/ERROR]: #!#! skript-placeholders v1.6.0 (https://github.com/APickledWalrus/skript-placeholders) skript-reflect v2.5.1 (https://github.com/SkriptLang/skript-reflect) skript-gui v1.3 (https://github.com/APickledWalrus/skript-gui) DiSky v4.17.2 ItemsAdder v3.6.3-beta-13 (devs.beer) PoaSK v3.4.4 SkBee v3.5.4 (https://github.com/ShaneBeee/SkBee) skript-itemsadder v1.5 AuctionMaster v4.1 (https://discord.gg/nchk86TKMT) [15:21:51] [Server thread/ERROR]: #!#! We could not identify which of those are specially related, so this might also be Skript issue. [15:21:51] [Server thread/ERROR]: #!#! You should try disabling those plugins one by one, trying to find which one causes it. [15:21:51] [Server thread/ERROR]: #!#! If the error doesn't disappear even after disabling all listed plugins, it is probably Skript issue. [15:21:51] [Server thread/ERROR]: #!#! In that case, you will be given instruction on how should you report it. [15:21:51] [Server thread/ERROR]: #!#! On the other hand, if the error disappears when disabling some plugin, report it to author of that plugin. [15:21:51] [Server thread/ERROR]: #!#! Only if the author tells you to do so, report it to Skript's issue tracker.

[15:21:51] [Server thread/ERROR]: #!#! Stack trace: [15:21:51] [Server thread/ERROR]: #!#! java.lang.NullPointerException: Cannot invoke "org.bukkit.inventory.ItemStack.clone()" because "" is null [15:21:51] [Server thread/ERROR]: #!#! at ItemsAdder_3.6.3-beta-13.jar//dev.lone.itemsadder.api.CustomStack.(SourceFile:35) [15:21:51] [Server thread/ERROR]: #!#! at ItemsAdder_3.6.3-beta-13.jar//dev.lone.itemsadder.api.CustomStack.(SourceFile:29) [15:21:51] [Server thread/ERROR]: #!#! at ItemsAdder_3.6.3-beta-13.jar//dev.lone.itemsadder.api.CustomBlock.(SourceFile:35) [15:21:51] [Server thread/ERROR]: #!#! at ItemsAdder_3.6.3-beta-13.jar//dev.lone.itemsadder.api.CustomBlock.getOriginal(SourceFile:57) [15:21:51] [Server thread/ERROR]: #!#! at ItemsAdder_3.6.3-beta-13.jar//dev.lone.itemsadder.api.CustomBlock.getInstance(SourceFile:66) [15:21:51] [Server thread/ERROR]: #!#! at skript-itemsadder-1.5.jar//me.asleepp.SkriptItemsAdder.elements.types.Types$1.parse(Types.java:40) [15:21:51] [Server thread/ERROR]: #!#! at skript-itemsadder-1.5.jar//me.asleepp.SkriptItemsAdder.elements.types.Types$1.parse(Types.java:26) [15:21:51] [Server thread/ERROR]: #!#! at Skript-2.9.0.jar//ch.njol.skript.registrations.Classes.parseSimple(Classes.java:481) [15:21:51] [Server thread/ERROR]: #!#! at Skript-2.9.0.jar//ch.njol.skript.lang.SkriptParser.parseSingleExpr(SkriptParser.java:588) [15:21:51] [Server thread/ERROR]: #!#! at Skript-2.9.0.jar//ch.njol.skript.lang.SkriptParser.parseExpression(SkriptParser.java:781) [15:21:51] [Server thread/ERROR]: #!#! at Skript-2.9.0.jar//ch.njol.skript.patterns.TypePatternElement.match(TypePatternElement.java:162) [15:21:51] [Server thread/ERROR]: #!#! at Skript-2.9.0.jar//ch.njol.skript.patterns.PatternElement.matchNext(PatternElement.java:54) [15:21:51] [Server thread/ERROR]: #!#! at Skript-2.9.0.jar//ch.njol.skript.patterns.LiteralPatternElement.match(LiteralPatternElement.java:65) [15:21:51] [Server thread/ERROR]: #!#! at Skript-2.9.0.jar//ch.njol.skript.patterns.PatternElement.matchNext(PatternElement.java:54) [15:21:51] [Server thread/ERROR]: #!#! at Skript-2.9.0.jar//ch.njol.skript.patterns.TypePatternElement.match(TypePatternElement.java:157) [15:21:51] [Server thread/ERROR]: #!#! at Skript-2.9.0.jar//ch.njol.skript.patterns.PatternElement.matchNext(PatternElement.java:54) [15:21:51] [Server thread/ERROR]: #!#! at Skript-2.9.0.jar//ch.njol.skript.patterns.LiteralPatternElement.match(LiteralPatternElement.java:65) [15:21:51] [Server thread/ERROR]: #!#! at Skript-2.9.0.jar//ch.njol.skript.patterns.SkriptPattern.match(SkriptPattern.java:63) [15:21:51] [Server thread/ERROR]: #!#! at Skript-2.9.0.jar//ch.njol.skript.lang.SkriptParser.parse_i(SkriptParser.java:1323) [15:21:51] [Server thread/ERROR]: #!#! at Skript-2.9.0.jar//ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:232) [15:21:51] [Server thread/ERROR]: #!#! at Skript-2.9.0.jar//ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:179) [15:21:51] [Server thread/ERROR]: #!#! at Skript-2.9.0.jar//ch.njol.skript.lang.Statement.parse(Statement.java:65) [15:21:51] [Server thread/ERROR]: #!#! at Skript-2.9.0.jar//ch.njol.skript.ScriptLoader.loadItems(ScriptLoader.java:967) [15:21:51] [Server thread/ERROR]: #!#! at Skript-2.9.0.jar//ch.njol.skript.lang.ReturnHandler.lambda$loadReturnableTrigger$1(ReturnHandler.java:124) [15:21:51] [Server thread/ERROR]: #!#! at Skript-2.9.0.jar//ch.njol.skript.lang.ReturnableTrigger.(ReturnableTrigger.java:36) [15:21:51] [Server thread/ERROR]: #!#! at Skript-2.9.0.jar//ch.njol.skript.lang.ReturnHandler.loadReturnableTrigger(ReturnHandler.java:119) [15:21:51] [Server thread/ERROR]: #!#! at Skript-2.9.0.jar//ch.njol.skript.lang.function.ScriptFunction.(ScriptFunction.java:54) [15:21:51] [Server thread/ERROR]: #!#! at Skript-2.9.0.jar//ch.njol.skript.lang.function.Functions.loadFunction(Functions.java:124) [15:21:51] [Server thread/ERROR]: #!#! at Skript-2.9.0.jar//ch.njol.skript.structures.StructFunction.load(StructFunction.java:120) [15:21:51] [Server thread/ERROR]: #!#! at Skript-2.9.0.jar//ch.njol.skript.ScriptLoader.lambda$loadScripts$8(ScriptLoader.java:570) [15:21:51] [Server thread/ERROR]: #!#! at java.base/java.util.ArrayList.removeIf(ArrayList.java:1755) [15:21:51] [Server thread/ERROR]: #!#! at java.base/java.util.ArrayList.removeIf(ArrayList.java:1743) [15:21:51] [Server thread/ERROR]: #!#! at Skript-2.9.0.jar//ch.njol.skript.ScriptLoader.lambda$loadScripts$10(ScriptLoader.java:561) [15:21:51] [Server thread/ERROR]: #!#! at java.base/java.util.concurrent.CompletableFuture.uniApplyNow(CompletableFuture.java:684) [15:21:51] [Server thread/ERROR]: #!#! at java.base/java.util.concurrent.CompletableFuture.uniApplyStage(CompletableFuture.java:662) [15:21:51] [Server thread/ERROR]: #!#! at java.base/java.util.concurrent.CompletableFuture.thenApply(CompletableFuture.java:2200) [15:21:51] [Server thread/ERROR]: #!#! at Skript-2.9.0.jar//ch.njol.skript.ScriptLoader.loadScripts(ScriptLoader.java:513) [15:21:51] [Server thread/ERROR]: #!#! at Skript-2.9.0.jar//ch.njol.skript.ScriptLoader.loadScripts(ScriptLoader.java:459) [15:21:51] [Server thread/ERROR]: #!#! at Skript-2.9.0.jar//ch.njol.skript.SkriptCommand.onCommand(SkriptCommand.java:190) [15:21:51] [Server thread/ERROR]: #!#! at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) [15:21:51] [Server thread/ERROR]: #!#! at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:155) [15:21:51] [Server thread/ERROR]: #!#! at org.bukkit.craftbukkit.v1_20_R3.CraftServer.dispatchCommand(CraftServer.java:999) [15:21:51] [Server thread/ERROR]: #!#! at org.bukkit.craftbukkit.v1_20R3.command.BukkitCommandWrapper.run(BukkitCommandWrapper.java:64) [15:21:51] [Server thread/ERROR]: #!#! at com.mojang.brigadier.context.ContextChain.runExecutable(ContextChain.java:73) [15:21:51] [Server thread/ERROR]: #!#! at net.minecraft.commands.execution.tasks.ExecuteCommand.a(ExecuteCommand.java:31) [15:21:51] [Server thread/ERROR]: #!#! at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:19) [15:21:51] [Server thread/ERROR]: #!#! at net.minecraft.commands.execution.UnboundEntryAction.a(UnboundEntryAction.java:8) [15:21:51] [Server thread/ERROR]: #!#! at net.minecraft.commands.execution.CommandQueueEntry.a(CommandQueueEntry.java:5) [15:21:51] [Server thread/ERROR]: #!#! at net.minecraft.commands.execution.ExecutionContext.a(ExecutionContext.java:103) [15:21:51] [Server thread/ERROR]: #!#! at net.minecraft.commands.CommandDispatcher.a(CommandDispatcher.java:434) [15:21:51] [Server thread/ERROR]: #!#! at net.minecraft.commands.CommandDispatcher.performCommand(CommandDispatcher.java:336) [15:21:51] [Server thread/ERROR]: #!#! at net.minecraft.commands.CommandDispatcher.a(CommandDispatcher.java:323) [15:21:51] [Server thread/ERROR]: #!#! at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:2231) [15:21:51] [Server thread/ERROR]: #!#! at net.minecraft.server.network.PlayerConnection.lambda$handleChatCommand$14(PlayerConnection.java:2191) [15:21:51] [Server thread/ERROR]: #!#! at net.minecraft.util.thread.IAsyncTaskHandler.b(IAsyncTaskHandler.java:59) [15:21:51] [Server thread/ERROR]: #!#! at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) [15:21:51] [Server thread/ERROR]: #!#! at net.minecraft.server.TickTask.run(TickTask.java:18) [15:21:51] [Server thread/ERROR]: #!#! at net.minecraft.util.thread.IAsyncTaskHandler.d(IAsyncTaskHandler.java:149) [15:21:51] [Server thread/ERROR]: #!#! at net.minecraft.util.thread.IAsyncTaskHandlerReentrant.d(IAsyncTaskHandlerReentrant.java:24) [15:21:51] [Server thread/ERROR]: #!#! at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1472) [15:21:51] [Server thread/ERROR]: #!#! at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:194) [15:21:51] [Server thread/ERROR]: #!#! at net.minecraft.util.thread.IAsyncTaskHandler.x(IAsyncTaskHandler.java:123) [15:21:51] [Server thread/ERROR]: #!#! at net.minecraft.server.MinecraftServer.bl(MinecraftServer.java:1449) [15:21:51] [Server thread/ERROR]: #!#! at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1372) [15:21:51] [Server thread/ERROR]: #!#! at net.minecraft.util.thread.IAsyncTaskHandler.c(IAsyncTaskHandler.java:133) [15:21:51] [Server thread/ERROR]: #!#! at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1350) [15:21:51] [Server thread/ERROR]: #!#! at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1239) [15:21:51] [Server thread/ERROR]: #!#! at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:320) [15:21:51] [Server thread/ERROR]: #!#! at java.base/java.lang.Thread.run(Thread.java:1583)

[15:21:51] [Server thread/ERROR]: #!#! Version Information: [15:21:51] [Server thread/ERROR]: #!#! Skript: 2.9.0 (latest) [15:21:51] [Server thread/ERROR]: #!#! Flavor: skriptlang-github [15:21:51] [Server thread/ERROR]: #!#! Date: 16:01:35.354421100 [15:21:51] [Server thread/ERROR]: #!#! Bukkit: 1.20.4-R0.1-SNAPSHOT [15:21:51] [Server thread/ERROR]: #!#! Minecraft: 1.20.4 [15:21:51] [Server thread/ERROR]: #!#! Java: 21.0.3 (OpenJDK 64-Bit Server VM 21.0.3+9-LTS) [15:21:51] [Server thread/ERROR]: #!#! OS: Linux amd64 5.4.0-186-generic

[15:21:51] [Server thread/ERROR]: #!#! Server platform: Paper

[15:21:51] [Server thread/ERROR]: #!#! Current node: set {_1} to anvil (misc.sk, line 12) [15:21:51] [Server thread/ERROR]: #!#! Current item: null

[15:21:51] [Server thread/ERROR]: #!#! Thread: Server thread

[15:21:51] [Server thread/ERROR]: #!#! Language: english [15:21:51] [Server thread/ERROR]: #!#! Link parse mode: DISABLED

[15:21:51] [Server thread/ERROR]: #!#! End of Error.

Asleeepp commented 1 month ago

Does this happen when trying to give yourself any item? (even itemsadder items?) No other users have reported this issue, which is why im a bit perplexed as to why this is happening

GalaxyGamingFR commented 1 month ago

It only happens to books atm, the anvil problem was just because I didn't specify what type of anvil. Once I turned set {_} to "book" parsed as itemtype, then it worked

Asleeepp commented 1 month ago

It only happens to books atm

Yeah, this is odd, skript-itemsadder doesn't modify books, im leaning towards this being an itemsadder issue, have you tried making an issue on their repo?

GalaxyGamingFR commented 1 month ago

I can do that but I was told by people in the skunity discord that it was from skript-itemsadder is passing bad information to itemsadder

Asleeepp commented 1 month ago

I've sent you a message on discord