diff --git a/TaskBuilder.md b/TaskBuilder.md index ee368a0..ef96105 100644 --- a/TaskBuilder.md +++ b/TaskBuilder.md @@ -23,12 +23,13 @@ new TaskBuilder() ### SplitTask example Split up a task and run it when the main thread is free. ```Java -//In reality you'd use one of FAWE's async world manipulators (EditSession, AsyncWorld, FaweQueue etc.) +// In reality you'd use one of EditSession, AsyncWorld, FaweQueue instead. // But this is just an example of how you can split up a task with the FAWE API final World world = Bukkit.getWorld("world"); new TaskBuilder() -.syncWhenFree(new TaskBuilder.SplitTask(20) { // Execution will be split into multiple 20ms tasks +// Execution will be split into multiple 20ms tasks +.syncWhenFree(new TaskBuilder.SplitTask(20) { @Override public Object exec(Object previous) { for (int x = 0; x < 100; x++) { @@ -36,6 +37,7 @@ new TaskBuilder() for (int z = 0; z < 100; z++) { world.getBlockAt(x, y, z).setType(Material.STONE); // FAWE will use this point to split the task + // You can have multiple split points split(); } }