mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-15 15:16:41 +01:00
Check permissions onPlayerMove less often, fixes lucko/LuckPerms#1104
This commit is contained in:
parent
fc494bad75
commit
87edb98c3e
@ -720,20 +720,17 @@ public class PlayerListener implements Listener {
|
|||||||
if (evt.getFrom().getBlock().equals(evt.getTo().getBlock())) {
|
if (evt.getFrom().getBlock().equals(evt.getTo().getBlock())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (plugin.checkQuester(evt.getPlayer().getUniqueId()) == false) {
|
if (Quests.citizens != null) {
|
||||||
boolean isPlayer = true;
|
if (CitizensAPI.getNPCRegistry().isNPC(evt.getPlayer())) {
|
||||||
if (Quests.citizens != null) {
|
return;
|
||||||
if (CitizensAPI.getNPCRegistry().isNPC(evt.getPlayer())) {
|
|
||||||
isPlayer = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (isPlayer) {
|
}
|
||||||
if (plugin.getQuester(evt.getPlayer().getUniqueId()) != null) {
|
if (plugin.getQuester(evt.getPlayer().getUniqueId()) != null) {
|
||||||
Quester quester = plugin.getQuester(evt.getPlayer().getUniqueId());
|
if (plugin.checkQuester(evt.getPlayer().getUniqueId()) == false) {
|
||||||
for (Quest quest : quester.currentQuests.keySet()) {
|
Quester quester = plugin.getQuester(evt.getPlayer().getUniqueId());
|
||||||
if (quester.hasObjective(quest, "reachLocation")) {
|
for (Quest quest : quester.currentQuests.keySet()) {
|
||||||
quester.reachLocation(quest, evt.getTo());
|
if (quester.hasObjective(quest, "reachLocation")) {
|
||||||
}
|
quester.reachLocation(quest, evt.getTo());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user