Permit /questadmin commands on offline players, part 2. Per #1040

This commit is contained in:
PikaMug 2020-01-21 15:35:31 -05:00
parent fb0b60257b
commit a910247fa3
2 changed files with 5 additions and 3 deletions

View File

@ -555,9 +555,11 @@ public class Quester {
((Player)player).sendMessage(q.getRequirements().getFailRequirements()); ((Player)player).sendMessage(q.getRequirements().getFailRequirements());
} }
} }
if (player.isOnline()) {
QuesterPostStartQuestEvent postEvent = new QuesterPostStartQuestEvent(this, q); QuesterPostStartQuestEvent postEvent = new QuesterPostStartQuestEvent(this, q);
plugin.getServer().getPluginManager().callEvent(postEvent); plugin.getServer().getPluginManager().callEvent(postEvent);
} }
}
/** /**
* Get all objectives for a quest * Get all objectives for a quest

View File

@ -18,7 +18,7 @@ import me.blackvein.quests.Quest;
import me.blackvein.quests.Quester; import me.blackvein.quests.Quester;
/** /**
* Called after a quester starts a quest * Called after an online quester starts a quest
*/ */
public class QuesterPostStartQuestEvent extends QuesterEvent { public class QuesterPostStartQuestEvent extends QuesterEvent {
private static final HandlerList handlers = new HandlerList(); private static final HandlerList handlers = new HandlerList();