mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-09 16:45:44 -07:00
Added teleblock message for ancient magicks
This commit is contained in:
parent
dbbcf5601e
commit
8729f93d01
1 changed files with 1 additions and 0 deletions
|
|
@ -52,6 +52,7 @@ public final class AncientTeleportPlugin extends MagicSpell {
|
||||||
@Override
|
@Override
|
||||||
public boolean cast(Entity entity, Node target) {
|
public boolean cast(Entity entity, Node target) {
|
||||||
if (entity.isTeleBlocked() || !super.meetsRequirements(entity, true, false)) {
|
if (entity.isTeleBlocked() || !super.meetsRequirements(entity, true, false)) {
|
||||||
|
entity.asPlayer().sendMessage("A magical force has stopped you from teleporting.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (entity.getTeleporter().send(location.transform(0, RandomFunction.random(3), 0), getSpellId() == 28 ? TeleportType.HOME : TeleportType.ANCIENT)) {
|
if (entity.getTeleporter().send(location.transform(0, RandomFunction.random(3), 0), getSpellId() == 28 ? TeleportType.HOME : TeleportType.ANCIENT)) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue