superzanti / ServerSync

Sync files between client and server for Minecraft Forge
GNU General Public License v3.0
163 stars 26 forks source link

Support for deleting mods in Push mode #309

Open Zhou-Shilin opened 12 months ago

Zhou-Shilin commented 12 months ago

Serversync Version:

4.2.0

Minecraft Version:

1.20.1

Issue:

(using deepl translate, some words may be strange)

Hi! ServerSync is a great program that has helped me a lot. Right now ServerSync has two modes, mirror and push. My server allows players to add their own secondary mods, like Litematica, etc., so I chose the push mode. But recently there was a time when my server needed to remove a mod, but push mode couldn't do it because push mode can only add mods on the client side that are missing compared to the server side. I couldn't use mirror mode because it would remove the secondary mods that were added by the players. I also can't use the push_client_mods feature because my players want to use a variety of different client-side mods, and the ignore mode doesn't work because there are hundreds of mods and I can't possibly add them all to the ignore list.

I would like ServerSync to provide a way (e.g. in the config file) to be able to delete the specified mods in push mode.

Example:

{
  "general": {
    "push_client_mods": false,
    "sync_mode": 2
  },
  "connection": {
    "port": 20017,
    "buffer": 65536
  },
  "rules": {
    "directories": [
      {
        "path": "mods",
        "mode": "push"
      }
    ],
    "files": {
      "include": [
        "mods/**"
      ],
      "ignore": [
        "**/serversync-*.jar",
        "**/serversync-*.cfg"
      ],
      "redirect": [

      ],
      "delete": [
        "mods/example.jar"
      ]
    }
  },
  "misc": {
    "locale": "zh_CN"
  }

Added the following relative to the original configuration file:

"delete": [
    "mods/example.jar"
]
rheimus commented 11 months ago

Sounds like a great enhancement to the current feature set.

Zhou-Shilin commented 9 months ago

Any plans to develop this feature?

rheimus commented 9 months ago

This is on the enhancement backlog yeah, I don't have any specific timeframe in mind.

I would like to sort out making the JavaFX requirement more user friendly before tackling new features.