Added teleblock message for ancient magicks

This commit is contained in:
Player Name 2024-03-16 12:09:42 +00:00 committed by Ryan
parent dbbcf5601e
commit 8729f93d01

View file

@ -52,6 +52,7 @@ public final class AncientTeleportPlugin extends MagicSpell {
@Override
public boolean cast(Entity entity, Node target) {
if (entity.isTeleBlocked() || !super.meetsRequirements(entity, true, false)) {
entity.asPlayer().sendMessage("A magical force has stopped you from teleporting.");
return false;
}
if (entity.getTeleporter().send(location.transform(0, RandomFunction.random(3), 0), getSpellId() == 28 ? TeleportType.HOME : TeleportType.ANCIENT)) {