Check world before performing distance call (#916)

This commit is contained in:
Eli, wyldt-
2020-07-29 21:39:23 -07:00
committed by GitHub
parent b6434298fc
commit 03778e6f31
@@ -53,7 +53,7 @@ class PlayerRescueTask implements Runnable
playerData.pendingTrapped = false;
//if the player moved three or more blocks from where he used /trapped, admonish him and don't save him
if (player.getLocation().distance(this.location) > 3)
if (!player.getLocation().getWorld().equals(this.location.getWorld()) || player.getLocation().distance(this.location) > 3)
{
GriefPrevention.sendMessage(player, TextMode.Err, Messages.RescueAbortedMoved);
return;