Skip to content

Commit 9f7969b

Browse files
committed
fix when database url is null
1 parent 785f8d2 commit 9f7969b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/me/mapacheee/extendedhorizons/shared/storage/PlayerStorageService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public void initialize() {
6666
* @return A CompletableFuture containing an Optional of PlayerData.
6767
*/
6868
public CompletableFuture<Optional<PlayerData>> getPlayerData(UUID uuid) {
69-
if (!configService.get().database().enabled()) {
69+
if (!configService.get().database().enabled() || databaseUrl == null) {
7070
return CompletableFuture.completedFuture(Optional.empty());
7171
}
7272

@@ -91,7 +91,7 @@ public CompletableFuture<Optional<PlayerData>> getPlayerData(UUID uuid) {
9191
* @return A CompletableFuture that completes when the operation is finished.
9292
*/
9393
public CompletableFuture<Void> savePlayerData(PlayerData playerData) {
94-
if (!configService.get().database().enabled()) {
94+
if (!configService.get().database().enabled() || databaseUrl == null) {
9595
return CompletableFuture.completedFuture(null);
9696
}
9797

0 commit comments

Comments
 (0)