Only teleport players with ender pearls if it's within the map border
This commit is contained in:
parent
be457c7f3c
commit
860626afea
@ -128,11 +128,12 @@ public class EnderPearlModule extends Module
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ProjectileSource source = event.getEntity().getShooter();
|
Projectile projectile = event.getEntity();
|
||||||
|
ProjectileSource source = projectile.getShooter();
|
||||||
|
|
||||||
if (_pearls.remove(source) != null)
|
if (_pearls.remove(source) != null && getGame().isInsideMap(projectile.getLocation()))
|
||||||
{
|
{
|
||||||
teleport((Player) source, event.getEntity());
|
teleport((Player) source, projectile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user