mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-15 07:05:51 +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
|
* @return true if available
|
||||||
*/
|
*/
|
||||||
public boolean canAcceptOffer(Quest quest, boolean giveReason) {
|
public boolean canAcceptOffer(Quest quest, boolean giveReason) {
|
||||||
|
if (quest == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (getCurrentQuests().size() >= plugin.getSettings().getMaxQuests() && plugin.getSettings().getMaxQuests() > 0) {
|
if (getCurrentQuests().size() >= plugin.getSettings().getMaxQuests() && plugin.getSettings().getMaxQuests() > 0) {
|
||||||
if (giveReason) {
|
if (giveReason) {
|
||||||
String msg = Lang.get(getPlayer(), "questMaxAllowed");
|
String msg = Lang.get(getPlayer(), "questMaxAllowed");
|
||||||
|
Loading…
Reference in New Issue
Block a user