diff --git a/common/src/main/java/net/william278/huskhomes/api/BaseHuskHomesAPI.java b/common/src/main/java/net/william278/huskhomes/api/BaseHuskHomesAPI.java index f5df57be..53caec8e 100644 --- a/common/src/main/java/net/william278/huskhomes/api/BaseHuskHomesAPI.java +++ b/common/src/main/java/net/william278/huskhomes/api/BaseHuskHomesAPI.java @@ -94,6 +94,17 @@ public abstract class BaseHuskHomesAPI { public CompletableFuture> getUserLastPosition(@NotNull User user) { return plugin.supplyAsync(() -> plugin.getDatabase().getLastPosition(user)); } + + /** + * Set the last {@link Position}, as used in the {@code /back} command, for this user + * + * @param user The {@link User} to set the last position for + * @param position The {@link Position} to set as the user's last position + * @since 4.2 + */ + public void setUserLastPosition(@NotNull User user, @NotNull Position position) { + plugin.runAsync(() -> plugin.getDatabase().setLastPosition(user, position)); + } /** * Returns where the user last disconnected from a server