Skip to content

Commit

Permalink
Add completion blockage for un-deployed challenges.
Browse files Browse the repository at this point in the history
  • Loading branch information
BONNe committed Jan 26, 2019
1 parent 2a6127b commit d6a39b2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,12 @@ private ChallengeResult checkIfCanCompleteChallenge()
ChallengeType type = this.challenge.getChallengeType();

// Check the world
if (Util.getWorld(this.world) != Util.getWorld(this.user.getWorld()) ||
if (!this.challenge.isDeployed())
{
this.user.sendMessage("challenges.error.not-deployed");
result = EMPTY_RESULT;
}
else if (Util.getWorld(this.world) != Util.getWorld(this.user.getWorld()) ||
!this.challenge.getUniqueId().startsWith(Util.getWorld(this.world).getName()))
{
this.user.sendMessage("general.errors.wrong-world");
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/locales/en-US.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ challenges:
reward-problem: '&cThere was a problem giving your reward. Ask Admin to check
log!'
you-still-need: '&cYou still need [amount] x [item]'
not-deployed: '&cChallenge is not deployed.'
errors:
challenge-level-not-available: You have not unlocked level to complete this challenge.
unique-id: Unique ID [id] is already taken. Choose different.
Expand Down

0 comments on commit d6a39b2

Please sign in to comment.