modrinth / code

The Modrinth monorepo containing all code which powers Modrinth!
https://modrinth.com
Other
898 stars 160 forks source link

Stop user from interacting with mods when minecraft is running #2445

Open denisJaved opened 1 week ago

denisJaved commented 1 week ago

Please confirm the following.

What parts of Modrinth is your feature request related too?

App

Is your suggested feature related to a problem? Please describe.

Obviously it is impossible to remove/disable mod when instance(minecraft) is running. But theese buttons always will try to remove/disable mod when pressed.

Describe the solution you'd like

Disable buttons for disabling/enabling/updating/removing mod when minecraft is running.

Like this: image this done by adding disabled attribute to switch's input tag and buttons.

Describe alternatives you've considered

Before disabling/enabling/updating/removing check is minecraft running right now and if it is show user confirmation prompt. image

Tasks

Felix14-v2 commented 1 week ago

Obviously it is impossible to remove/disable mod when instance(minecraft) is running.

This is a Windows limitation, on other systems you can interact with files, even if they are being used by a program.

denisJaved commented 1 week ago

Limitation caused by Minecraft. Modloaders gather mods only on startup. Which means even if you would change mod file, nothing will happen until you restart game

Felix14-v2 commented 1 week ago

Limitation caused by Minecraft

It doesn't. The issue is an inability to remove a mod file after the game launch, not the inability to "unmodify" the game on the fly.

denisJaved commented 1 week ago

Limitation caused by Minecraft

It doesn't. The issue is an inability to remove a mod file after the game launch, not the inability to "unmodify" the game on the fly.

I know, but still you can't remove mod from game without restarting game. Anyways both of our points are right.

Felix14-v2 commented 6 days ago

Anyways, that's an unrelated issue.