PluginBugs / Issues-ItemsAdder

Repository used to keep track of issues of my plugin ItemsAdder
https://itemsadder.devs.beer
55 stars 21 forks source link

Keep items updated with configurations #2247

Open LoneDev6 opened 1 year ago

LoneDev6 commented 1 year ago

Continuation of https://github.com/PluginBugs/Issues-ItemsAdder/issues/2166 to remove old comments and repeated information.

Note: This task is very complex to achieve and can lead to an extreme amount of incompatibilities. This feature can be enabled in the config.yml of ItemsAdder since not everyone will want it for the risk of introducing incompatibilities.

Item updating logic

When to trigger the updater

Some of them may impact the performance but would be convenient.

Ability to disable the updater per-itemstack

Would be nice to have a command /iaitem <disable-auto-update> to disable auto update for the current hold itemstack. This is useful if you want to have a single particular instance of the item that can't change during updates. It will save a custom NBT attribute into the itemstack which will be checked later on during update and will make the itemstack skipped.

There would also be needed a way to disable auto-updating for certain items completely, in their configuration file, because for example you might want to change the attack damage of a sword to a higher value and also their recipe or drop rate, but you don't want already crafted swords to have the new attack damage because they would be too op, because people might have crafted a lot of them. So the already crafted swords will still keep the old attack damage.

This needs some thinking to come up with the best updating method. Maybe I could add some "javascript" processing to allow admins to code conditional updating logic for items to apply some properties or not.

Refer to: #3622

PSYCHEER commented 3 months ago
  1. Placing an item in the craft table Is not needed at all as and maybe 5. as you can do it on inventory click on item onInventoryClickItem

Will remove not needed updates as drag, move etc, just as far as item will be clicked, will be updated

nhanledev commented 2 months ago

I think each item should include a configuration setting to specify whether it needs to be updated to stay in sync with the server configuration. That behavior can be seen in other plugins.