ItemHolderFinderProvider now calculates async to avoid performance problems with it.
For proper updating we need to delay refreshHolders and refreshEffects (I tested and see that 2 ticks enough to that)
But for slow servers there is option in config to change that delay.
I think it's better to use it in async than calculate every time full inventory with different SlotTypes in main thread.
Added cache of hashcode in SimpleProvidedHolder and ItemProvidedHolder.
PlayerItemHeldEvent as HolderUpdate now have check for items with itemMeta for performance reasons (can be changed in config).
Added option to exclude AFK players from refreshHolders runTimer.
Removed in ConditionBlock computations of cache, it's lower performance, when using a lot of conditions.
default-state-off-main-thread from config will be better in my opinion or it can be changed to Random(), but not caching that.
BoundCounters now provides without creating list (saving performance).
EffectSpawnParticle now spawn particles async, It's safe to use in this way and better for performance.
ElementLike -> changed injectPlaceholders to faster calculations, avoid map creation; optimised ElementLike.trigger with some checks to avoid generating placeholders for nothing.
All triggers now doesn't do anything if they disabled. IsEnabled check moved to events directly to avoid generating TriggerData.
Optimisation for Trigger.dispatchOnEffects to avoid unnecessary calculations.
This needs a lot of tweaks, a lot of things need changing but I'll do that myself - there's a lot of great stuff in here though so I'll merge it into dev and set about changing it.
List of changes
ItemHolderFinderProvider now calculates async to avoid performance problems with it. For proper updating we need to delay refreshHolders and refreshEffects (I tested and see that 2 ticks enough to that) But for slow servers there is option in config to change that delay. I think it's better to use it in async than calculate every time full inventory with different SlotTypes in main thread.
Added cache of hashcode in SimpleProvidedHolder and ItemProvidedHolder.
PlayerItemHeldEvent as HolderUpdate now have check for items with itemMeta for performance reasons (can be changed in config).
Added option to exclude AFK players from refreshHolders runTimer.
Removed in ConditionBlock computations of cache, it's lower performance, when using a lot of conditions. default-state-off-main-thread from config will be better in my opinion or it can be changed to Random(), but not caching that.
BoundCounters now provides without creating list (saving performance).
Fixed EffectRegenMultiplier. Incorrect reason key.
EffectSpawnParticle now spawn particles async, It's safe to use in this way and better for performance.
ElementLike -> changed injectPlaceholders to faster calculations, avoid map creation; optimised ElementLike.trigger with some checks to avoid generating placeholders for nothing.
All triggers now doesn't do anything if they disabled. IsEnabled check moved to events directly to avoid generating TriggerData.
Optimisation for Trigger.dispatchOnEffects to avoid unnecessary calculations.
Removed unused libraries in triggers classes.
Updated Caffeine lib.