Package studio.mevera.imperat
Interface FlagRegistrar<S extends Source>
- Type Parameters:
S- the type of source that extends theSourceclass, representing the origin or context of the command (e.g., a user, a system, etc.).
- All Known Subinterfaces:
Command<S>
public interface FlagRegistrar<S extends Source>
The
FlagRegistrar interface is responsible for managing the registration and retrieval
of free flags in the Imperat command framework. Free flags are flags that can be used anywhere
in the command syntax, without being tied to a specific position or index.-
Method Summary
Modifier and TypeMethodDescriptiongetFlagFromRaw(String raw) Retrieves a registered flag based on its raw input (e.g., a string provided by the user in a command).Retrieves all registered flags in the system.voidregisterFlag(FlagData<S> flagBuilder) Registers a new free flag in the system.
-
Method Details
-
registerFlag
Registers a new free flag in the system.- Parameters:
flagBuilder- theFlagDataobject containing the data required to define and register the flag. This includes the flag's name, aliases, description, and any associated logic or behavior.
-
getFlagFromRaw
Retrieves a registered flag based on its raw input (e.g., a string provided by the user in a command). -
getRegisteredFlags
Retrieves all registered flags in the system.
-