Skript

Skript

743k Downloads

unexpected repair/damage behaviour

rudde0 opened this issue ยท 4 comments

commented

Skript/Server Version

Server Version: git-Purpur-2171 (MC: 1.20.4)
Skript Version: 2.8.5 (selfbuilt-unknown)
Installed Skript Addons:
 - skript-yaml v1.5
 - skRayFall v1.9.28 (https://sk.rayfall.net/)
 - Skript-Packet v2.2.1 (www.github.com/Anarchick/skript-packet)
 - Skript-Advancements v1.5.9-rudde
 - skDragon v0.18-alex-MC1.20.2-hack-5
 - skript-db v1.3.4
 - SkQuery v4.1.9
 - TuSKe v1.8.2-Pikachu-Patch-3 (github.com/Tuke-Nuke/TuSKe)
 - MundoSK-Async v0.1.0
 - ItemsAdder v3.6.3-beta-13 (devs.beer)
Installed dependencies:
 - Vault v1.7.3-b131
 - WorldGuard v7.0.10-SNAPSHOT+2260-c7319f1
 - GriefPrevention v17.0.0-15-gf44319b-dirty

Bug Description

damage held item by 3 change the item's durability by (max durability)-3 instead of (current durability)-3.

Also I was using damage/repair effects by async way, but after PR #6586 server crashes sometimes when I use it.

(ik bukkit methods not thread-safe but it was working good before)

Expected Behavior

damage %item% by %number% should decrease durability by the number.

Steps to Reproduce

  1. get a item with Damageable
  2. use effect command !damage held item by 3 several times.
    Item durability will stay at (max)-3.

Errors or Screenshots

I know.. it's because of using async but I swear it was working fine. ^^

[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#! 
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#! 
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#! [Skript] Severe Error:
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#! 
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#! [Skript] Severe Error:
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#! 
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#! Something went horribly wrong with Skript.
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#! Something went horribly wrong with Skript.
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#! This issue is NOT your fault! You probably can't fix it yourself, either.
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#! This issue is NOT your fault! You probably can't fix it yourself, either.
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#! It looks like you are using some plugin(s) that alter how Skript works (addons).
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#! Following plugins are probably related to this error in some way:
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#! It looks like you are using some plugin(s) that alter how Skript works (addons).
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#! Following plugins are probably related to this error in some way:
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#! MundoSK-Async 
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#! You should try disabling those plugins one by one, trying to find which one causes it.
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#! MundoSK-Async 
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#! If the error doesn't disappear even after disabling all listed plugins, it is probably Skript issue.
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#! You should try disabling those plugins one by one, trying to find which one causes it.
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#! In that case, you will be given instruction on how should you report it.
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#! If the error doesn't disappear even after disabling all listed plugins, it is probably Skript issue.
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#! On the other hand, if the error disappears when disabling some plugin, report it to author of that plugin.
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#! In that case, you will be given instruction on how should you report it.
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#! Only if the author tells you to do so, report it to Skript's issue tracker.
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#! 
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#! On the other hand, if the error disappears when disabling some plugin, report it to author of that plugin.
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#! Stack trace:
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#! Only if the author tells you to do so, report it to Skript's issue tracker.
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#! 
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#! Stack trace:
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#! java.lang.NullPointerException: Cannot invoke "it.unimi.dsi.fastutil.objects.ObjectArrayList.get(int)" because "this.wrapped" is null
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#! java.lang.NullPointerException: Cannot invoke "it.unimi.dsi.fastutil.objects.ObjectArrayList.get(int)" because "this.wrapped" is null
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#!     at it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap$MapIterator.nextEntry(Object2ObjectOpenHashMap.java:637)
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#!     at it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap$MapIterator.nextEntry(Object2ObjectOpenHashMap.java:637)
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#!     at it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap$FastEntryIterator.next(Object2ObjectOpenHashMap.java:752)
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#!     at it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap$FastEntryIterator.next(Object2ObjectOpenHashMap.java:747)
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#!     at it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap$FastEntryIterator.next(Object2ObjectOpenHashMap.java:752)
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#!     at net.minecraft.nbt.NBTTagCompound.h(NBTTagCompound.java:500)
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#!     at it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap$FastEntryIterator.next(Object2ObjectOpenHashMap.java:747)
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#!     at net.minecraft.world.item.ItemStack.copy(ItemStack.java:786)
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#!     at net.minecraft.nbt.NBTTagCompound.h(NBTTagCompound.java:500)
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#!     at net.minecraft.world.item.ItemStack.copy(ItemStack.java:786)
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#!     at net.minecraft.world.item.ItemStack.p(ItemStack.java:774)
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#!     at net.minecraft.world.item.ItemStack.p(ItemStack.java:774)
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#!     at org.bukkit.craftbukkit.v1_20_R3.inventory.CraftItemStack.asNMSCopy(CraftItemStack.java:50)
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#!     at org.bukkit.craftbukkit.v1_20_R3.inventory.CraftItemStack.asNMSCopy(CraftItemStack.java:50)
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#!     at org.bukkit.craftbukkit.v1_20_R3.inventory.CraftInventory.setItem(CraftInventory.java:100)
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#!     at org.bukkit.craftbukkit.v1_20_R3.inventory.CraftInventory.setItem(CraftInventory.java:100)
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#!     at org.bukkit.craftbukkit.v1_20_R3.inventory.CraftInventoryPlayer.setItem(CraftInventoryPlayer.java:73)
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#!     at org.bukkit.craftbukkit.v1_20_R3.inventory.CraftInventoryPlayer.setItem(CraftInventoryPlayer.java:73)
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#!     at org.bukkit.craftbukkit.v1_20_R3.inventory.CraftInventoryPlayer.setLeggings(CraftInventoryPlayer.java:224)
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#!     at org.bukkit.craftbukkit.v1_20_R3.inventory.CraftInventoryPlayer.setLeggings(CraftInventoryPlayer.java:224)
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#!     at Skript-2.8.5.jar//ch.njol.skript.util.slot.EquipmentSlot$EquipSlot$5.set(EquipmentSlot.java:98)
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#!     at Skript-2.8.5.jar//ch.njol.skript.util.slot.EquipmentSlot$EquipSlot$5.set(EquipmentSlot.java:98)
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#!     at Skript-2.8.5.jar//ch.njol.skript.util.slot.EquipmentSlot.setItem(EquipmentSlot.java:163)
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#!     at Skript-2.8.5.jar//ch.njol.skript.effects.EffHealth.execute(EffHealth.java:110)
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#!     at Skript-2.8.5.jar//ch.njol.skript.util.slot.EquipmentSlot.setItem(EquipmentSlot.java:163)
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#!     at Skript-2.8.5.jar//ch.njol.skript.lang.Effect.run(Effect.java:49)
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#!     at Skript-2.8.5.jar//ch.njol.skript.effects.EffHealth.execute(EffHealth.java:110)
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#!     at Skript-2.8.5.jar//ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:61)
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#!     at Skript-2.8.5.jar//ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:88)
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#!     at Skript-2.8.5.jar//ch.njol.skript.lang.Effect.run(Effect.java:49)
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#!     at MundoSK-Async-0.1.1-Skript-2.7.jar//me.nanodn.mundoskasync.EffSynchronicity.lambda$walk$0(EffSynchronicity.java:45)
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#!     at Skript-2.8.5.jar//ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:61)
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#!     at org.bukkit.craftbukkit.v1_20_R3.scheduler.CraftTask.run(CraftTask.java:101)
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#!     at Skript-2.8.5.jar//ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:88)
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#!     at org.bukkit.craftbukkit.v1_20_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57)
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#!     at MundoSK-Async-0.1.1-Skript-2.7.jar//me.nanodn.mundoskasync.EffSynchronicity.lambda$walk$0(EffSynchronicity.java:45)
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#!     at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#!     at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#!     at org.bukkit.craftbukkit.v1_20_R3.scheduler.CraftTask.run(CraftTask.java:101)
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#!     at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#!     at org.bukkit.craftbukkit.v1_20_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57)
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#!     at java.base/java.lang.Thread.run(Thread.java:1583)
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#!     at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#! 
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#! Version Information:
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#!     at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#!     at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#!   Skript: 2.8.5
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#!     Flavor: selfbuilt-unknown
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#!     at java.base/java.lang.Thread.run(Thread.java:1583)
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#!     Date: unknown
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#! 
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#!   Bukkit: 1.20.4-R0.1-SNAPSHOT
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#! Version Information:
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#!   Minecraft: 1.20.4
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#!   Skript: 2.8.5
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#!   Java: 21.0.1 (OpenJDK 64-Bit Server VM 21.0.1+12-jvmci-23.1-b19)
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#!     Flavor: selfbuilt-unknown
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#!   OS: Linux amd64 5.4.0-177-generic
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#!     Date: unknown
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#! 
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#! Server platform: Paper
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#!   Bukkit: 1.20.4-R0.1-SNAPSHOT
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#! 
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#!   Minecraft: 1.20.4
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#! Current node: null
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#!   Java: 21.0.1 (OpenJDK 64-Bit Server VM 21.0.1+12-jvmci-23.1-b19)
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#!   OS: Linux amd64 5.4.0-177-generic
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#! 
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#! Server platform: Paper
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#! 
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#! Current node: null
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#! Current item: repair leggings of (the attacked entity >> ch.njol.skript.classes.data.DefaultConverters$$Lambda/0x00007f12f9d44d00@237ee6d3: ConverterInfo{from=interface org.bukkit.entity.Entity,to=interface org.bukkit.entity.LivingEntity,converter=ch.njol.skript.classes.data.DefaultConverters$$Lambda/0x00007f12f9d44d00@237ee6d3,flags=0}) by [[long:4]]
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#! Current item: repair leggings of (the attacked entity >> ch.njol.skript.classes.data.DefaultConverters$$Lambda/0x00007f12f9d44d00@237ee6d3: ConverterInfo{from=interface org.bukkit.entity.Entity,to=interface org.bukkit.entity.LivingEntity,converter=ch.njol.skript.classes.data.DefaultConverters$$Lambda/0x00007f12f9d44d00@237ee6d3,flags=0}) by [[long:4]]
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#! Current trigger: damage of player (damage of [[entitydata:player]]) (a_2_Survival_Rules/damageHandlers.sk, line 760)
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#! Current trigger: damage of player (damage of [[entitydata:player]]) (a_2_Survival_Rules/damageHandlers.sk, line 760)
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#! 
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#! 
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#! Thread: Craft Scheduler Thread - 538 - MundoSK-Async
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#! 
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#! Thread: Craft Scheduler Thread - 551 - MundoSK-Async
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#! 
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#! Language: english
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#! Link parse mode: STRICT
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#! Language: english
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#! 
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#! End of Error.
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#! Link parse mode: STRICT
[13:58:34] [Craft Scheduler Thread - 538 - MundoSK-Async/ERROR]: #!#! 
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#! 
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#! End of Error.
[13:58:34] [Craft Scheduler Thread - 551 - MundoSK-Async/ERROR]: #!#! 
[13:58:34] [Server thread/WARN]: [Skript] Task #92 for Skript v2.8.5 generated an exception
java.lang.NullPointerException: Cannot invoke "it.unimi.dsi.fastutil.objects.ObjectArrayList.get(int)" because "this.wrapped" is null
	at it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap$MapIterator.nextEntry(Object2ObjectOpenHashMap.java:637) ~[fastutil-8.5.12.jar:?]
	at it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap$FastEntryIterator.next(Object2ObjectOpenHashMap.java:752) ~[fastutil-8.5.12.jar:?]
	at it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap$FastEntryIterator.next(Object2ObjectOpenHashMap.java:747) ~[fastutil-8.5.12.jar:?]
	at net.minecraft.nbt.CompoundTag.copy(CompoundTag.java:500) ~[?:?]
	at net.minecraft.world.item.ItemStack.copy(ItemStack.java:786) ~[purpur-1.20.4.jar:git-Purpur-2176]
	at net.minecraft.world.item.ItemStack.copy(ItemStack.java:774) ~[purpur-1.20.4.jar:git-Purpur-2176]
	at net.minecraft.world.inventory.AbstractContainerMenu.sendAllDataToRemote(AbstractContainerMenu.java:192) ~[?:?]
	at org.bukkit.craftbukkit.v1_20_R3.entity.CraftPlayer.updateInventory(CraftPlayer.java:1451) ~[purpur-1.20.4.jar:git-Purpur-2176]
	at ch.njol.skript.bukkitutil.PlayerUtils$1.run(PlayerUtils.java:58) ~[Skript-2.8.5.jar:?]
	at org.bukkit.craftbukkit.v1_20_R3.scheduler.CraftTask.run(CraftTask.java:101) ~[purpur-1.20.4.jar:git-Purpur-2176]
	at org.bukkit.craftbukkit.v1_20_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:482) ~[purpur-1.20.4.jar:git-Purpur-2176]
	at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1679) ~[purpur-1.20.4.jar:git-Purpur-2176]
	at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:487) ~[purpur-1.20.4.jar:git-Purpur-2176]
	at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1558) ~[purpur-1.20.4.jar:git-Purpur-2176]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1246) ~[purpur-1.20.4.jar:git-Purpur-2176]
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:323) ~[purpur-1.20.4.jar:git-Purpur-2176]
	at java.lang.Thread.run(Thread.java:1583) ~[?:?]
[13:58:34] [Server thread/INFO]: weln lost connection: Internal server error
[13:58:34] [Server thread/ERROR]: Encountered an unexpected exception
net.minecraft.ReportedException: Ticking player
	at net.minecraft.server.level.ServerPlayer.doTick(ServerPlayer.java:875) ~[?:?]
	at net.minecraft.server.players.PlayerList.remove(PlayerList.java:618) ~[purpur-1.20.4.jar:git-Purpur-2176]
	at net.minecraft.server.players.PlayerList.remove(PlayerList.java:599) ~[purpur-1.20.4.jar:git-Purpur-2176]
	at net.minecraft.server.network.ServerGamePacketListenerImpl.removePlayerFromWorld(ServerGamePacketListenerImpl.java:2164) ~[?:?]
	at net.minecraft.server.network.ServerGamePacketListenerImpl.onDisconnect(ServerGamePacketListenerImpl.java:2144) ~[?:?]
	at net.minecraft.server.network.ServerGamePacketListenerImpl.onDisconnect(ServerGamePacketListenerImpl.java:2131) ~[?:?]
	at net.minecraft.network.Connection.handleDisconnection(Connection.java:847) ~[?:?]
	at net.minecraft.server.network.ServerConnectionListener.tick(ServerConnectionListener.java:254) ~[?:?]
	at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1781) ~[purpur-1.20.4.jar:git-Purpur-2176]
	at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:487) ~[purpur-1.20.4.jar:git-Purpur-2176]
	at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1558) ~[purpur-1.20.4.jar:git-Purpur-2176]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1246) ~[purpur-1.20.4.jar:git-Purpur-2176]
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:323) ~[purpur-1.20.4.jar:git-Purpur-2176]
	at java.lang.Thread.run(Thread.java:1583) ~[?:?]
