SkriptLang / skript-reflect

Powerful reflection utilities for Skript.
MIT License
56 stars 19 forks source link

Custom types and sections #58

Open Fusezion opened 1 year ago

Fusezion commented 1 year ago

Is your feature request related to a problem? Please describe. NO Describe alternatives you've considered NONE

Describe the solution you'd like With the latest releases of skript, "sections" were added which made creating highly unique and manageable operations possible, adding this ability to skript-reflect will open up a lot to more people as well

But not only this I'd also like to see custom types added if possible, by doing this we're able to add many more limitations to existing complex effects and sections that were made to resemble custom plugins or addons

Additional context Some possible formats for types and sections are

Types

"key" referring to accepted values for the type ex: gamemode being survival, creative, spectator, adventure each being a key

[local] type <name>:
  keys: # could be renamed to something more understandable, for others this just is how I read "types"
    <key1>
    <key2>
    <key3>

Sections

#would support multiple pattern section
[local] section <pattern>:
  entries: # key | required
    entry1: true
    entry2: false
    entry3: false
  trigger:
    # code

a way to use the valid entries would be to add an expression for all possible entries and entries used to be honest I'm having a very hard time coming up with syntax for sections despite how nice they would be to have the ability to create