cloud
cloud copied to clipboard
Issues registering Argument Pairs following Argument Triplets to Brigadier
Description:
When registering a command in the form of .. <doubles triplet> <floats pair>
, the pair isn't registered on Brig.
Environment:
- cloud module: cloud-paper
- cloud version: 1.1.0
- Server version: Paper 1.16.3 b248
- Command manager: PaperCommandManager<CommandSender>
- Coordinator function whatever: SimpleCoordinator
- Brigadier hooking: yes
- Paper async tab completions hooking: yes
Sample code:
// onEnable
final PaperCommandManager<CommandSender> manager;
manager = new PaperCommandManager<>(this, CommandExecutionCoordinator.SimpleCoordinator.simpleCoordinator(),
Function.identity(), Function.identity())
if (manager.queryCapability(CloudBukkitCapabilities.BRIGADIER)) {
manager.registerBrigadier();
}
if (manager.queryCapability(CloudBukkitCapabilities.ASYNCHRONOUS_COMPLETION)) {
manager.registerAsynchronousCompletions();
}
final Command.Builder<CommandSender> base = manager.commandBuilder("playerheads", "pheads", "ph");
manager.command(base.literal("spawnnpc", Description.empty())
.argumentTriplet("location", TypeToken.get(Vector.class),
Triplet.of("x", "y", "z"), Triplet.of(Double.class, Double.class, Double.class),
(sender, triplet) -> fromDoubleTriplet(triplet),
Description.empty())
.argumentPair("rotation",
Pair.of("yaw", "pitch"), Pair.of(Float.class, Float.class),
Description.empty()));