BlvckBytes / QuickShopSearch

Efficiently query QuickShops using any desired predicate
2 stars 1 forks source link

Add a reload command #5

Closed YuanYuanOwO closed 1 week ago

YuanYuanOwO commented 1 week ago

like:/qss reload
A lib that might be of use:https://github.com/Ghost-chu/SimpleReloadLib

BlvckBytes commented 1 week ago

It's a bit hard for me to understand what exactly that library is doing... Do you just intend to reload the configuration-file? Or should the whole .jar-file be reloaded? The former would be easily doable with my config-mapper, without any additional libraries. The second option seems a bit dangerous to me, ^^".

YuanYuanOwO commented 1 week ago

Just thought might use it. reload the configuration-file
To reload the entire jar file, I can use PlugMan

BlvckBytes commented 1 week ago

Exactly, I also thought about PlugMan. I'm going to implement reloading here first, and if you're happy with it, I'm going to copy the idea over to the parser.

BlvckBytes commented 1 week ago

Please check the latest release. You should now be able to reload the configuration-file at will; note that this command also affects all currently open GUIs in real time, and can be dispatched from the console or in-game.

// Edit:

Btw, I've decided against /qss reload simply because it's introducing a special case and thereby doesn't necessarily represent the cleanest solution. All input after /qss goes straight to the predicate-parser, so it would be a bit weird having to catch just reload. Also, the reason for why I've decided on long commands with shorthands instead of a sub-command structure is that I want to save as many keypresses on these commands as possible, and having to type out sub-commands each time one searches shops is rather tedious; so, in the end, the status-quo seems ideal to me.

YuanYuanOwO commented 1 week ago

Works fine for me.

BlvckBytes commented 1 week ago

Great! I will go about adding the same functionality to the parser too, alongside another little feature, and notify you in the corresponding issue once things are ready to be tested too.