Mark end portals and gateways as unsafe location. (#2042)

The end portals and gateways teleports players to a different dimension upon player touches it. So teleportation should consider these positions as unsafe, otherwise player will be teleported to the different dimension instantly.

Fixes #2040
This commit is contained in:
BONNe 2022-10-19 11:41:00 +03:00 committed by GitHub
parent ac4922534e
commit a22ce33175
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -269,7 +269,11 @@ public class IslandsManager {
|| ground.name().contains("SIGN")
|| ground.name().contains("BANNER")
|| ground.name().contains("BUTTON")
|| ground.name().contains("BOAT")) {
|| ground.name().contains("BOAT")
|| space1.equals(Material.END_PORTAL)
|| space2.equals(Material.END_PORTAL)
|| space1.equals(Material.END_GATEWAY)
|| space2.equals(Material.END_GATEWAY)) {
return false;
}
// Known unsafe blocks