UserCommands

From ETM
Jump to navigation Jump to search

General rules to support a large amount of config settings via commands

  1. We should not support everything with user.getXYZ() -> value. We generate way to many methods
  2. We should not create a private variable for every setting. This take to much effort to maintain and results in large jsons even with every setting set to the default
  3. We cannot use Map<String, Setting> as it would be too slow. We need near direct access.


Current System:

  1. Enum-Id based cache array for each user allows direct access
  2. Enum allows (often times) safe access / casting is limited to internal
  3. Hundreds of options will still work the same


Open:

We need good rules to check values against. These should be reused. We need them in ChangeUserSettingOptionAction at least for chat infos on errors

How do we integrate permissions for each value?