selectorSortKeys - SpyglassMC/Spyglass GitHub Wiki
🔧 Fixable: violations of this rule can be fixed by Code Actions.
Enforce the values in an entity selector to be sorted by the keys.
- (string[]): sorted by the specific order. Values ending with Negwill be used to sort the negative version of that type. e.g.typerepresentstype=xxx, whiletypeNegrepresentstype=!xxx. Please make sure that all the possible keys are mentioned in the setting, or they might lose after you perform code actions!
{
    "selectorSortKeys": null
}kill @e[type=minecraft:zombie, tag=foo]
kill @e[tag=foo, type=minecraft:zombie]This is partially based on the research by vdvman1 at https://minecraftcommands.github.io/commanders-handbook/selector-argument-order.
{
    "selectorSortKeys": [
        "warning", 
        [
            "sort", "limit",
            "type", "gamemode", "gamemodeNeg", "level", "team", "teamNeg", 
            "typeNeg", "tag", "tagNeg", "name", "nameNeg", "predicate", "predicateNeg",
            "scores", "advancements", "nbt", "nbtNeg",
            "x", "y", "z", "dx", "dy", "dz", "distance", "x_rotation", "y_rotation"
        ]
    ]
}kill @e[type=minecraft:zombie, tag=foo]kill @e[tag=foo, type=minecraft:zombie]This rule was introduced in DHP 2.0.0.