mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-15 23:26:11 +01:00
Correct distance check when taking NPC quest, fixes #1081
This commit is contained in:
parent
ceb95eb69b
commit
a9620187e7
@ -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");
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user