Wesley1808 / ServerCore

A mod that aims to optimize the minecraft server.
76 stars 11 forks source link

Deleting dynamic settings crashes the server on launch #102

Closed Banaando closed 2 months ago

Banaando commented 4 months ago

Describe the bug When I delete any of the dynamic settings from the config like it says I should be able to do to disable the option, the server crashes on start.

Reproduce Steps to reproduce the behavior:

  1. Enable the dynamic module in the ServerCore config.
  2. Delete any of the dynamic settings from the config.

Expected behavior ServerCore will disable making that behavior dynamic like the config says it will (Removing a setting from the list will disable it.) and not crash.

Versions ServerCore: 1.5.2 Minecraft: 1.20.6

Mod incompatibilities Happens with no other mods installed.

Logs: https://mclo.gs/FikVp3j

Wesley1808 commented 4 months ago

Whoops, clearly didn't think that through when designing the new config. I still need the config values (max, min, etc.) for the dynamic values, so deleting them isn't really an option. Properly fixing this will require some minor config changes.

Banaando commented 4 months ago

Is there a way to achieve the same effect without deleting config values? Instead maybe like setting the interval to -1 or the increment to 0?

Wesley1808 commented 4 months ago

I'm not deleting any, just adding a new field to dynamic settings (enabled) and requiring all dynamic settings to be present in the list. Instead of deleting an entry from the list you'd just set that field to false.