Caused by: java.lang.NullPointerException: Cannot invoke "it.unimi.dsi.fastutil.objects.ObjectArrayList.get(int)" because "this.wrapped" is null
	at it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap$MapIterator.nextEntry(Object2ObjectOpenHashMap.java:637) ~[fastutil-8.5.12.jar:?]
	at it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap$KeyIterator.next(Object2ObjectOpenHashMap.java:1038) ~[fastutil-8.5.12.jar:?]
	at org.bukkit.craftbukkit.v1_20_R3.inventory.CraftMetaItem.<init>(CraftMetaItem.java:441) ~[purpur-1.20.4.jar:git-Purpur-2176]
	at org.bukkit.craftbukkit.v1_20_R3.inventory.CraftMetaArmor.<init>(CraftMetaArmor.java:65) ~[purpur-1.20.4.jar:git-Purpur-2176]
	at org.bukkit.craftbukkit.v1_20_R3.inventory.CraftItemStack.getItemMeta(CraftItemStack.java:372) ~[purpur-1.20.4.jar:git-Purpur-2176]
	at org.bukkit.craftbukkit.v1_20_R3.inventory.CraftItemStack.getItemMeta(CraftItemStack.java:324) ~[purpur-1.20.4.jar:git-Purpur-2176]
	at org.bukkit.craftbukkit.v1_20_R3.inventory.CraftItemStack.asBukkitCopy(CraftItemStack.java:94) ~[purpur-1.20.4.jar:git-Purpur-2176]
	at net.minecraft.world.entity.LivingEntity.collectEquipmentChanges(LivingEntity.java:3260) ~[?:?]
	at net.minecraft.world.entity.LivingEntity.detectEquipmentUpdatesPublic(LivingEntity.java:3222) ~[?:?]
	at net.minecraft.world.entity.LivingEntity.tick(LivingEntity.java:3146) ~[?:?]
	at net.minecraft.world.entity.player.Player.tick(Player.java:303) ~[?:?]
	at net.minecraft.server.level.ServerPlayer.doTick(ServerPlayer.java:789) ~[?:?]
	... 13 more

(I tried to use synchronized (inventoryUpdateList) in PlayerUtils#updateInventory)

Other

The async one is special to my case. But damage expression needs to be fixed for the community.

Agreement

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

The damage thing seems to be exclusive to slots due to this change forgetting to add the current damage:
https://github.com/SkriptLang/Skript/pull/6586/files#diff-5256efddd09cd309c4dfca00a7a16c07c85c3cfa083d91b37d3b468215609cd5R106

The async stuff is not something we make any guarantees about, and will likely not be fixing.

commented

Whoops, I'll make a quick pr while I have skript up unless you want to

commented

The async stuff is not something we make any guarantees about, and will likely not be fixing.

I'm aware of this but I wanted to mention about it if someone has any idea about it. I couldn't fix it by my own.

commented

So I'm not 100% sure outside of what sovde mentioned what's the whole issue so I can properly test it as from current test build it all appears to work as intended now