Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class ExampleThread implements IBukkitRunnable {
- public void asyncMessage(Player player) {
- KronosChain.createCompletedKronosChain().runAsync(() -> {
- System.out.println("This code is being ran Async!");
- MessageAPI.sendFormattedMessage("This code is being ran Async!", player);
- });
- }
- public void asyncMessage() {
- runTaskLater(IThreadContext.ASYNC, (t) -> {
- System.out.println("This code is being ran Async!");
- //Broadcasts
- MessageAPI.sendFormattedMessage("This code is being ran Async!");
- }, 20 * 5);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment