-
-
Notifications
You must be signed in to change notification settings - Fork 71
Implementing optional arguments #393
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
Merged
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
cdb4c08
implementing optional arguments
DerEchtePilz 96a03ec
Add optional arguments to the Kotlin DSL. Rename commandapi-kotlin-bu…
DerEchtePilz 5b46749
add missing JavaDocs on AbstractArgument#setOptional(boolean)
DerEchtePilz 2ad5828
fixing build error
DerEchtePilz 3cf8297
adding documentation for optional arguments
DerEchtePilz 6eb09e5
fixing dependency in the Bukkit Kotlin DSL example
DerEchtePilz 7c4f635
address code review
DerEchtePilz a25547d
create optional_arguments.md
DerEchtePilz d1c0088
change /kill command to /sayhi
DerEchtePilz 5ad1a21
make Mardown Linter happy (hopefully)
DerEchtePilz c82feff
8000
fix wrong enchor end
DerEchtePilz f777925
address code review
DerEchtePilz 33228d4
convert tabs to spaces in Examples.java
DerEchtePilz c226296
Merge branch 'dev/dev' into dev/dev
JorelAli 210bed6
refactor AbstractCommandAPICommand#register()
DerEchtePilz afbd40a
Merge branch 'DerEchtePilz:dev/dev' into 'dev/dev'
DerEchtePilz 7e36de1
simplifying AbstractCommandAPICommand#getArgumentsToRegister()
DerEchtePilz 458b8d8
refactor AbstractCommandAPICommand#register() again
DerEchtePilz 3e7c6ca
Add a section 'Setting existing arguments as optional arguments' to o…
DerEchtePilz d913acc
remove the List parameter from AbstractCommandAPICommand#getCommandsT…
DerEchtePilz 6266990
Merge branch 'dev/dev' into dev/dev
DerEchtePilz ce835c6
fix a bug where a required argument would be registered as an optiona…
DerEchtePilz 473bc75
implement multiple getOrDefault methods for the CommandArguments class
DerEchtePilz a31b755
adding documentation for the getOrDefault method
DerEchtePilz 572beb9
address code review
DerEchtePilz c8c4960
make CommandArguments#get(int) not throw an ArrayIndexOutOfBoundsExce…
DerEchtePilz 3008d60
Merge branch 'dev/dev' into dev/dev
DerEchtePilz a76530d
fix variable names after merge
DerEchtePilz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
commandapi-core/src/main/java/dev/jorel/commandapi/exceptions/OptionalArgumentException.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package dev.jorel.commandapi.exceptions; | ||
|
||
public class OptionalArgumentException extends RuntimeException { | ||
|
||
public OptionalArgumentException() { | ||
super("Optional argument can not be followed by a required argument!"); | ||
} | ||
|
||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.