Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Feb 11, 2026

Players pushed by a piston past the barrier (e.g., falling below y=-64 then flying up) could move freely without being teleported back. Root cause: getIslandAt(to) returns Optional.empty() when the player is completely outside any island's space, which made both outsideCheck() and the backtrack logic silently no-op.

Changes

  • outsideCheck() — return true when getIslandAt is empty (player not on any island), not just when they're on an island but outside its protection zone:
    Optional<Island> islandAt = addon.getIslands().getIslandAt(to);
    return islandAt.isEmpty() || islandAt.filter(i -> !i.onIsland(to)).isPresent();
  • Backtrack teleport — fall back to getIsland(World, User) to resolve the player's own island when getIslandAt returns empty at their current location
  • Test — added case covering a player completely outside any island space being teleported back via their own island lookup
Original prompt

This section details on the original issue you should resolve

<issue_title>No teleportation</issue_title>
<issue_description>### Expected behavior

I think the barrier plugin should teleport the player back even if they are below -64 height.

Observed/Actual behavior

My players found a bug where if you push yourself over a barrier with a piston and fall below -64 height, and then fly up, you can safely fly behind the barrier without fear of being teleported back.

This raises problems because people can enter other islands and destroy them, look at other people's farms, etc.

Steps/models to reproduce

  1. Push yourself over the barrier with the piston
  2. Type /fly
  3. Fly to other islands

BentoBox version

BentoBox-3.11.1
Border-4.6.0

Plugin list

AOneBlock-1.22.0
Biomes-2.2.1
Level-2.22.0
TopBlock-1.1.0
Warps-1.17.0

Other

I made a video for visual viewing.
https://youtu.be/EroVKnnx18g</issue_description>

<agent_instructions>Somehow the user is not being detected in their movement when outside the island. It's not clear how the <-64 location has an affect as the island check is done on x,z and not y as far as I can tell. Try and see if there is some way. Also, it's not clear how the teleportation back is not working because that should always work. There may be an edge case where the border is at the exact range of the island so when the user is pushed outside of the border, they are not in an island space at all.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits February 11, 2026 17:01
…ide island

When a player was pushed by a piston over the barrier and fell below -64 height,
getIslandAt() returned Optional.empty() because the player was completely outside
any island space. This caused outsideCheck() to return false (skipping the border
check) and the backtrack logic to never execute.

Fix:
1. outsideCheck() now also returns true when getIslandAt returns empty (player not
   on any island but in game world)
2. Backtrack logic falls back to getIsland(World, User) to find the player's own
   island when getIslandAt returns empty

Co-authored-by: tastybento <[email protected]>
Copilot AI changed the title [WIP] Fix barrier plugin to teleport players below -64 height Fix border teleportation bypass when player is outside all island spaces Feb 11, 2026
Copilot AI requested a review from tastybento February 11, 2026 17:06
@sonarqubecloud
Copy link

@tastybento tastybento marked this pull request as ready for review February 12, 2026 00:36
@tastybento tastybento merged commit d9f922a into develop Feb 12, 2026
3 checks passed
@tastybento tastybento deleted the copilot/fix-teleportation-issue branch February 12, 2026 00:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No teleportation

2 participants