Skip to content

Add "untoggleable" flags #140

@FireController1847

Description

@FireController1847

It'd be really nice to specify which flags the user is allowed to toggle and which ones they aren't, so I was wondering if it would be possible to add "untoggleable" flags. Similar to how "toggleable" flags work by adding a "?" in front of the flag name, I was thinking if we made it so putting a "+" in front of the flag name, it would prevent the user from being able to toggle that flag (meaning it'd either always be enabled or disabled).

An example of how the + modifier could work:

my-block:
- block: redstone_block
  radius: 10
  prevent-fire: true
  prevent-flow: true
  prevent-place: true
  prevent-destroy: true
  +welcome-message: true
  +farewell-message: true

And then if a player tried this:

Command: /ps toggle welcome-message
Response: "Sorry, you don't have permission to toggle this flag!"

I may take a shot at adding this at some point in the future if I get time, but if anyone is able to get to it before me, go for it! :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions