Deprecate argument newBuilder methods and add builder methods to align with newer arguments (#419)

This commit is contained in:
Jason 2022-12-13 08:54:54 -07:00
parent 306a1def9a
commit 99d388b708
39 changed files with 634 additions and 204 deletions

View file

@ -124,7 +124,7 @@ public final class ExamplePlugin extends JavaPlugin {
// asynchronously
//
final Function<CommandTree<CommandSender>, CommandExecutionCoordinator<CommandSender>> executionCoordinatorFunction =
AsynchronousCommandExecutionCoordinator.<CommandSender>newBuilder().build();
AsynchronousCommandExecutionCoordinator.<CommandSender>builder().build();
//
// However, in many cases it is fine for to run everything synchronously:
//

View file

@ -61,7 +61,7 @@ final class Mc113 {
.argument(BlockPredicateArgument.of("predicate"))
.literal("with")
.argument(MaterialArgument.of("block")) // todo: use BlockDataArgument
.argument(IntegerArgument.<CommandSender>newBuilder("radius").withMin(1))
.argument(IntegerArgument.<CommandSender>builder("radius").withMin(1))
.handler(this::executeReplace));
this.manager.command(builder.literal("test_item")