Is it possible to put a runnable in an if statement, because I need it, if the player has a chiseled sandstone underneath it, then it should take the block out after 5 seconds, is it possible to do it this way or do I need another way? Intellij IDEA, java plugin minecraft. Code:
if (player.getLocation().getBlock().getRelative(BlockFace.DOWN).getTypeId() == 179) {
new BukkitRunnable() {
@Override
public void run() {
loc.getBlock().setType(Material.AIR);
}
}.runTaskLater(plugin, 100);
}