Skip to content

Commit

Permalink
Fix NullPointerException posible si l'ile ne peut pas se créer pour u…
Browse files Browse the repository at this point in the history
…ne raison quelconque
  • Loading branch information
Euphillya committed Mar 1, 2024
1 parent acca083 commit f1ade36
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public SkyblockManager(Main main) {
this.plugin = main;
}

public CompletableFuture<@Nullable Boolean> createIsland(UUID islandId, IslandSettings islandType) {
public CompletableFuture<Boolean> createIsland(UUID islandId, IslandSettings islandType) {
CompletableFuture<Boolean> completableFuture = new CompletableFuture<>();
PrepareSkyblockCreateEvent prepareSkyblockCreateEvent = new PrepareSkyblockCreateEvent(islandId, islandType);
Bukkit.getPluginManager().callEvent(prepareSkyblockCreateEvent);
Expand All @@ -50,7 +50,7 @@ public SkyblockManager(Main main) {
completableFuture.complete(create);
} catch (Exception e) {
logger.log(Level.FATAL, e.getMessage(), e);
completableFuture.complete(null);
completableFuture.complete(false);
}
return completableFuture;
}
Expand Down

0 comments on commit f1ade36

Please sign in to comment.