mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-01 22:16:08 +00:00
Add setUserLastPosition to API (#368)
This commit is contained in:
1 parent
fdb717a6b0
commit
3828581dfd
1 file changed
+11
@@ -94,6 +94,17 @@ public abstract class BaseHuskHomesAPI {
|
||||
public CompletableFuture<Optional<Position>> 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
|
||||
|
||||
Reference in new issue
Block a user