Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/configcommands functions should include more information #25

Open
willkroboth opened this issue Sep 11, 2022 · 0 comments
Open

/configcommands functions should include more information #25

willkroboth opened this issue Sep 11, 2022 · 0 comments
Labels
Awaiting release Issue will be resolved by the next release Base Related to the ConfigCommand plugin enhancement New feature or request

Comments

@willkroboth
Copy link
Owner

Currently, the configcommands functions command looks something like this:

Console:
> configcommands functions configcommands Boolean nonStatic !
[INFO]: Aliases: [!, not]
[INFO]: Possible parameters:
  var.!() -> Boolean
  var.not() -> Boolean
> configcommands functions configcommands Boolean nonStatic and
[INFO]: Aliases: [&&, and]
[INFO]: Possible parameters:
  var.&&(Boolean) -> Boolean
  var.and(Boolean) -> Boolean

I want it to look more like this:

Console:
> configcommands functions configcommands Boolean nonStatic !
[INFO]: Class: Boolean
[INFO]: Function: not
[INFO]: Aliases: 
[INFO]:   - !
[INFO]: Description: Returns the logical not of this Boolean
[INFO]: Parameters: none
[INFO]: Returns: The opposite of this Boolean
[INFO]: Examples:
[INFO]:   Boolean.("true").not() -> Boolean.("false")
[INFO]:   Boolean.("false").!() -> Boolean.("true")
> configcommands functions configcommands Boolean nonStatic and
[INFO]: Class: Boolean
[INFO]: Function: and
[INFO]: Aliases:
[INFO]:   - &&
[INFO]: Description: Returns the logical and of this Boolean and another Boolean
[INFO]: Parameters:
[INFO]:   - Boolean other -> the other Boolean
[INFO]: Returns: true if this and the other Boolean are true and false otherwise
[INFO]: Examples:
[INFO]:   Boolean.("true").and(Boolean.("true")) -> Boolean.("true")
[INFO]:   Boolean.("false").and(Boolean.("true")) -> Boolean.("false")
[INFO]:   Boolean.("true").and(Boolean.("false")) -> Boolean.("false")
[INFO]:   Boolean.("false").and(Boolean.("false")) -> Boolean.("false")

The new indentation scheme where every new line has [(time) INFO] before it should be easy with the new IndentedCommandSenderMessenger class, but the help messages and examples and such might require a new Function definition system. The current system isn't great anyways, with a bunch of methods in InternalArgument to format Strings and a bunch of generic VarArgs issues.

@willkroboth willkroboth added enhancement New feature or request Base Related to the ConfigCommand plugin labels Sep 11, 2022
willkroboth added a commit that referenced this issue Sep 29, 2022
Add classes AbstractFunction, Function, StaticFunction, and Pattern for defining functions with a builder pattern
Add classes AbstractFunctionList, FunctionList, and StaticFunctionList for handling lists of the new functions
Implement new function definition system in the InternalArguments
Implement new function help system in FunctionsCommandHandler
Remove obsolete classes and methods from the old system
@willkroboth willkroboth added the Awaiting release Issue will be resolved by the next release label Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting release Issue will be resolved by the next release Base Related to the ConfigCommand plugin enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant