Closed Bjonnfesk closed 1 year ago
The commands.lua file actually uses these functions to pause/unpause/remove items when provided only with a name. Maybe I should move them in that file.
Then this issue is even deeper. That means at least some of those functions in commands.lua
are loading and saving the requested items file twice per operation.
I have reworked the whole file. Will push the changes after I do some testing.
Moved all the related functions to commands.lua and reduced janus.load() and janus.save() calls significantly.
Dossier uses its own code for pausing, unpausing and removing items:
https://github.com/Koulis2000/MCScripts/blob/2cab7ac9e6ae84828c9103f0acb3eb29f155f8ba/CCTweaked/janus-dossier.lua#L84-L127
This is duplicate code, as the capability to do that already exists in
janus/commands.lua
. Dossier should call these existing methods instead.