Created
November 18, 2021 09:34
-
-
Save CyberFlameGO/6d169c36248f21077d3f9391aafa1cdf to your computer and use it in GitHub Desktop.
this is a small snippet for running sync code asynchronously (just a task in an async scheduler)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bukkit.getScheduler().runTaskTimerAsynchronously(LumberHarvester.getInstance(), () -> { | |
Bukkit.getScheduler().runTask(VoidFlame.getPlugin(), () -> { | |
World world = Bukkit.getWorld("world"); | |
world.spawnEntity(new Location(world, 0, 100, 0), EntityType.PRIMED_TNT); | |
}); | |
}, 0L, 20L); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment