@Commander( name ="two", description ="two scheduler")publicclassTestSchedulerTwoCommandimplementsCommandNode { @InjectprivateScheduleService service; @Overridepublicvoidexecute(CommandSender commandSender) {commandSender.sendMessage("starting scheduler");service.callAsync(ELDTester.getProvidingPlugin(ELDTester.class), () -> {commandSender.sendMessage("sleep 5 seconds in async");Thread.sleep(5000); // 暫停執行五秒return"abc"; }).thenApplySync(result -> {commandSender.sendMessage("get the result "+result+" in sync!");commandSender.sendMessage("sending number 123");return123; }).thenApplyAsync(re -> {commandSender.sendMessage("received "+re+" in async!");commandSender.sendMessage("add 123 into "+re+" with 5 secs");Thread.sleep(5000); // 暫停執行五秒return re +123; }).thenRunSync(res -> {commandSender.sendMessage("received "+res+" in sync!");commandSender.sendMessage("the final result is "+res); }).join(); }}