Only teleport players with ender pearls if it's within the map border

This commit is contained in:
Sam 2018-03-04 21:57:35 +00:00 committed by Alexander Meech
parent be457c7f3c
commit 860626afea

View File

@ -128,11 +128,12 @@ public class EnderPearlModule extends Module
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);
}
}