Skip to content

Commit

Permalink
Do not place block if player is flying. #118
Browse files Browse the repository at this point in the history
  • Loading branch information
tastybento committed Jan 2, 2024
1 parent 12584b7 commit 94a1c16
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@ public void onPlayerLeaveIsland(PlayerMoveEvent e) {
if (r != null) {
inTeleport.add(p.getUniqueId());
Location targetPos = r.getHitPosition().toLocation(p.getWorld(), p.getLocation().getYaw(), p.getLocation().getPitch());
if (addon.getSettings().isReturnTeleportBlock() && !addon.getIslands().isSafeLocation(targetPos)) {
if (!e.getPlayer().isFlying() && addon.getSettings().isReturnTeleportBlock()
&& !addon.getIslands().isSafeLocation(targetPos)) {
switch (targetPos.getWorld().getEnvironment()) {
case NETHER:
targetPos.getBlock().getRelative(BlockFace.DOWN).setType(Material.NETHERRACK);
Expand Down

0 comments on commit 94a1c16

Please sign in to comment.