Skript

Skript

743k Downloads

An internal error occurred while attempting to perform this command.

ItzSquidoWasTaken opened this issue ยท 3 comments

commented

Skript/Server Version

Server Version: git-Paper-478 (MC: 1.20.4)
Skript Version: 2.8.4 (skriptlang-github)
Installed Skript Addons: None
Installed dependencies:
- Vault v1.7.2-b131

Bug Description

Hello, I recently was inspired by a game on roblox called "Blox Fruits" and I wanted to re-create the fruit system in minecraft. While creating it I did have some other issues, but they were just caused by me. After finishing this script I decided to test it and see how it worked and it said "An internal error occurred while attempting to perform this command.", so I decided to see console and It told me to try and remove addons one by one to see if that changed anything, It did not. After that it told me to submit a report here, so here we are now.

Expected Behavior

After typing /changefruit followed by the player's name who's fruit you'd like to change and then followed by the fruit it was supposed to check if the second argument is "test" and if yes it would make console execute "/list" (I made it say /list because doing anything else if it's too complicated would result in errors that I didn't know how to fix, also it was a placeholder), this would let me see how many people were online at the time, and after the command was ran twice it would say that the fruit was changed succefully. If the second argument wasn't test it should have said that the fruit wasn't changed.

Code:

command /changefruit :
trigger:
if arg 2 is "test":
make console execute command "/list"
make console execute command "/list"
message "&aFruit succefully changed to &f&lTest" to arg 1
else:
message "&cFruit not changed" to arg 1

Steps to Reproduce

  1. Create a skript file called "fruitchange.sk"

  2. Write the code:
    command /changefruit :
    trigger:
    if arg 2 is "test":
    make console execute command "/list"
    make console execute command "/list"
    message "&aFruit succefully changed to &f&lTest" to arg 1
    else:
    message "&cFruit not changed" to arg 1

  3. Save the code and do /skript reload fruitchange.sk

  4. Run /changefruit ItzSquido(or any other username) test

Errors or Screenshots

image

console error:

