Optional/Different Arguments regression
See original GitHub issueCommandAPI version CommandAPI 4.1
Minecraft version 1.14.4
Describe the bug In older versions (eg. 2.3) you could create coexisting sets of arguments, but I cannot get that to work anymore.
My code This code reproduces the behavior:
LinkedHashMap<String, Argument> arguments;
arguments = new LinkedHashMap<String, Argument>();
arguments.put("start", new LiteralArgument("start"));
new CommandAPICommand("mycommand").withArguments(arguments).withPermission(CommandPermission.fromString("hamarb123.mycommand")).executes((sender, args) -> {
//blah
}).register();
arguments = new LinkedHashMap<String, Argument>();
arguments.put("stop", new LiteralArgument("stop"));
new CommandAPICommand("mycommand").withArguments(arguments).withPermission(CommandPermission.fromString("hamarb123.mycommand")).executes((sender, args) -> {
//blah
}).register();
Expected behavior It should have all of the command variants that have been registered appearing.
Screenshots
Additional context The documentation at https://www.jorel.dev/CommandAPI/4.1/arguments.html gives the impression that I shouldn’t need any other weird code. Also, the example on the website works properly.
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
Mathematical Foundations – Introduction to Machine Learning
In this section we will establish the mathematical foundations of machine learning. We will define three important quantities: data, models, ...
Read more >What if the Regression Equation Contains "Wrong" Predictors?
The regression model contains one or more "extraneous variables. ... from all possible random samples equals the parameter you're trying to estimate.
Read more >Use of multivariate statistical methods for the analysis ... - RiuNet
and obtains more robust parameters when compared to PLS while, at the same ... 3.8 Elastic net regression for a linear model with...
Read more >Genomic Prediction Using Individual-Level Data and ... - NCBI
A standard marker model, using random regression on marker genotypes, ... 2012) with optional different weights in B i (to differentially shrink different ......
Read more >An antigen microarray protocol for COVID-19 serological ...
Optional: Different arrangements of the antigens can be created using ... default parameters and the 'Print Plan' that was prepared above.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@hamarb123 Evening, After having a look at the sample code from your previous comment, I realized you forgot to add
.register()
to the end of all of your literals! Whoops!!After adding
.register()
to the end, I can generate the following:command_registration.json
In Minecraft 1.16.2, using the sample code from the first comment, I was unable to reproduce the issue:
Perhaps it’s a 1.14.4-specific issue? I’ll research later today to see if that’s the case.
I personally think having the multiple command executors is quite a useful feature, so don’t plan on dropping it anytime soon ¯_(ツ)_/¯.
You’ve made a few plugins that use the CommandAPI! If you have time to spare, feel free to join my (really really small) Discord server - I’d be honoured to have you on board 😃