Bug-fix the packet listener.

This commit is contained in:
Kneesnap 2019-09-23 13:59:49 -07:00
parent 1c035ba290
commit bc1c9677ba
1 changed files with 1 additions and 2 deletions

View File

@ -102,8 +102,7 @@ public class PacketListener {
public void run() {
Player player = eventToCall.getWhoClicked();
this.listener.delay.remove(player.getUniqueId()); // Remove the NPC from the interact cooldown.
if (!Objects.equals(playerLocation.getWorld(), eventToCall.getNPC().getWorld()))
if (!Objects.equals(player.getWorld(), eventToCall.getNPC().getWorld()))
return; // If the NPC and player are not in the same world, abort!
double distance = player.getLocation(playerLocation).distanceSquared(eventToCall.getNPC().getLocation());