As of writing, a Binding depends - as far as command handling is concerned - only on the string that is consumed by it. So unless there is some sort of randomization in the logic of the Binding itself, a certain string is guaranteed to result in the same object, regardless of who uses the command.
If a Binding could access the CommandLocals of the command it is currently parsing, more flexible implementations could be written since this guarantee no longer exists. Naturally this results in more complex code that is harder to validate - e.g. if a certain Binding implementation expects to be used with commands that are used by Players only, but is used on a command that can be used by the Console too - but I think if this behaviour is documented properly, it is up to the developer who wrote the complex Binding implementation to ensure that his code is working. Intake as a library should be as flexible as possible.
Are there any plans to let Bindings access CommandLocals? Or am I overlooking something here?
As of writing, a Binding depends - as far as command handling is concerned - only on the string that is consumed by it. So unless there is some sort of randomization in the logic of the Binding itself, a certain string is guaranteed to result in the same object, regardless of who uses the command.
If a
Binding
could access theCommandLocals
of the command it is currently parsing, more flexible implementations could be written since this guarantee no longer exists. Naturally this results in more complex code that is harder to validate - e.g. if a certainBinding
implementation expects to be used with commands that are used by Players only, but is used on a command that can be used by the Console too - but I think if this behaviour is documented properly, it is up to the developer who wrote the complex Binding implementation to ensure that his code is working. Intake as a library should be as flexible as possible.Are there any plans to let Bindings access CommandLocals? Or am I overlooking something here?