mirror of
https://github.com/BentoBoxWorld/Challenges.git
synced 2025-01-02 14:29:01 +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");
|
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))
|
else if (type.equals(ChallengeType.INVENTORY))
|
||||||
{
|
{
|
||||||
return this.checkInventory();
|
return this.checkInventory();
|
||||||
|
Loading…
Reference in New Issue
Block a user