[COMMONS] Fixes minor bug that caused /tpr to teleport you partially into the ground

Alco wouldn't stop annoying me about this.
This commit is contained in:
Video 2023-03-11 01:08:27 -07:00
parent 2e7756ed0f
commit 071d19c5e0

View File

@ -18,7 +18,7 @@ public class Command_tprandom extends FreedomCommand
{ {
int x = FUtil.randomInteger(-50000, 50000); int x = FUtil.randomInteger(-50000, 50000);
int z = FUtil.randomInteger(-50000, 50000); int z = FUtil.randomInteger(-50000, 50000);
int y = playerSender.getWorld().getHighestBlockYAt(x, z); int y = playerSender.getWorld().getHighestBlockYAt(x, z) + 1;
Location location = new Location(playerSender.getLocation().getWorld(), x, y, z); Location location = new Location(playerSender.getLocation().getWorld(), x, y, z);
PaperLib.teleportAsync(playerSender, location); PaperLib.teleportAsync(playerSender, location);
msg("Poof!", ChatColor.GREEN); msg("Poof!", ChatColor.GREEN);