serenity icon indicating copy to clipboard operation
serenity copied to clipboard

feat: Strict custom enum type support.

Open palmmc opened this issue 5 months ago • 0 comments

Description

Serenity does not currently support strict ("real") enum support. By this, I refer to an enum type that meets the following qualifications:

  1. Registered as a new param type in commands (e.g. /setblock <block: BlockId> vs current /setblock <block: string>.
  2. Validates from a list of string options.

Not having strict enum support creates one critical issue with the command system: If you have two overloads that use different enums, for example:

/test <foo: "foo"> <bar: "bar"> /test <test: "hello" | "world>

The client will always choose the second enum. This is because all CustomEnums use the string symbol, which offers no client differentiation between "foo" and "hello" | "world".

Without this feature, overloads will never function as expected, making the command system a lot less versatile and useful.

palmmc avatar Sep 06 '25 03:09 palmmc