Fix errors in #396

This commit is contained in:
HappyPikachu 2018-05-10 16:45:19 -04:00
parent 7df24e079f
commit 0a5b001164

View File

@ -39,6 +39,7 @@ import com.sk89q.worldguard.protection.regions.ProtectedRegion;
import me.blackvein.quests.exceptions.InvalidStageException;
import me.blackvein.quests.util.ItemUtil;
import me.blackvein.quests.util.Lang;
import me.clip.placeholderapi.PlaceholderAPI;
import net.citizensnpcs.api.npc.NPC;
public class Quest {
@ -98,10 +99,11 @@ public class Quest {
public void nextStage(Quester q) {
String stageCompleteMessage = q.getCurrentStage(this).completeMessage;
if (stageCompleteMessage != null) {
String s = Quests.parseString(stageCompleteMessage, this);
if(Quests.placeholder != null) {
s = PlaceholderAPI.setPlaceholders(quester.getPlayer(), s);
s = PlaceholderAPI.setPlaceholders(q.getPlayer(), s);
}
q.getPlayer().sendMessage(Quests.parseString(stageCompleteMessage, this));
q.getPlayer().sendMessage(s);
}
if (plugin.useCompass) {
q.resetCompass();