Add Environment check when completing challenge.

This commit is contained in:
BONNe 2019-01-24 23:57:50 +02:00
parent 52b02e06bf
commit 0943a48c3c

View File

@ -274,6 +274,12 @@ public class TryToComplete
{
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();