9
0
mirror of https://github.com/WiIIiam278/HuskSync.git synced 2026-01-04 15:31:37 +00:00

feat: add method for getting OnlineUser in common module

This commit is contained in:
William
2024-12-07 20:56:22 +00:00
parent cedd12a048
commit 1820a810f4
3 changed files with 13 additions and 1 deletions

View File

@@ -99,6 +99,18 @@ public class HuskSyncAPI {
return plugin.supplyAsync(() -> plugin.getDatabase().getUser(uuid));
}
/**
* Get an {@link OnlineUser} by their UUID
*
* @param uuid the UUID of the user to get
* @return The {@link OnlineUser} wrapped in an optional, if they are online on <i>this</i> server.
* @since 3.7.2
*/
@NotNull
public Optional<OnlineUser> getOnlineUser(@NotNull UUID uuid) {
return plugin.getOnlineUser(uuid);
}
/**
* Get a {@link User} by their username
*