Hello!
After server restart the plugin starts to work not so good because some plugins load after this one, so it is not working 100% and I always need to reload after restart.
The solution would be a delay reload after server restarts.
Regards
Timing issue with custom item definitionsBug
Can you expand on what specific issues you see? "Work not so good" isn't sufficiently clear.
If you can share which specific plugins you are facing issues with, I can work with their maintainers to improve compatibility. At this point, it's not obvious whether the fault is with Recycle Manager as opposed to another plugin. While I appreciate the suggestion of reloading on a delay, it's not standard practice for plugins to behave like that. There are usually better, more robust solutions available.
Yes I will. The plugin works great but when the server restarts, It loads faster than other plugins (like CustomizableWeapons plugin), so the Items that are in the config RecycleManager that requires from other plugins will not work, only when I reload the plugin after restart. (I installed "ReloadAfterStartup" plugin to auto reload this plugin and It did fix it.)
Thanks for sharing the names of the plugins you are using. I want to reiterate that reloading a plugin later is not a fix, it's a mitigation, and it is not a good practice as it does not solve all cases (it only solves for server boot time, not late load/install or troubleshooting cases). Plugins should be designed to be able to load in any order.
I see that CustomizableWeapons uses CustomItemDefinitions which is problematic here because RecycleManager evaluates item short names and caches corresponding item IDs at plugin load time as a performance optimization (rather than looking up item short names at runtime, which is slower due to strings being more complex). Presumably, the item short names saved in the RecycleManager config correspond to custom item definitions which haven't been registered yet.
If you were to read the server logs during server boot, you would probably see warnings from Recycle Manager saying "Invalid item short name in config". Multiple plugins I maintain will do this. It's a usability feature to warn the server owner if the plugin has been incorrectly configured. The problem with this usability feature is that these could be valid short names registered by other plugins that aren't currently loaded. There's no obvious way to solve this since there's no convention for item short names (such as a common prefix), and even if there was, the user could still incorrectly type them. I'll look into a proper way to solve this.