delay scheduler task
This commit is contained in:
parent
88c3e15ba1
commit
934cf33c6f
1 changed files with 7 additions and 2 deletions
|
|
@ -77,8 +77,13 @@ public class FoliaFlow extends JavaPlugin implements Listener {
|
|||
}), 0L, 1L, TimeUnit.MILLISECONDS);
|
||||
} catch (UnsupportedOperationException ignored) {
|
||||
}
|
||||
Bukkit.dispatchCommand(Bukkit.getConsoleSender(),
|
||||
"summon minecraft:block_display 100.0005 48 -0.0005 {block_state:{Name:\"minecraft:obsidian\"},Tags:[\"FoliaFlow_FakeBlock\"]}");
|
||||
AsyncScheduler scheduler = getServer().getAsyncScheduler();
|
||||
|
||||
scheduler.runDelayed(this, task -> {
|
||||
Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "summon minecraft:block_display 100.0005 48 -0.0005 {block_state:{Name:\"minecraft:obsidian\"},Tags:[\"FoliaFlow_FakeBlock\"]}");
|
||||
}, 10, TimeUnit.SECONDS);
|
||||
|
||||
// Register the event listener
|
||||
getServer().getPluginManager().registerEvents(this, this);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue