Skip to content

Cleaner config with nesting #62

@PyPylia

Description

@PyPylia

Is your feature request related to a problem?

The config currently is confusing and complicated, through nesting this could be simplified, and more closely mimic other mods and plugins. This would require a custom GSON serializer/deserializer. Additionally, granular control over commands would be removed from the config. Instead, we'd redirect users to the Fabric Permission API integration.

Describe the solution you'd like.

New config as follows:

{
    "version": 3, // Bump version due to breaking changes
    "power": { // If not false, enable faction power
        "base": 20, // basePower
        "member": 20, // memberPower
        "claimWeight": 5, // claimWeight
        "powerTicks": { // If not false, enable power ticks and death penalty
            "deathPenalty": 10, // powerDeathPenalty
            "ticks": 12000, // ticksForPower
            "reward": 1 // ticksForPowerReward
        }
    },
    "safe": { // If not false, enable faction safe
        "enderChest": true, // If true, enable replacing ender chests with faction safe
        "double": true // factionSafeDouble
    },
    "home": { // If not false, enable homes
        "claimOnly": true, // If true, only allow setting home in claims
        "damageTickCooldown": 100 // safeTicksToWarp
    },
    "maxFactionSize": 0, // Use 0 for none instead of -1
    "changeChat": true, // chatModificationEnabled
    "friendlyFire": false // friendlyFireEnabled
}

Describe alternatives you've considered.

  • Keep the current system
  • Switch to YAML/TOML
  • Rework config option names

Additionally, if granular control of commands in the config is wanted, it could instead be implemented with a permissions option that given a command's permission key, and a boolean value can hook into the permission API and enable or disable it by default.

Other

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions