9
0
mirror of https://gitlab.com/SamB440/rpgregions-2.git synced 2025-12-28 19:29:16 +00:00

Make SqlStorage a bit cleaner

This commit is contained in:
SamB440
2020-04-29 14:29:57 +01:00
parent f42409f598
commit 0d3967fa66

View File

@@ -87,9 +87,7 @@ public class SqlStorage implements StorageManager {
@Override
public void clearDiscoveries(UUID uuid) {
getAccount(uuid).thenAccept(account -> {
account.getDiscoveredRegions().clear();
}).exceptionally(t -> {
getAccount(uuid).thenAccept(account -> account.getDiscoveredRegions().clear()).exceptionally(t -> {
t.printStackTrace();
return null;
});
@@ -99,9 +97,7 @@ public class SqlStorage implements StorageManager {
@Override
public void clearDiscovery(UUID uuid, String regionId) {
getAccount(uuid).thenAccept(account -> {
account.getDiscoveredRegions().remove(regionId);
}).exceptionally(t -> {
getAccount(uuid).thenAccept(account -> account.getDiscoveredRegions().remove(regionId)).exceptionally(t -> {
t.printStackTrace();
return null;
});