Further caching improvements

This commit is contained in:
William committed 2023-03-21 20:20:08 +00:00
1 parent a959aa9519
commit 8923b44c92
12 files changed
+212 -46

No files matched your search

@@ -99,7 +99,7 @@ public class BlueMapHook extends MapHook {
}
@Override
public CompletableFuture<Void> clearHomes(@NotNull User user) {
public void clearHomes(@NotNull User user) {
BlueMapAPI.getInstance().ifPresent((BlueMapAPI blueMapAPI) -> blueMapAPI.getWorlds()
.forEach(blueMapWorld -> blueMapWorld.getMaps()
.forEach(blueMapMap -> blueMapMap.getMarkerSets()
@@ -108,7 +108,7 @@ public class BlueMapHook extends MapHook {
return markerSet;
}))));
return CompletableFuture.completedFuture(null);
CompletableFuture.completedFuture(null);
}
@Override
@@ -143,7 +143,7 @@ public class BlueMapHook extends MapHook {
}
@Override
public CompletableFuture<Void> clearWarps() {
public void clearWarps() {
BlueMapAPI.getInstance().ifPresent((BlueMapAPI blueMapAPI) -> blueMapAPI.getWorlds()
.forEach(blueMapWorld -> blueMapWorld.getMaps()
.forEach(blueMapMap -> blueMapMap.getMarkerSets()
@@ -152,7 +152,7 @@ public class BlueMapHook extends MapHook {
return markerSet;
}))));
return CompletableFuture.completedFuture(null);
CompletableFuture.completedFuture(null);
}
/**
@@ -67,9 +67,8 @@ public abstract class MapHook extends PluginHook {
* Clears homes owned by a player from the map
*
* @param user the player whose homes to clear
* @return a {@link CompletableFuture} that completes when the homes have been cleared
*/
public abstract CompletableFuture<Void> clearHomes(@NotNull User user);
public abstract void clearHomes(@NotNull User user);
/**
* Update a warp, adding it to the map if it exists, or updating it on the map if it doesn't
@@ -88,10 +87,8 @@ public abstract class MapHook extends PluginHook {
/**
* Clears all warps from the map
*
* @return a {@link CompletableFuture} that completes when the warps have been cleared
*/
public abstract CompletableFuture<Void> clearWarps();
public abstract void clearWarps();
/**
* Returns if the position is valid to be set on this server