Severe error related to damage
ILikeOrangeJuice opened this issue ยท 3 comments
Skript/Server Version
[20:50:22 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[20:50:22 INFO]: [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[20:50:22 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[20:50:22 INFO]: [Skript] Server Version: 1.20.6-148-20f5165 (MC: 1.20.6)
[20:50:22 INFO]: [Skript] Skript Version: 2.8.7 (skriptlang-github)
[20:50:22 INFO]: [Skript] Installed Skript Addons:
[20:50:22 INFO]: [Skript] - skript-placeholders v1.5 (https://github.com/APickledWalrus/skript-placeholders)
[20:50:22 INFO]: [Skript] - skript-yaml v1.4.1-for-MC-1.20
[20:50:22 INFO]: [Skript] - skript-reflect v2.4 (https://github.com/SkriptLang/skript-reflect)
[20:50:22 INFO]: [Skript] - SkBee v3.5.6 (https://github.com/ShaneBeee/SkBee)
[20:50:22 INFO]: [Skript] Installed dependencies:
[20:50:22 INFO]: [Skript] - Vault v1.7.3-b131
[20:50:22 INFO]: [Skript] - WorldGuard v7.0.9-beta1+2249-223b80c
Bug Description
I updated today from 1.20.4 to the latest 1.20.6 and one of my scripts started throwing errors sometimes, I assume it affects others too using the same method. It worked without any issue in .4.
Expected Behavior
For it to work as before.
Steps to Reproduce
This is the script I use, basically when an item takes damage it prettifies (if you are not overstacked and have a cooldown) the lore, meaning it takes the lore away, redoes it with it's current enchantments and translate them into our language while doing so.
Here is the script:
https://pastebin.com/9u3Hd4Vq
Errors or Screenshots
20:48:41 ERROR: #!#! [Skript] Severe Error:
20:48:41 ERROR: #!#!
20:48:41 ERROR: #!#! Something went horribly wrong with Skript.
20:48:41 ERROR: #!#! This issue is NOT your fault! You probably can't fix it yourself, either.
20:48:41 ERROR: #!#! It looks like you are using some plugin(s) that alter how Skript works (addons).
20:48:41 ERROR: #!#! Here is full list of them:
20:48:41 ERROR: #!#! skript-placeholders v1.5 (https://github.com/APickledWalrus/skript-placeholders) skript-reflect v2.4 (https://github.com/SkriptLang/skript-reflect) skript-yaml v1.4.1-for-MC-1.20 SkBee v3.5.6 (https://github.com/ShaneBeee/SkBee) BetonQuest v2.0.1 (https://www.betonquest.org)
20:48:41 ERROR: #!#! We could not identify which of those are specially related, so this might also be Skript issue.
20:48:41 ERROR: #!#! You should try disabling those plugins one by one, trying to find which one causes it.
20:48:41 ERROR: #!#! If the error doesn't disappear even after disabling all listed plugins, it is probably Skript issue.
20:48:41 ERROR: #!#! In that case, you will be given instruction on how should you report it.
20:48:41 ERROR: #!#! On the other hand, if the error disappears when disabling some plugin, report it to author of that plugin.
20:48:41 ERROR: #!#! Only if the author tells you to do so, report it to Skript's issue tracker.
20:48:41 ERROR: #!#!
20:48:41 ERROR: #!#! Stack trace:
20:48:41 ERROR: #!#! java.lang.IllegalArgumentException: Damage cannot be negative
20:48:41 ERROR: #!#! at com.google.common.base.Preconditions.checkArgument(Preconditions.java:143)
20:48:41 ERROR: #!#! at org.bukkit.craftbukkit.inventory.CraftMetaItem.setDamage(CraftMetaItem.java:1547)
20:48:41 ERROR: #!#! at Skript-2.8.7.jar//ch.njol.skript.expressions.ExprDurability.change(ExprDurability.java:110)
20:48:41 ERROR: #!#! at Skript-2.8.7.jar//ch.njol.skript.effects.EffChange.execute(EffChange.java:292)
20:48:41 ERROR: #!#! at Skript-2.8.7.jar//ch.njol.skript.lang.Effect.run(Effect.java:49)
20:48:41 ERROR: #!#! at Skript-2.8.7.jar//ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:61)
20:48:41 ERROR: #!#! at Skript-2.8.7.jar//ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:88)
20:48:41 ERROR: #!#! at Skript-2.8.7.jar//ch.njol.skript.lang.Trigger.execute(Trigger.java:52)
20:48:41 ERROR: #!#! at Skript-2.8.7.jar//ch.njol.skript.SkriptEventHandler.lambda$check$3(SkriptEventHandler.java:155)
20:48:41 ERROR: #!#! at Skript-2.8.7.jar//ch.njol.skript.SkriptEventHandler.lambda$check$4(SkriptEventHandler.java:166)
20:48:41 ERROR: #!#! at Skript-2.8.7.jar//ch.njol.skript.util.Task.callSync(Task.java:164)
20:48:41 ERROR: #!#! at Skript-2.8.7.jar//ch.njol.skript.util.Task.callSync(Task.java:148)
20:48:41 ERROR: #!#! at Skript-2.8.7.jar//ch.njol.skript.SkriptEventHandler.check(SkriptEventHandler.java:164)
20:48:41 ERROR: #!#! at Skript-2.8.7.jar//ch.njol.skript.SkriptEventHandler.access$000(SkriptEventHandler.java:53)
20:48:41 ERROR: #!#! at Skript-2.8.7.jar//ch.njol.skript.SkriptEventHandler$PriorityListener.lambda$new$0(SkriptEventHandler.java:66)
20:48:41 ERROR: #!#! at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:77)
20:48:41 ERROR: #!#! at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70)
20:48:41 ERROR: #!#! at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54)
20:48:41 ERROR: #!#! at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131)
20:48:41 ERROR: #!#! at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:628)
20:48:41 ERROR: #!#! at net.minecraft.world.item.ItemStack.hurtAndBreak(ItemStack.java:672)
20:48:41 ERROR: #!#! at net.minecraft.world.item.ItemStack.hurtAndBreakWithoutChecks(ItemStack.java:738)
20:48:41 ERROR: #!#! at net.minecraft.world.item.ItemStack.hurtAndBreak(ItemStack.java:720)
20:48:41 ERROR: #!#! at net.minecraft.world.item.Item.mineBlock(Item.java:195)
20:48:41 ERROR: #!#! at net.minecraft.world.item.ItemStack.mineBlock(ItemStack.java:791)
20:48:41 ERROR: #!#! at net.minecraft.server.level.ServerPlayerGameMode.destroyBlock(ServerPlayerGameMode.java:442)
20:48:41 ERROR: #!#! at net.minecraft.server.level.ServerPlayerGameMode.destroyAndAck(ServerPlayerGameMode.java:337)
20:48:41 ERROR: #!#! at net.minecraft.server.level.ServerPlayerGameMode.handleBlockBreakAction(ServerPlayerGameMode.java:301)
20:48:41 ERROR: #!#! at net.minecraft.server.network.ServerGamePacketListenerImpl.handlePlayerAction(ServerGamePacketListenerImpl.java:1845)
20:48:41 ERROR: #!#! at net.minecraft.network.protocol.game.ServerboundPlayerActionPacket.handle(ServerboundPlayerActionPacket.java:51)
20:48:41 ERROR: #!#! at net.minecraft.network.protocol.game.ServerboundPlayerActionPacket.handle(ServerboundPlayerActionPacket.java:20)
20:48:41 ERROR: #!#! at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:55)
20:48:41 ERROR: #!#! at net.minecraft.server.TickTask.run(TickTask.java:18)
20:48:41 ERROR: #!#! at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:151)
20:48:41 ERROR: #!#! at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24)
20:48:41 ERROR: #!#! at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1511)
20:48:41 ERROR: #!#! at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:195)
20:48:41 ERROR: #!#! at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:125)
20:48:41 ERROR: #!#! at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1488)
20:48:41 ERROR: #!#! at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1411)
20:48:41 ERROR: #!#! at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:135)
20:48:41 ERROR: #!#! at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1377)
20:48:41 ERROR: #!#! at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1238)
20:48:41 ERROR: #!#! at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:323)
20:48:41 ERROR: #!#! at java.base/java.lang.Thread.run(Thread.java:1583)
20:48:41 ERROR: #!#!
20:48:41 ERROR: #!#! Version Information:
20:48:41 ERROR: #!#! Skript: 2.8.7
20:48:41 ERROR: #!#! Flavor: skriptlang-github
20:48:41 ERROR: #!#! Date: 14:50:13.592363600
20:48:41 ERROR: #!#! Bukkit: 1.20.6-R0.1-SNAPSHOT
20:48:41 ERROR: #!#! Minecraft: 1.20.6
20:48:41 ERROR: #!#! Java: 21.0.3 (OpenJDK 64-Bit Server VM 21.0.3+9-LTS)
20:48:41 ERROR: #!#! OS: Linux amd64 5.4.0-136-generic
20:48:41 ERROR: #!#!
20:48:41 ERROR: #!#! Server platform: Paper
20:48:41 ERROR: #!#!
20:48:41 ERROR: #!#! Current node: null
20:48:41 ERROR: #!#! Current item: set durability of tool of the player to durability of tool of the player + {_mending} (as java.lang.Object)
20:48:41 ERROR: #!#! Current trigger: item damage (simple event) (PrettifyEnchantments.sk, line 84)
20:48:41 ERROR: #!#!
20:48:41 ERROR: #!#! Thread: Server thread
20:48:41 ERROR: #!#!
20:48:41 ERROR: #!#! Language: english
20:48:41 ERROR: #!#! Link parse mode: DISABLED
20:48:41 ERROR: #!#!
20:48:41 ERROR: #!#! End of Error.
20:48:41 ERROR: #!#!
Other
Agreement
- I have read the guidelines above and affirm I am following them with this report.
I tried using this way now:
add {_mending} to durability of player's tool
But it also errors with a related error I suppose:
https://pastebin.com/ua86HLtt
Also using it directly without the variable path it errors:
add a random number between 1 and 3 to durability of player's tool
https://pastebin.com/RtsbruKu