Allow Ancient Teleports to bypass the isTeleBlocked function so that they work in the wilderness

Note that they are still restricted by the checks in the ZoneMonitor file, which does include teleblock checks, as well as specific wilderness levels.
This commit is contained in:
randy 2024-11-11 18:05:16 -07:00
parent ee3a71a5d0
commit f2aad1c957

View file

@ -99,7 +99,7 @@ public class TeleportManager {
if (!entity.getZoneMonitor().teleport(teleportType, null)) {
return false;
}
if (teleportType != -1 && entity.isTeleBlocked()) {
if (teleportType != -1 && type != TeleportType.ANCIENT && entity.isTeleBlocked()) {
if (entity.isPlayer())
entity.asPlayer().sendMessage("A magical force has stopped you from teleporting.");
return false;