Skip to content

Commit

Permalink
Fixes a bug when "notify" was triggered only when GUI was opened.
Browse files Browse the repository at this point in the history
  • Loading branch information
BONNe committed Jan 23, 2022
1 parent 7a4db8c commit 8eea1c1
Showing 1 changed file with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ public void loadUserIslands(UUID uniqueId)
if (island.getOwner() == uniqueId)
{
// Owner island must be validated.
this.validateIslandData(island);
this.validateIslandData(island, User.getInstance(uniqueId));
}
else
{
Expand Down Expand Up @@ -559,6 +559,20 @@ private void updateOwnerBundle(@NotNull Island island, @NotNull BiomesIslandData
*/
@Nullable
public BiomesIslandDataObject validateIslandData(@Nullable Island island)
{
return this.validateIslandData(island, null);
}


/**
* This method adds, validates and returns island data for given island.
*
* @param island Island which data must be returned.
* @param user User who triggered validation.
* @return BiomesIslandDataObject or null if failed to create.
*/
@Nullable
public BiomesIslandDataObject validateIslandData(@Nullable Island island, @Nullable User user)
{
if (island == null || island.getOwner() == null)
{
Expand All @@ -577,7 +591,7 @@ public BiomesIslandDataObject validateIslandData(@Nullable Island island)
this.updateOwnerBundle(island, dataObject);

// Call check command which finds unlocked biomes.
this.checkBiomesUnlockStatus(island, null, null);
this.checkBiomesUnlockStatus(island, user, this.getIslandLevel(island));

return dataObject;
}
Expand Down

0 comments on commit 8eea1c1

Please sign in to comment.