Correct distance check when taking NPC quest, fixes #1081

This commit is contained in:
PikaMug 2020-02-17 21:59:13 -05:00
parent ceb95eb69b
commit a9620187e7
3 changed files with 3 additions and 3 deletions

View File

@ -3739,7 +3739,7 @@ public class Quester {
}
return false;
} else if (quest.getNpcStart() != null && quest.getNpcStart().getEntity() != null
&& quest.getNpcStart().getEntity().getLocation().distance(getPlayer().getLocation()) < 5.0
&& quest.getNpcStart().getEntity().getLocation().distance(getPlayer().getLocation()) > 6.0
&& plugin.getSettings().canAllowCommandsForNpcQuests() == false) {
if (giveReason) {
String msg = Lang.get(getPlayer(), "mustSpeakTo");

View File

@ -47,7 +47,7 @@ import net.citizensnpcs.api.npc.NPC;
public class NpcListener implements Listener {
final Quests plugin;
private final Quests plugin;
public NpcListener(Quests newPlugin) {
plugin = newPlugin;

View File

@ -80,7 +80,7 @@ import net.citizensnpcs.api.CitizensAPI;
public class PlayerListener implements Listener {
final Quests plugin;
private final Quests plugin;
public PlayerListener(Quests newPlugin) {
plugin = newPlugin;