Cancelled

This commit is contained in:
MidnightTale 2023-04-11 16:05:13 +07:00
commit e5afd9abbd

View file

@ -41,7 +41,7 @@ public class Bbsdfia extends JavaPlugin implements Listener {
World world = Bukkit.getServer().getWorld("world"); World world = Bukkit.getServer().getWorld("world");
Location spawnLoc = new Location(world, 100, 50, 0); Location spawnLoc = new Location(world, 100, 50, 0);
*/ */
Bukkit.getAsyncScheduler().runNow(this, task -> { Bukkit.getAsyncScheduler().runNow(this, (task) -> {
FallingBlock dummy = loc2.getWorld().spawnFallingBlock(loc2, ((FallingBlock) entity).getBlockData()); FallingBlock dummy = loc2.getWorld().spawnFallingBlock(loc2, ((FallingBlock) entity).getBlockData());
Vector dummyVel = vel.clone(); Vector dummyVel = vel.clone();
dummyVel.setY(-dummyVel.getY()); dummyVel.setY(-dummyVel.getY());
@ -51,7 +51,7 @@ public class Bbsdfia extends JavaPlugin implements Listener {
dummyVel.add(new Vector(0, 0.3, 0)); dummyVel.add(new Vector(0, 0.3, 0));
dummy.setVelocity(dummyVel); dummy.setVelocity(dummyVel);
}); }).isCancelled();
} }
} }
} }