mirror of
https://github.com/BentoBoxWorld/Challenges.git
synced 2024-11-28 13:36:06 +01:00
Add Environment check when completing challenge.
This commit is contained in:
parent
52b02e06bf
commit
0943a48c3c
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user