08.04 19:53:56 [Server] ERROR #!#!
08.04 19:53:56 [Server] ERROR #!#! [Skript] Severe Error:
08.04 19:53:56 [Server] ERROR #!#!
08.04 19:53:56 [Server] ERROR #!#! Something went horribly wrong with Skript.
08.04 19:53:56 [Server] ERROR #!#! This issue is NOT your fault! You probably can't fix it yourself, either.
08.04 19:53:56 [Server] ERROR #!#! You should report it at https://github.com/SkriptLang/Skript/issues. Please copy paste this report there (or use paste service).
08.04 19:53:56 [Server] ERROR #!#! This ensures that your issue is noticed and will be fixed as soon as possible.
08.04 19:53:56 [Server] ERROR #!#!
08.04 19:53:56 [Server] ERROR #!#! Stack trace:
08.04 19:53:56 [Server] ERROR #!#! java.lang.IllegalStateException: zip file closed
08.04 19:53:56 [Server] ERROR #!#! at java.base/java.util.zip.ZipFile.ensureOpen(ZipFile.java:831)
08.04 19:53:56 [Server] ERROR #!#! at java.base/java.util.zip.ZipFile.getEntry(ZipFile.java:330)
08.04 19:53:56 [Server] ERROR #!#! at java.base/java.util.jar.JarFile.getEntry(JarFile.java:518)
08.04 19:53:56 [Server] ERROR #!#! at java.base/java.util.jar.JarFile.getJarEntry(JarFile.java:473)
08.04 19:53:56 [Server] ERROR #!#! at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:209)
08.04 19:53:56 [Server] ERROR #!#! at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
08.04 19:53:56 [Server] ERROR #!#! at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:169)
08.04 19:53:56 [Server] ERROR #!#! at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:164)
08.04 19:53:56 [Server] ERROR #!#! at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
08.04 19:53:56 [Server] ERROR #!#! at Skript.jar//net.kyori.adventure.text.serializer.bungeecord.SelfSerializable$AdapterFactory.create(SelfSerializable.java:58)
08.04 19:53:56 [Server] ERROR #!#! at com.google.gson.Gson.getAdapter(Gson.java:556)
08.04 19:53:56 [Server] ERROR #!#! at com.google.gson.Gson.toJson(Gson.java:834)
08.04 19:53:56 [Server] ERROR #!#! at com.google.gson.Gson.toJson(Gson.java:812)
08.04 19:53:56 [Server] ERROR #!#! at com.google.gson.Gson.toJson(Gson.java:759)
08.04 19:53:56 [Server] ERROR #!#! at com.google.gson.Gson.toJson(Gson.java:736)
08.04 19:53:56 [Server] ERROR #!#! at net.md_5.bungee.chat.ComponentSerializer.toString(ComponentSerializer.java:178)
08.04 19:53:56 [Server] ERROR #!#! at net.minecraft.network.protocol.game.ClientboundSystemChatPacket.(ClientboundSystemChatPacket.java:12)
08.04 19:53:56 [Server] ERROR #!#! at org.bukkit.craftbukkit.v1_20_R3.entity.CraftPlayer$3.sendMessage(CraftPlayer.java:3320)
08.04 19:53:56 [Server] ERROR #!#! at org.bukkit.craftbukkit.v1_20_R3.entity.CraftPlayer$3.sendMessage(CraftPlayer.java:3308)
08.04 19:53:56 [Server] ERROR #!#! at org.bukkit.craftbukkit.v1_20_R3.entity.CraftPlayer$3.sendMessage(CraftPlayer.java:3288)
08.04 19:53:56 [Server] ERROR #!#! at Skript (2).jar//ch.njol.skript.effects.EffMessage.sendMessage(EffMessage.java:154)
08.04 19:53:56 [Server] ERROR #!#! at Skript (2).jar//ch.njol.skript.effects.EffMessage.execute(EffMessage.java:128)
08.04 19:53:56 [Server] ERROR #!#! at Skript (2).jar//ch.njol.skript.lang.Effect.run(Effect.java:49)
08.04 19:53:56 [Server] ERROR #!#! at Skript (2).jar//ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:61)
08.04 19:53:56 [Server] ERROR #!#! at Skript (2).jar//ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:88)
08.04 19:53:56 [Server] ERROR #!#! at Skript (2).jar//ch.njol.skript.lang.Trigger.execute(Trigger.java:52)
08.04 19:53:56 [Server] ERROR #!#! at Skript (2).jar//ch.njol.skript.command.ScriptCommand.execute2(ScriptCommand.java:316)
08.04 19:53:56 [Server] ERROR #!#! at Skript (2).jar//ch.njol.skript.command.ScriptCommand.lambda$execute$0(ScriptCommand.java:275)
08.04 19:53:56 [Server] ERROR #!#! at Skript (2).jar//ch.njol.skript.command.ScriptCommand.execute(ScriptCommand.java:286)
08.04 19:53:56 [Server] ERROR #!#! at Skript (2).jar//ch.njol.skript.command.ScriptCommand.onCommand(ScriptCommand.java:221)
08.04 19:53:56 [Server] ERROR #!#! at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45)
08.04 19:53:56 [Server] ERROR #!#! at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:155)
08.04 19:53:56 [Server] ERROR #!#! at org.bukkit.craftbukkit.v1_20_R3.CraftServer.dispatchCommand(CraftServer.java:999)
08.04 19:53:56 [Server] ERROR #!#! at org.bukkit.craftbukkit.v1_20_R3.command.BukkitCommandWrapper.run(BukkitCommandWrapper.java:64)
08.04 19:53:56 [Server] ERROR #!#! at com.mojang.brigadier.context.ContextChain.runExecutable(ContextChain.java:73)
08.04 19:53:56 [Server] ERROR #!#! at net.minecraft.commands.execution.tasks.ExecuteCommand.a(ExecuteCommand.java:32)
08.04 19:53:56 [Server] ERROR #!#! at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:19)
08.04 19:53:56 [Server] ERROR #!#! at net.minecraft.commands.execution.UnboundEntryAction.a(UnboundEntryAction.java:8)
08.04 19:53:56 [Server] ERROR #!#! at net.minecraft.commands.execution.CommandQueueEntry.a(CommandQueueEntry.java:5)
08.04 19:53:56 [Server] ERROR #!#! at net.minecraft.commands.execution.ExecutionContext.a(ExecutionContext.java:101)
08.04 19:53:56 [Server] ERROR #!#! at net.minecraft.commands.CommandDispatcher.a(CommandDispatcher.java:434)
08.04 19:53:56 [Server] ERROR #!#! at net.minecraft.commands.CommandDispatcher.performCommand(CommandDispatcher.java:336)
08.04 19:53:56 [Server] ERROR #!#! at net.minecraft.commands.CommandDispatcher.a(CommandDispatcher.java:323)
08.04 19:53:56 [Server] ERROR #!#! at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:2230)
08.04 19:53:56 [Server] ERROR #!#! at net.minecraft.server.network.PlayerConnection.lambda$handleChatCommand$14(PlayerConnection.java:2190)
08.04 19:53:56 [Server] ERROR #!#! at net.minecraft.util.thread.IAsyncTaskHandler.b(IAsyncTaskHandler.java:59)
08.04 19:53:56 [Server] ERROR #!#! at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
08.04 19:53:56 [Server] ERROR #!#! at net.minecraft.server.TickTask.run(TickTask.java:18)
08.04 19:53:56 [Server] ERROR #!#! at net.minecraft.util.thread.IAsyncTaskHandler.d(IAsyncTaskHandler.java:153)
08.04 19:53:56 [Server] ERROR #!#! at net.minecraft.util.thread.IAsyncTaskHandlerReentrant.d(IAsyncTaskHandlerReentrant.java:24)
08.04 19:53:56 [Server] ERROR #!#! at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1465)
08.04 19:53:56 [Server] ERROR #!#! at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:194)
08.04 19:53:56 [Server] ERROR #!#! at net.minecraft.util.thread.IAsyncTaskHandler.x(IAsyncTaskHandler.java:126)
08.04 19:53:56 [Server] ERROR #!#! at net.minecraft.server.MinecraftServer.bl(MinecraftServer.java:1442)
08.04 19:53:56 [Server] ERROR #!#! at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1365)
08.04 19:53:56 [Server] ERROR #!#! at net.minecraft.util.thread.IAsyncTaskHandler.c(IAsyncTaskHandler.java:136)
08.04 19:53:56 [Server] ERROR #!#! at net.minecraft.server.MinecraftServer.w_(MinecraftServer.java:1343)
08.04 19:53:56 [Server] ERROR #!#! at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1232)
08.04 19:53:56 [Server] ERROR #!#! at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319)
08.04 19:53:56 [Server] ERROR #!#! at java.base/java.lang.Thread.run(Thread.java:833)
08.04 19:53:56 [Server] ERROR #!#!
08.04 19:53:56 [Server] ERROR #!#! Version Information:
08.04 19:53:56 [Server] ERROR #!#! Skript: 2.8.4 (latest)
08.04 19:53:56 [Server] ERROR #!#! Flavor: skriptlang-github
08.04 19:53:56 [Server] ERROR #!#! Date: 11:03:52.948789700
08.04 19:53:56 [Server] ERROR #!#! Bukkit: 1.20.4-R0.1-SNAPSHOT
08.04 19:53:56 [Server] ERROR #!#! Minecraft: 1.20.4
08.04 19:53:56 [Server] ERROR #!#! Java: 18.0.2.1 (OpenJDK 64-Bit Server VM 18.0.2.1+1-1)
08.04 19:53:56 [Server] ERROR #!#! OS: Linux amd64 5.10.0-27-amd64
08.04 19:53:56 [Server] ERROR #!#!
08.04 19:53:56 [Server] ERROR #!#! Server platform: Paper
08.04 19:53:56 [Server] ERROR #!#!
08.04 19:53:56 [Server] ERROR #!#! Current node: null
08.04 19:53:56 [Server] ERROR #!#! Current item: send "Fruit succefully changed to Test" to the 1st argument
08.04 19:53:56 [Server] ERROR #!#! Current trigger: command /changefruit (simple event) (fruitchange.sk, line 2)
08.04 19:53:56 [Server] ERROR #!#!
08.04 19:53:56 [Server] ERROR #!#! Thread: Server thread
08.04 19:53:56 [Server] ERROR #!#!
08.04 19:53:56 [Server] ERROR #!#! Language: english
08.04 19:53:56 [Server] ERROR #!#! Link parse mode: DISABLED
08.04 19:53:56 [Server] ERROR #!#!
08.04 19:53:56 [Server] ERROR #!#! End of Error.
08.04 19:53:56 [Server] ERROR #!#!

Other

No response

Agreement

  • I have read the guidelines above and affirm I am following them with this report.
commented

Did you use /reload, or use a plugin like Plugman to reload any plugins recently? Does this issue persist after a restart?

commented

Did you use /reload, or use a plugin like Plugman to reload any plugins recently? Does this issue persist after a restart?

Ah, my bad, I rarely restart the server because I can use /reload. Just restarted and everything seems fine, thank you.

commented

Did you use /reload, or use a plugin like Plugman to reload any plugins recently? Does this issue persist after a restart?

Ah, my bad, I rarely restart the server because I can use /reload. Just restarted and everything seems fine, thank you.

never use /reload, it breaks the server and plugins. always restart your server ๐Ÿ˜„