Skip to content

Commit

Permalink
Add proper message when user opens challenges gui in world without a …
Browse files Browse the repository at this point in the history
…challenges.
  • Loading branch information
BONNe committed May 1, 2019
1 parent ca5cfcc commit a2f0765
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ public ChallengesGUI(ChallengesAddon addon,
public void build()
{
// Do not open gui if there is no challenges.
if (this.challengesManager.getAllChallenges(this.world).isEmpty())
if (!this.challengesManager.hasAnyChallengeData(this.world))
{
this.addon.getLogger().severe("There are no challenges set up!");
this.user.sendMessage("general.errors.general");
this.user.sendMessage("challenges.errors.no-challenges");
return;
}

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 @@ -358,6 +358,7 @@ challenges:
exist-challenges-or-levels: '&cIn your world already exist challenges. Cannot proceed!'
defaults-file-exist: '&cdefault.json already exists. Use overwrite mode to replace it!'
defaults-file-error: '&cThere was an error while creating default.json file! Check console!'
no-challenges: '&cChallenges are not implemented in current world!'
protection:
flags:
CHALLENGES_ISLAND_PROTECTION:
Expand Down

0 comments on commit a2f0765

Please sign in to comment.