Skip to content

Commit

Permalink
Add Environment check when completing challenge.
Browse files Browse the repository at this point in the history
  • Loading branch information
BONNe committed Jan 24, 2019
1 parent 52b02e0 commit 0943a48
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,12 @@ else if (this.manager.isChallengeComplete(this.user, this.challenge)
{
this.user.sendMessage("challenges.not-repeatable");
}
// Check environment
else if (!this.challenge.getEnvironment().isEmpty() &&
!this.challenge.getEnvironment().contains(this.user.getWorld().getEnvironment()))
{
this.user.sendMessage("general.errors.wrong-environment");
}
else if (type.equals(ChallengeType.INVENTORY))
{
return this.checkInventory();
Expand Down

0 comments on commit 0943a48

Please sign in to comment.