mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-28 21:56:28 +01:00
Check for null quest
This commit is contained in:
parent
321a74cd8e
commit
a9bed845ad
@ -3127,6 +3127,9 @@ public class Quester {
|
||||
* @return true if available
|
||||
*/
|
||||
public boolean canAcceptOffer(Quest quest, boolean giveReason) {
|
||||
if (quest == null) {
|
||||
return false;
|
||||
}
|
||||
if (getCurrentQuests().size() >= plugin.getSettings().getMaxQuests() && plugin.getSettings().getMaxQuests() > 0) {
|
||||
if (giveReason) {
|
||||
String msg = Lang.get(getPlayer(), "questMaxAllowed");
|
||||
|
Loading…
Reference in New Issue
Block a user